-
Notifications
You must be signed in to change notification settings - Fork 194
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
Tweak in MapEvaluator.need_update for performance #3353
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3353 +/- ##
==========================================
- Coverage 93.72% 93.70% -0.03%
==========================================
Files 144 144
Lines 18270 18282 +12
==========================================
+ Hits 17124 17131 +7
- Misses 1146 1151 +5
Continue to review full report at Codecov.
|
Added a test to avoid update if there is no free spatial parameters (solve fail related to |
Thanks a lot @QRemy! One last suggestion to try: maybe it is an option to also check for |
32bd633
to
2e45dfb
Compare
Thanks @QRemy, it seems there are now test fails https://github.com/gammapy/gammapy/pull/3353/checks?check_run_id=2557044541#step:9:1865, I can also reproduce them locally....not sure what is happening. Maybe see if they can be fixed with limited effort... |
parameters_spatial_changed update values so we cannot use it in need update
a706112
to
c9c2117
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 @QRemy, the remaining test fails seems unrelated. I think adding the lon_0
and lat_0
parameters to the TemplateSpatialModel
is still a good idea, however this can be done in a follow up PR.
This PR introduce a performance tweak in MapEvaluator.need_update that replaces
skycoord.separation
byangular_separation
in order to avoid unnecessary frame and unit equivalence comparison.