IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Initial Version and Version 1 of TimeFields


Ignore:
Timestamp:
Oct 19, 2009, 5:50:05 PM (17 years ago)
Author:
eugene
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TimeFields

    v1 v1  
     1== Time Fields in DVO ==
     2
     3mextract 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). 
     4
     5If TIMEREF is not set, it defaults to 1970/01/01,00:00:00.  Some examples of TIMEREF:
     6
     7{{{
     8$TIMEREF = 2001/01/01,00:00:00
     9$TIMEREF = 2009/07/01,00:00:00
     10}}}
     11
     12There 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.
     13
     14Be careful when you set TIMEREF.  if you just do:  $TIMEREF =
     152001/01/01, it will treat that as a math expression, and set the
     16reference to 2001 seconds since 1970/01/01...
     17
     18There 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.
     19
     20The dvo (or mana, etc) function 'ctimes' allows for on-the-fly conversions between human readable time/date values and the formated values.  for example:
     21{{{
     22dvo: $TIMEREF = 2009/10/20,00
     23dvo: echo $TIMEREF
     242009/10/20,00
     25
     26dvo: ctimes -ref 0.0
     27time: 2009/10/20,00:00:00
     28
     29dvo: $TIMEFORMAT = sec
     30dvo: ctimes -abs 2009/10/20,01:00:00
     31time: 3600.000000
     32
     33dvo: $TIMEFORMAT = min
     34dvo: ctimes -abs 2009/10/20,01:00:00
     35time: 60.000000
     36
     37dvo: $TIMEFORMAT = hours
     38dvo: ctimes -abs 2009/10/20,01:00:00
     39time: 1.000000
     40
     41dvo: $TIMEFORMAT = days
     42dvo: ctimes -abs 2009/10/20,01:00:00
     43time: 0.041667
     44
     45dvo: $TIMEFORMAT = jd
     46dvo: ctimes -abs 2009/10/20,01:00:0
     47time: 2455124.541667
     48
     49dvo: $TIMEFORMAT = mjd
     50dvo: ctimes -abs 2009/10/20,01:00:0
     51}}}
     52