-
Notifications
You must be signed in to change notification settings - Fork 187
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
Adjust to_edisp_kernel
input to MapAxis
#5186
Conversation
9524fad
to
b38a092
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Astro-Kirsty !
I do not think you need to adapt internet tests to check for the deprecation warning, eg as done in gammapy/datasets/tests/test_map.py
It only needs to be checked when the user passes a quantity instead of a MapAxis
in the to_edisp_kernel
function, and internally within Gammapy we should pass a MapAxis
.
Signed-off-by: Astro-Kirsty <AstroKirsty@gmail.com>
Signed-off-by: Astro-Kirsty <AstroKirsty@gmail.com>
9acb1cb
to
36ae743
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5186 +/- ##
=======================================
Coverage 94.46% 94.46%
=======================================
Files 232 232
Lines 35636 35645 +9
=======================================
+ Hits 33664 33673 +9
Misses 1972 1972 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Astro-Kirsty looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Astro-Kirsty ! No further comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check that the deprecation works correctly, ie, the old behaviour is still supported
Signed-off-by: Astro-Kirsty <AstroKirsty@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No further comments. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Astro-Kirsty . This looks good!
This PR is to resolve #5142.
I left it as a draft as I am not sure if this is the correct procedure to take.
This is two part issue, we want to change the variables to be consistent with the other naming for axis
gammapy/gammapy/irf/edisp/map.py
Line 116 in 86488ec
We also need to change the variable to no longer be a quantity but a
MapAxis
.This was the best way I could think to achieve this.
Note: there are a number of failing tests, but I did not want to fix them all with the deprecation warning until a method was decided upon.
I am open to suggestions.