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 gammapy.irf.Background3D #1162

Merged
merged 3 commits into from Oct 5, 2017

Conversation

Projects
None yet
2 participants
@cdeil
Member

cdeil commented Oct 5, 2017

This PR adds a gammapy.irf.Background3D class that can read the mkg_3d format:

http://gamma-astro-data-formats.readthedocs.io/en/latest/irfs/full_enclosure/bkg/index.html#bkg-3d

A test case (and some minor workarounds for units issues) with a CTA 1DC response file are included.

This is just a first step (pair coding with @robertazanin), the next steps would be to add a make_background_cube function in a similar way to and next to gammapy.cube.make_exposure_cube and to update the 3D simulation / analysis example in examples/3d in a follow-up PR.

Reviewing the old gammapy.background.FOVCube class, copying over the useful methods and adding tests to this replacement gammapy.irf.Background3D should be done, but probably no-one has time to do it now.

@cdeil cdeil added the feature label Oct 5, 2017

@cdeil cdeil added this to the 0.7 milestone Oct 5, 2017

@cdeil cdeil self-assigned this Oct 5, 2017

@cdeil cdeil requested a review from joleroi Oct 5, 2017

@joleroi

Discussed offline - no concerns

@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Oct 5, 2017

Member

Some more fixes and cleanup to the IRF classes added, discussed with @joleroi offline.

And fixed a fail that's unrelated to this PR on travis-ci in test_flux_points[pl] from gammapy/spectrum/tests/test_flux_point.py:178:
https://travis-ci.org/gammapy/gammapy/jobs/283710555#L2493

Tests and docs work locally, I think this is ready to go. Merging now.

Member

cdeil commented Oct 5, 2017

Some more fixes and cleanup to the IRF classes added, discussed with @joleroi offline.

And fixed a fail that's unrelated to this PR on travis-ci in test_flux_points[pl] from gammapy/spectrum/tests/test_flux_point.py:178:
https://travis-ci.org/gammapy/gammapy/jobs/283710555#L2493

Tests and docs work locally, I think this is ready to go. Merging now.

@cdeil cdeil merged commit 8052a02 into gammapy:master Oct 5, 2017

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment