Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add new observation container class #1630
This PR introduces a new observation container class:
The main goal is to break the dependency of the observation container on the
For this we basically copy the old
Regarding the name,
Follow-up PRs are planed:
@dcfidalgo - Thanks!
This could go in any time, since it's unused. Let me know if you still have time to work on this, or if we should just merge and then this continues at some later time.
If you want to work on this, my suggestions would be (in order of priority):
- make it more minimal. E.g.
pointing_altazcan be removed,
tstopalso because it's duplicate info wrt GTI (and if you kept them, all times should be Time objects). Also the
target_radeccan go IMO. It's easier to start with something minimal and add to it, than to start with many things and take things away or change them later.
- Next step would already be to add the
DataStoreObservation.to_observation_ctamethod with a test case
- Or it could be to add a test case where you read these things and create such an object from scratch, to test
__init__and also test
- At this point I would introduce the base class. Keep the names ObservationCTA and DataStoreObservation, and introduce an ObservationBase and copy the
__str__method there, to avoid the code duplication
Those are things that you could do here, or just leave to a future PR.
Then the next step would be to try and pass one such obs to a Gammapy analysis and see if it works; that's for sure for a future PR.
@cdeil Thanks for the comments!
Done, i pushed a commit in which i removed all attributes that are currently not used in Gammapy.
Next week i will still have some limited time in the afternoon to work on this, the week after i will go on holidays. Maybe we could merge this PR just in case, and i will try to open another one next week where i introduce a method to create an ObservationCTA + test.