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
Activate PSFMap for fitting #2627
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2627 +/- ##
=========================================
+ Coverage 91.5% 91.5% +<.01%
=========================================
Files 141 141
Lines 15942 15944 +2
=========================================
+ Hits 14588 14590 +2
Misses 1354 1354
Continue to review full report at Codecov.
|
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 @AtreyeeS. This look good to me. I've left one comment concerning the max_radius
parameter. Once this is addressed we can merge...
gammapy/cube/fit.py
Outdated
self.psf = psf # .get_psf_kernel(self.model.position, geom=exposure.geom) | ||
if isinstance(psf, PSFMap): | ||
self.psf = psf.get_psf_kernel( | ||
self.model.position, geom=exposure.geom, max_radius=0.8 * u.deg |
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.
I would propose to modify .get_psf_kernel()
and just take the maximum of table_psf.rad
as a default maximum radius (if max_radius is None
). This is more consistent then having a separate hard-coded value here...
Thanks @adonath ! I have made the change |
Thanks @AtreyeeS! I've just restarted the remaining failing Travis builds, once those are green Ill merge... |
Ok, it seems |
Description
This pull request activates
PSFMap
on the MapEvaluator. Similar to what is done in #2587 , the option to keep PSFKernel is still on. Once this PR is merged, I will deactivate the kernels and adapt the notebooks.Dear reviewer
One specific doubt I have is what should be the
max_radius
inself.psf = psf.get_psf_kernel(self.model.position, geom=exposure.geom, max_radius=0.8 * u.deg)
Having it as a parameter will be extremely confusing for the users. Currently I am passing a large enough value which should hopefully suffice for most cases.
I did not adapt the tests in
analysis
to avoid conflicts with the changes @Bultako might be making.