Time Fields in DVO
mextract and imextract both have fields which represent a time value. When extracting these fields into vectors, the user has options to control the units and format of the resulting vectors. The vector is a floating-point value, with a reference date define by the DVO variable $TIMEREF. The units of the vector may be one of the following values: sec, min, hours, days (note that 'seconds' and 'minutes' invalid and are silently ignored).
If TIMEREF is not set, it defaults to 1970/01/01,00:00:00. Some examples of TIMEREF:
$TIMEREF = 2001/01/01,00:00:00 $TIMEREF = 2009/07/01,00:00:00
There are two special words for TIMEREF: 'now' and 'today'. The value of 'now' make the reference the time of the query; the value of 'today' make the reference UT midnight of the day of the query.
Be careful when you set TIMEREF. if you just do: $TIMEREF = 2001/01/01, it will treat that as a math expression, and set the reference to 2001 seconds since 1970/01/01...
There are two special words for TIMEFORMAT: 'jd' and 'mjd'. With these options, TIMEREF is ignored and the date is returned as a JD or MJD.
The dvo (or mana, etc) function 'ctimes' allows for on-the-fly conversions between human readable time/date values and the formated values. for example:
dvo: $TIMEREF = 2009/10/20,00 dvo: echo $TIMEREF 2009/10/20,00 dvo: ctimes -ref 0.0 time: 2009/10/20,00:00:00 dvo: $TIMEFORMAT = sec dvo: ctimes -abs 2009/10/20,01:00:00 time: 3600.000000 dvo: $TIMEFORMAT = min dvo: ctimes -abs 2009/10/20,01:00:00 time: 60.000000 dvo: $TIMEFORMAT = hours dvo: ctimes -abs 2009/10/20,01:00:00 time: 1.000000 dvo: $TIMEFORMAT = days dvo: ctimes -abs 2009/10/20,01:00:00 time: 0.041667 dvo: $TIMEFORMAT = jd dvo: ctimes -abs 2009/10/20,01:00:0 time: 2455124.541667 dvo: $TIMEFORMAT = mjd dvo: ctimes -abs 2009/10/20,01:00:0
