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

Improve SkyCube convolution and npred computation #766

Merged
merged 7 commits into from Nov 11, 2016

Conversation

Projects
None yet
2 participants
@adonath
Member

adonath commented Nov 10, 2016

This is the third part of the major SkyCube rework. These are the most important changes in this PR:

  • Move stand-alone convolve_cube function to SkyCube.convolve()
  • Move stand-alone cube_to_spec function to SkyCube.to_spectrum, but currently not working.
  • Add a EnergyDependentTablePSF.kernels() method to get a set of kernels for cube convolution
  • Rewrite compute_npred_cube function

When running the script docs/tutorials/npred/npred_convolved.py, I get very good agreement with the result from the fermi science tools. The total number of counts agrees within >1%, depending on the precision of the flux image integration.

@adonath adonath added the cleanup label Nov 10, 2016

@adonath adonath self-assigned this Nov 10, 2016

@cdeil cdeil added the feature label Nov 10, 2016

@cdeil cdeil added this to the 0.5 milestone Nov 10, 2016

@cdeil

I left a few inline comments.
Overall the changes look good, but are too large for me to review in detail this week.

So thank you very much for this cleanup and new features. It's great that you pushed on this and now get agreement with the Fermi ST!

Show outdated Hide outdated gammapy/cube/core.py
Show outdated Hide outdated gammapy/cube/core.py
Show outdated Hide outdated gammapy/cube/core.py
Show outdated Hide outdated gammapy/irf/psf_table.py
Show outdated Hide outdated gammapy/irf/psf_table.py
@adonath

This comment has been minimized.

Show comment
Hide comment
@adonath

adonath Nov 11, 2016

Member

@cdeil Thanks! I've addressed all your comments and will merge as soon as Travis-CI passed.

Member

adonath commented Nov 11, 2016

@cdeil Thanks! I've addressed all your comments and will merge as soon as Travis-CI passed.

@adonath adonath merged commit dd8761a into gammapy:master Nov 11, 2016

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@adonath adonath deleted the adonath:rework_cube_convolve_npred branch Nov 11, 2016

@adonath

This comment has been minimized.

Show comment
Hide comment
@adonath

adonath Nov 11, 2016

Member

@cdeil I've merged this PR you can continue with #754.

Member

adonath commented Nov 11, 2016

@cdeil I've merged this PR you can continue with #754.

@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Nov 11, 2016

Member

@adonath - Thanks!

I've done some minor code formatting in 290b7ba in master.
Have to go now, but will finish up #754 asap.

Member

cdeil commented Nov 11, 2016

@adonath - Thanks!

I've done some minor code formatting in 290b7ba in master.
Have to go now, but will finish up #754 asap.

@cdeil cdeil changed the title from Rework cube convolution and npred computation to Improve SkyCube convolution and npred computation Nov 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment