pint.pulsar_mjd
PulsarMJD special time format.
MJDs seem simple but if you want to use them with the UTC time scale you have
to deal with the fact that every so often a UTC day is either 86401 or 86399
seconds long. astropy.time.Time
has a policy on how to interpret MJDs
in UTC, and in that time scale all times can be expressed in MJD, but the rate
at which MJDs advance is not one day per 86400 SI seconds. (This technique,
when applied to UNIX time, is called a “leap_smear” and is used by all Google
APIs.) This is not how (some? all?) observatories construct the MJDs they
record; observatories record times by converting UNIX time to MJDs in a way
that ignores leap seconds; this means that there is more than one time that
will produce the same MJD on a leap second day. (Observatories usually use a
maser to keep very accurate time, but this is used only to identify the
beginnings of seconds; NTP is used to determine which second to record.) We
therefore introduce the “pulsar_mjd” time format to capture the way in which
our data actually occurs.
An MJD expressed in the “pulsar_mjd” time scale will never occur during a leap second. No negative leap seconds have yet been inserted, that is, all days have been either 86400 or 86401 seconds long. If a negative leap second does occur, it is not totally clear what will happen if an MJD is provided that corresponds to a nonexistent time.
This is not a theoretical consideration: at least one pulsar observer was observing the sky at the moment a leap second was introduced.
Functions
|
Return a numpy long double scalar form different type of data |
|
Return the sum of |
Convert Fortran-format floating-point strings. |
|
|
|
|
|
Convert numpy longdouble to string. |
|
|
|
|
|
|
|
Return a astropy.units.Quantity containing a numpy long double scalar from a different dtype |
|
|
|
|
Split float64 in two aligned parts. |
|
Return a long double from the input string. |
|
|
|
|
|
Returns an astropy Time object generated from a MJD string input. |
Return an astropy Time value as MJD in longdouble |
|
Print an MJD time with lots of digits. |
|
|
Multiple |
|
Add |
Classes
|
Support conversion of MJDs to and from extended precision. |
|
Support full-accuracy reading and writing of MJDs in string form. |
|
Change handling of days with leap seconds. |
|
Support conversion of pulsar MJDs to and from extended precision. |
|
Support full-accuracy reading and writing of pulsar MJDs in string form. |