| setjd | astutil | setjd |
setjd -- set various Julian dates in image headers
setjd images
Setjd computes the geocentric, heliocentric, and integer local Julian dates from information given in the headers of the input list of images. This information may simply be listed or the values may be added or modified in the image headers. Only those values which have a keyword specified are computed, printed, and entered in the images. Thus, one need not compute all values and the dependent image header parameters required for computing them need not be present. For example, if the coordinates of the observation are not available one should set the hjd parameter to an empty string.
Often the date and time of observation are recorded either at the beginning or the end of an exposure. To compute the Julian dates at the midpoint of the exposure the exposure keyword is specified. A negative sign preceding the keyword name defines correcting from the end of the exposure otherwise the correction is from the beginning of the exposure. The exposure time must be in seconds and there is no allowance made for exposures which are interrupted. See also the task setairmass which may be used to compute a universal time midexposure value.
The date and time of observations should be given either in universal time. However, if they are given in local standard time (there is no provisions for daylight savings times) the utdate and uttime parameters may be used. Conversion between local and universal times, as well as the computation of the local integer date, requires the time zone in (positive) hours behind Greenwich or (negative) hours ahead of Greenwich. This information is determined from the observatory at which the observations were made. If the observatory is specified in the image header under the keyword OBSERVAT with a value which has an entry in the NOAO, local, or user observatory database then the value from the database is used. This is the safest way since the observatory is tied to the actual image. Otherwise, the observatory parameter defines the observatory. The special value "observatory" allows defining a default observatory with an environment variable or the observatory task. Explicitly use the parameter observatory.timezone use the value "obspars". For more information see help under observatory .
The heliocentric Julian date is computed by defining a keyword for this value and also defining the keywords for the right ascension (in hours) and declination (in degrees). An optional epoch keyword may be used if the RA and DEC are not for the observation epoch.
The local integer Julian day number is the Julian date which begins at local noon. Thus, all observations made during a night will have the same day number. This day number may be useful in grouping observations by nights. Note that in some time zones the UT date of observation may also be constant over a night.
Among the uses for this task is to define keywords to be used by the task refspectra . In particular, the exposure midpoint geocentric Julian date makes a good sort parameter and the local Julian day number makes a good group parameter.
1. Compute all the Julian date quantities for 4 arc exposures with header parameters given below.
demoarc1:
OBSERVAT= 'KPNO ' / observatory
EXPTIME = 60. / actual integration time
DATE-OBS= '26/11/91 ' / date (dd/mm/yy) of obs.
UT = '12:11:30.00 ' / universal time
RA = '06:37:02.00 ' / right ascension
DEC = '06:09:03.00 ' / declination
EPOCH = 1991.9 / epoch of ra and dec
demoarc2:
OBSERVAT= 'KPNO ' / observatory
EXPTIME = 60. / actual integration time
DATE-OBS= '26/11/91 ' / date (dd/mm/yy) of obs.
UT = '12:41:30.00 ' / universal time
RA = '06:37:02.00 ' / right ascension
DEC = '06:09:03.00 ' / declination
EPOCH = 1991.9 / epoch of ra and dec
demoarc3:
OBSERVAT= 'CTIO ' / observatory
EXPTIME = 60. / actual integration time
DATE-OBS= '27/11/91 ' / date (dd/mm/yy) of obs.
UT = '11:11:30.00 ' / universal time
RA = '06:37:02.00 ' / right ascension
DEC = '06:09:03.00 ' / declination
EPOCH = 1991.9 / epoch of ra and dec
demoarc4:
OBSERVAT= 'CTIO ' / observatory
EXPTIME = 60. / actual integration time
DATE-OBS= '27/11/91 ' / date (dd/mm/yy) of obs.
UT = '12:21:30.00 ' / universal time
RA = '06:37:02.00 ' / right ascension
DEC = '06:09:03.00 ' / declination
EPOCH = 1991.9 / epoch of ra and dec
cl> setjd demoarc?.imh
# SETJD: Observatory parameters for Kitt Peak ...
# Image JD HJD LOCALJD
demoarc1.imh 2448587.0083 2448587.0127 2448586
demoarc2.imh 2448587.0292 2448587.0336 2448586
# SETJD: Observatory parameters for Cerro Tololo ...
demoarc3.imh 2448587.9667 2448587.9711 2448587
demoarc4.imh 2448588.0153 2448588.0197 2448587
Note the use of the observatory parameter to switch observatories and the local Julian day number which is constant over a night even though the Julian date may change during the observations.
2. To compute only the geocentric Julian date from the "DATE" and "TIME" keywords in an image,
cl> setjd obs1 date=date time=time exp="" hjd="" ljd=""
setairmass, hedit, refspectra, observatory