pisa icon indicating copy to clipboard operation
pisa copied to clipboard

`DistributionMaker.get_outputs(return_sum=True)`: first Map name is used (others discarded)

Open jllanfranchi opened this issue 8 years ago • 3 comments

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:

  1. 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 the Map but not affect how you work with the Map
  1. 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)

jllanfranchi avatar Nov 29 '16 21:11 jllanfranchi

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

steven-j-wren avatar Nov 29 '16 22:11 steven-j-wren

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?

philippeller avatar Dec 14 '16 22:12 philippeller

I think this solution in PR #247 is good enough to at least turn this from bug -> enhancement.

jllanfranchi avatar Dec 16 '16 21:12 jllanfranchi

Has been working fine, so I'm closing it.

LeanderFischer avatar May 07 '24 15:05 LeanderFischer

Option 2 has been implemented.

JanWeldert avatar Aug 02 '24 15:08 JanWeldert