Conversation
|
As I commented in Mattermost, I think this change of --select that adds the sum keyword to keep or remove the axis after the operation is making --select equivalent to --axlim (at least in the default case), which slices but doesn't remove the axis. |
| logger.debug("Applying global action") | ||
| h = self.globalAction(h) | ||
|
|
||
| sum_axes = [x for x in self.sum_gen_axes if x in h.axes.name] |
There was a problem hiding this comment.
Since you are touching this part, can we take this occasion to rename sum_axes (which is only used in this and the next few lines) as sum_gen_axes or something to explicitly mark it as such? It is probably already quite clear from the right had side that it only affects gen axes, usually for the unfolding or alphaS, but if you did it would make this part of the code easier to understand. Other possible axes on which we might apply actions are managed elsewhere, for example through the globalAction.
| sel_ax, sel_lb, sel_ub = sel.split() | ||
| parts = sel.split() | ||
| sel_ax, sel_lb, sel_ub = parts[0], parts[1], parts[2] | ||
| do_sum = len(parts) > 3 and parts[3] == "sum" |
There was a problem hiding this comment.
In spite of my previous comment, I think it makes sense that you made this action act more generically, allowing the user to control whether the marginalisation of the axis should happen or not.
Unfortunately it modifies the previous default behaviour, but if this is properly advertised to all users I can accept it
No description provided.