This PR updates sexVals.sexDateToISO to handle MPC obsTime rounding rules: by default all obsTime are reported with millisecond precision. This is enabled with a keyword argument to sexDateToISO: mpc_rounding=True which is the default value.
Additionally, sexVals.sexDateToISO and sexVals.isoToSexDate are re-written to use Python's datetime module for handling dates and timedeltas and are made more flexible to handle higher precision observations.
In all of the cases above precTime corresponds to the precision of the input sexagesimal date (in millionths of a day), regardless of the precision of the obsTime returned.
Tracks #59
This PR updates
sexVals.sexDateToISO
to handle MPCobsTime
rounding rules: by default all obsTime are reported with millisecond precision. This is enabled with a keyword argument tosexDateToISO
:mpc_rounding=True
which is the default value.Additionally,
sexVals.sexDateToISO
andsexVals.isoToSexDate
are re-written to use Python'sdatetime
module for handling dates and timedeltas and are made more flexible to handle higher precision observations.Here is an example:
In all of the cases above
precTime
corresponds to the precision of the input sexagesimal date (in millionths of a day), regardless of the precision of theobsTime
returned.How does this look @stevechesley?