-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consistency between MapDataset.stack and Datasets.stack_reduce #5261
Comments
If I remember correctly, the behaviour in Not sure what is happening in |
If I remember correctly, the first implementation of Applying the mask for in-place stacking would mean to always apply it, because one cannot know whether the stacking happens the first time. This means, except for the first time, one would un-necessarily apply the (stacked) mask over and over again. But independently, |
OK thanks. Not re-masking all the time seems a reasonable approach indeed. While solving #5245 , I try to adapt the docstring and the behaviour of |
Currently
Datasets.stack_reduce()
will first apply theto_masked()
method to the first dataset.Using
MapDataset.stack
the mask is not applied toself
, the assumption being that the first dataset used is empty.While this is probably true in general, this might lead to some issues. At least the docstring should more clearly state this.
Note also that
MapDatasetOnOff.stack
applies the mask toself.counts_off
, which is then inconsistent.gammapy/gammapy/datasets/map.py
Line 2601 in 011cefe
See associated PRs : #3058 #3164
Is there any reason for this specific behavior?
The text was updated successfully, but these errors were encountered: