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 GTI export in datasets #2441

merged 5 commits into from Oct 6, 2019


Copy link

registerrier commented Oct 5, 2019

GTIs have been added to datasets but were not exported in the SpectrumDatasetOnOff.to_ogip() and MapDataset.write() methods. They were also not read in SpectrumDatasetOnOff.from_ogip() and methods.

This PR solves this issue by introducing GTI.to_hdulist() and GTI.from_hdulist() methods.

@registerrier registerrier requested a review from adonath Oct 5, 2019
@registerrier registerrier added the bug label Oct 5, 2019
@registerrier registerrier added this to To do in gammapy.maps via automation Oct 5, 2019
@registerrier registerrier added this to To do in gammapy.spectrum via automation Oct 5, 2019
@registerrier registerrier added this to the 0.15 milestone Oct 5, 2019
cdeil approved these changes Oct 5, 2019

This comment has been minimized.

Copy link
Contributor Author

registerrier commented Oct 6, 2019

Thanks. I introduced the to_hdulist and from_hdulist for what I saw as API consistency. It is a bit weird to create an HDUList for a single table indeed and the .table API should be sufficient.
Yet the object being not a Table but rather containing one I found that a specific API was better.

We will see what to do with the API consistency globally as proposed in #2442 .

Merging now.

@registerrier registerrier merged commit 05d872d into gammapy:master Oct 6, 2019
8 of 9 checks passed
8 of 9 checks passed
Scrutinizer Errored
Codacy/PR Quality Review Up to standards. A positive pull request.
continuous-integration/travis-ci/pr The Travis CI build passed
gammapy.gammapy Build #20191005.1 succeeded
gammapy.gammapy (DevDocs) DevDocs succeeded
gammapy.gammapy (Lint) Lint succeeded
gammapy.gammapy (Test Python36) Test Python36 succeeded
gammapy.gammapy (Test Windows36) Test Windows36 succeeded
gammapy.gammapy (Test Windows37) Test Windows37 succeeded
gammapy.maps automation moved this from To do to Done Oct 6, 2019
gammapy.spectrum automation moved this from To do to Done Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.