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

Add method to compute energy-weighted 2D PSF kernel #1837

Merged
merged 1 commit into from Oct 4, 2018

Conversation

@AtreyeeS
Copy link
Member

@AtreyeeS AtreyeeS commented Sep 28, 2018

This method should weigh the PSF with the exposure and the spectrum before averaging.
I have put in a very rudimentary test, because I am not very sure about the "expected" values after averaging.

@AtreyeeS AtreyeeS requested a review from registerrier Sep 28, 2018
@AtreyeeS AtreyeeS added the feature label Sep 28, 2018
@AtreyeeS AtreyeeS added this to To do in gammapy.maps via automation Sep 28, 2018
@AtreyeeS AtreyeeS added this to the 0.9 milestone Sep 28, 2018
@AtreyeeS AtreyeeS self-assigned this Sep 28, 2018
Parameters
----------
exposure : Pre-computed exposure map

This comment has been minimized.

@registerrier

registerrier Sep 28, 2018
Contributor

Technically one should not use an exposure map to average the PSF but simply a vector of exposures at the typical tested position. So here you could pass either an array of exposures for the same true energies.

exposure = Map.from_geom(geom)
exposure.data = np.ones(exposure.data.shape)
sigma = 0.5 * u.deg
kernel = PSFKernel.from_gauss(geom, sigma)

This comment has been minimized.

@registerrier

registerrier Sep 28, 2018
Contributor

Here you should probably have two different sigmas and average over bins such that the expected statistic is constant, e.g. for constant exposure and E^-2 spectrum 100, 150 and 230 GeV

@registerrier registerrier moved this from To do to In progress in gammapy.maps Oct 1, 2018
@cdeil cdeil modified the milestones: 0.9, Madrid Oct 2, 2018
@AtreyeeS AtreyeeS force-pushed the AtreyeeS:PSF_sum branch from b7138e6 to 402936c Oct 4, 2018
@cdeil
cdeil approved these changes Oct 4, 2018
Copy link
Member

@cdeil cdeil left a comment

Looks good. Thank you!

@cdeil cdeil merged commit 9bb14a8 into gammapy:master Oct 4, 2018
0 of 4 checks passed
0 of 4 checks passed
Codacy/PR Quality Review Hang in there, Codacy is reviewing your Pull request.
Details
Scrutinizer Running
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
gammapy.maps automation moved this from In progress to Done Oct 4, 2018
@cdeil cdeil modified the milestones: Madrid, 0.9 Oct 7, 2018
@cdeil cdeil changed the title Add a method to create 2D PSF from a PSF Kernel Add method to compute energy-weighted 2D PSF kernel Nov 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
gammapy.maps
  
Done
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.