Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
In Gammapy we currently use the
See http://astropy.readthedocs.org/en/latest/time/index.html#time-scale and references there.
@kosack Do you know what the status of the UTC versus TT time scale discussion is in CTA? Even if it's not written up in a spec yet, what should we use in Gammapy for now? Or will the time scale always be put in the FITS header and CTA software (science tools specifically) is supposed to handle both UTC and TT?
I think MET should be implemented by defining a time scale (see TimeCxcSec as an example)) ?
I think we should use a time scale that doesn't need leap-second corrections (so we should not use UTC). That makes making lightcurves, etc, much easier. Otherwise, we rely on a leap-second database to be updated and maintained. I think that's why TT is used normally, and you only go to UTC when needed (e.g. for displaying a human-readable time, etc). I may be wrong though.
@registerrier - Could you please clean up the docs and code how to work with times in Gammapy?
Code-wise, my main suggestion is to use
Astropy has supported Time columns in Table for ~ 5 years:
There's probably subtleties when reading & writing, and whether to use
Concerning documentation, maybe one idea would be to delete this:
This time ref we should probably delete:
It can be in our tests, but it should be in our utils.
If we want to keep the time ref points for Fermi, HESS, CTA, ... we should probaby move them here and maintain it together with the ref locations (not set for Fermi obviously):
@registerrier - Thanks for cleaning that up!