getdate Examples

1. Print Usage Instructions

Print basic instructions for use of this program by typing only the program name.
$ getdate
GETDATE WCSTools 3.8.3, 14 July 2011, Doug Mink SAO
Convert date and time between various formats
Usage: [-dv][-n dec][-f format] itype2otype [date and/or time] [ra dec
sys]
       [-dv][-n dec][-f format] itype2otype @file
  itype: nfd=ISOFITS fd=FITS, dt=yyyy.mmdd, hr=hh:mm:ss, deg=dd:mm:ss
         jd=Julian Date, mjd=Modified Julian Date
         hjd=Heliocentric Julian Date, mhjd=Modified HJD
         ep=epoch, epj=Julian epoch, epb=Besselian epoch
         lt=local time, ut=UT, ts=seconds since 1950-01-01
         now=current time, ang=fractional degrees
  otype: fd=FITS, dt=yyyy.mmdd, jd=Julian Date, mjd=Modified Julian Date
         hjd=Heliocentric Julian Date, mhjd=Modified HJD
         hr=hh:mm:ss, deg=dd:mm:ss, ang=fractional degrees
         ep=epoch, epj=Julian epoch, epb=Besselian epoch
         ts=seconds since 1950-01-01, tsu=Unix sec, tsi=IRAF sec
         gst=Greenwich Sidereal Time, lst=Local Sidereal Time
  @file: First one or two columns are in itype format
  ra dec sys:  Need for Heliocentric conversions
     -a: Append date to input file, if there is one
     -d: Print date without time
     -e: Print output as ET/TDT/TT converting from UT
     -f: Format for output number (C printf)
     -h hours: Longitude in hours, west positive
     -l degrees: Longitude in degrees, west positive
     -n: Number of decimal places in sec, epoch, JD
     -t: Print time without date
     -v: Verbose
$

2. Verbose Mode

Convert from fractional years to readable date in vigesimal format in verbose mode.
$ getdate -v ep2dt 1950.0
1950.00000 -> 1950.0101 12.0000000
$

3. Default Output Format

Convert from fractional year to Julian Date
$ getdate ep2jd 1950.0
2433283.00000
$

4. New FITS from Old

Convert from old FITS standard date to new (ISO) FITS standard date.
$ getdate fd2fd 05/09/99
1999-09-05
$

5. Julian Date to Sidereal Time

Get the Greenwich Mean Sidereal Time at a specific Julian Date
(Example from Jean Meeus' Astronomical Algorithms, page 84)
$  getdate jd2mst 2446895.5
13:10:46.367
$
Get the Apparent Sidereal Time at Greenwich at a specific Julian Date
$  getdate jd2gst 2446895.5
13:10:46.135
$
Get the Greenwich Mean Sidereal Time at a specific date and time
$  getdate fd2mst 1987-04-10T19:21:00
1987-04-10S08:34:57.090
$
To get the only the Greenwich Mean Sidereal Time at a specific date and time
$ getdate -t fd2mst 1987-04-10T19:21:00
08:34:57.090
$

Last updated 26 September 2006 by Doug Mink

Telescope Data Center [WCSTools Programs] [getdate]