Take observation time from GTI table #1908
The observation time will now be calculated using the GTI table pointed to in the HDU index file.
Maybe we could add a warning that taking the obs time from the Obs index file is deprecated and will raise an error in the future?
I checked the data sets we have in gammapy-extra for differences between the live-times (computed from the GTI table and taken from the obs index file). Only the data sets
show a deviation of about 0.1-0.5%. For the rest of the data sets there is basically no difference.
We just discussed this PR in the call. Conclusion: rather than changing the
I will make this change here in this PR.
I introduced a
@cdeil From my side this would be ready to merge.
cdeil left a comment
@dcfidalgo - Thanks!
Some suggestions inline.
I was expecting that you would read the EVENTS header and create the GTI from there.
I specifically don't like the name
The caching, i.e. where we have
Given that here all the remaining lazy properties (except possibly GTI) just access
@cdeil Thanks for the comments!
I moved the method to the
I left a small test in the
For now i simply removed all lazy properties, maybe we can discuss a possible optimization in a follow-up PR.