Skip to content
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

Merged
merged 5 commits into from Nov 29, 2019
Merged

Conversation

AtreyeeS
Copy link
Member

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 in
self.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.

@codecov
Copy link

codecov bot commented Nov 28, 2019

Codecov Report

Merging #2627 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2627      +/-   ##
=========================================
+ Coverage    91.5%   91.5%   +<.01%     
=========================================
  Files         141     141              
  Lines       15942   15944       +2     
=========================================
+ Hits        14588   14590       +2     
  Misses       1354    1354
Impacted Files Coverage Δ
gammapy/cube/fit.py 89.93% <100%> (+0.03%) ⬆️
gammapy/cube/simulate.py 97.72% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e12d3eb...e0985d7. Read the comment docs.

@adonath adonath self-assigned this Nov 28, 2019
@adonath adonath added this to the 0.15 milestone Nov 28, 2019
@adonath adonath changed the title activate psf_map Activate PSFMap for fitting Nov 28, 2019
Copy link
Member

@adonath adonath left a 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...

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
Copy link
Member

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...

@AtreyeeS
Copy link
Member Author

Thanks @adonath ! I have made the change

@adonath
Copy link
Member

adonath commented Nov 29, 2019

Thanks @AtreyeeS! I've just restarted the remaining failing Travis builds, once those are green Ill merge...

@adonath
Copy link
Member

adonath commented Nov 29, 2019

Ok, it seems gammapy download is broken...the Travis-CI fails are unrelated. The tests pass locally for me. I'll go ahead and merge now...

@adonath adonath merged commit ef88663 into gammapy:master Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants