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
merged 5 commits into from Oct 6, 2019
Merged

Conversation

registerrier
Copy link
Contributor

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 MapDataset.read() methods.

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

@registerrier registerrier added this to To do in gammapy.maps via automation Oct 5, 2019
@registerrier registerrier added this to To do in gammapy.makers via automation Oct 5, 2019
@registerrier registerrier added this to the 0.15 milestone Oct 5, 2019
@registerrier
Copy link
Contributor Author

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
gammapy.maps automation moved this from To do to Done Oct 6, 2019
gammapy.makers 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
Labels
Projects
gammapy.maps
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants