Remove warning in Kernel.normalize #5531
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently
Kernel.normalize
emits a warningwhen
where
MAX_NORMALIZATION = 100
, i.e. ifA tophat kernel with 10 pix radius, normalised to peak value 1 is perfectly OK usage.
There should be no warning.
This pull request removes the check and warning.
FYI: In the past months we've been getting this warning from several places in Gammapy, and I'd prefer to just remove it here instead of having to catch it everywhere.
It looks like this warning was added in #3747 by @larrybradley, a PR that was reviewed by @adonath . As far as I can see, the motivation for #3747 was a different bug and different checks were added for that, and this check wasn't motivated / discussed.
I did discuss this in person with @adonath today and he agrees the warning should go.
@larrybradley - Can you please review this?
If possible I'd like to get this in for the 1.3 release.
Does this need a changelog entry? (I don't think so, but I can add if others think yes)