pisa
pisa copied to clipboard
`DistributionMaker.get_outputs(return_sum=True)`: first Map name is used (others discarded)
First Map name is kept (others discarded) DistributionMaker.get_outputs(return_sum=True)
. (My first thoughts are that this bug may be in DistributionMaker
but also might be in Map
and/or MapSet
.)
Options:
- rename result e.g.
' + '.join([m.name for m in maps])
- Pretty and informative
- Potentially unwieldy names (long, non-python-friendly characters plus and space)
- Difficult to work with: maps in MapSets are synced by name; cannot use dotted notation, and string access becomes more and more difficult
- Alternative to this would be to create a new field in the
Map
object that captures such info (and/or tex version thereof) that can be carried along with theMap
but not affect how you work with theMap
- rename result
'total'
- Simple
- Allows one summed result to be compared against another without having to rename things first
- Solution that @steven-j-wren is using (he found this issue and needed some solution like this to make
make_akhmedov_plots.py
work)
I did the simple solution for a simple guy. I did however make it that the user could overwrite this if they so chose and name the resulting summed output whatever they wanted. See #247
maybe we check if all maps have the same name already anyway and in that case assign that name also to the output. And in any other case do something of the suggested above?
I think this solution in PR #247 is good enough to at least turn this from bug -> enhancement.
Has been working fine, so I'm closing it.
Option 2 has been implemented.