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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@cdeil cdeil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you!

@cdeil cdeil merged commit 9bb14a8 into gammapy:master Oct 4, 2018
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
Labels
Projects
gammapy.maps
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants