-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Astropy Time objects are designed to have more available precision than python floats. But it can be very cumbersome to read and write values with this extra precision, particularly in the format (MJD) that is customary in pulsar astronomy (which actually needs the extra precision). The easiest way to manipulate these is to use time format "mjd" which converts to and from python floats. I suggest adding formats "mjd_long" and "mjd_decimal" which use higher-precision numbers to represent these quantities, and "mjd_string" to allow conversion to and from string representations without precision loss.
For a demonstration that this can be done see: nanograv/PINT#549 Note that much but not all of the complexity there is either to work around astropy bug #9327 or to deal with the awkward way pulsar astronomy instruments handle UTC MJDs (as opposed to the awkward way astropy's Time objects handle UTC MJDs; the difference is in the handling of leap second days, of using a timescale with jumps versus a linear "leap smear").
Concerns:
- Do we want the jd_ versions too? These have even worse precision problems (and thus would benefit even more from such methods).
- We presumably want corresponding TimeDeltaFormats as well.