aboutsummaryrefslogtreecommitdiff
path: root/noao/astutil/doc/setairmass.hlp
blob: bbb1cbb84612c0e9ee1e66b415e87d9124518009 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
.help setairmass Nov00 astutil
.ih
NAME
setairmass -- update image headers with the effective airmass 
.ih
USAGE
setairmass images
.ih
PARAMETERS
.ls images
The list of images for which to calculate the airmass.  The image headers may
optionally be updated with the airmass and the mid-UT of the exposure.
.le
.ls observatory = ")_.observatory"
Observatory for which airmasses are to be computed if the observatory is not
specified in the image header by the keyword OBSERVAT. The default is a
redirection to look in the parameters for the parent package for a value. The
observatory may be one of the observatories in the observatory database,
"observatory" to select the observatory defined by the environment variable
"observatory" or the parameter \fBobservatory.observatory\fR, or "obspars" to
select the current parameters set in the \fBobservatory\fR task. See help for
\fBobservatory\fR for additional information. If the input consists of images
then the observatory is defined by the OBSERVAT keyword if present.
.le
.ls intype = "beginning"
The time stamp of the observation as recorded at the telescope for the time
dependent header keywords.  The choices are the "beginning", "middle" or "end"
of the observation.
.le
.ls outtype = "effective"
The output time stamp desired for the airmass. The choices are the "effective"
airmass, or the airmass at the "beginning", "middle" or "end" of the
observation.
.le
.ls ra = "ra"
The name of the keyword that contains the right ascension. The right ascension
is assumed to be in hours unless ra is one of the standard CRVALn keywords in
which case it is assumed to be in degrees.
.le
.ls dec = "dec"
The name of the keyword that contains the declination in degrees.
.le
.ls equinox = "epoch"
The name of the keyword that contains the equinox of the right ascension and
declination coordinates in years.
.le
.ls st = "st"
The name of the keyword containing the sidereal time in hours. 
.le
.ls ut = "ut"
The name of the keyword containing the ut time.  This keyword can either
be in date plus time format or in hours.  Note that this allows setting
both the "date-obs" and "ut".  If no time is found then
a time of 0hrs is used.
.le
.ls date = "date-obs"
The name of the keyword that contains the UT date of the observation. The
format should be `DD/MM/YY' (old FITS format), YYYY-MM-DD (new FITS format),
or YYYY-MM-DDTHH:MM:SS (new FITS format with time).  If there is a time
and no time is found in the ut keyword then it is used for the ut.
.le
.ls exposure = "exptime"
The name of the keyword that contains the exposure time (in seconds) of the
image.
.le
.ls airmass = "airmass"
The name of the output keyword that will receive the computed airmass.
.le
.ls utmiddle = "utmiddle"
The name of the output keyword that will receive the universal time for
the middle of the observation.  The format of the keyword will be the same
as that specifying the universal time.
.le
.ls scale = 750.0
The atmospheric scale height.
.le
.ls show = yes
Print the airmasses and mid-UT's for each image?
.le
.ls update = yes
Update the image headers with the airmasses and the mid-UT's?
.le
.ls override = yes
If updating the image headers, override values that were previously recorded ?
.le

.ih
DESCRIPTION

SETAIRMASS will calculate the effective airmass of an astronomical image, as
described below under "ALGORITHMS".  The task requires the instantaneous
zenith distance at the beginning, middle and end of the exposure. These are
calculated using the right ascension, declination, and equinox as well as the
sidereal time, exposure time, UT date, and observatory from the image header.
If the observatory is not available in the image header under the keyword
OBSERVAT, the observatory is defined by the \fIobservatory\fR parameter. See
help for \fIobservatory\fR for further information.

The right ascension and declination will be precessed from the given equinox to
the date of observation. The name of the right ascension, declination, equinox,
sidereal time, ut time, exposure time, and date keywords can be specified as
parameters. These keywords should express the right ascension in hours,
the declination in degrees, the equinox in years, the sidereal time in hours,
the universal time in hours, the exposure time in seconds, and the date in
FITS format. If any of the required keywords are missing from the image
headers, they can be added using the hedit or asthedit tasks.  Note that
the universal time keyword may be in either a date plus time format or
in hours and any output middle universal time will be in the same format.

Before using this task, you will need to know the "time stamp" of the time
varying header quantities (e.g. sidereal time).  Do the recorded values
represent the beginning, the middle or the end of the exposure ? This should
be set in the \fBintype\fR parameter.

If for some reason the effective airmass is not desired, the value of the
airmass at the beginning, middle or end of the exposure can be recorded in the
header keyword specified by the \fIairmass\fR parameter. The \fBshow\fR
parameter can be used to control the output to the terminal. The \fBupdate\fR
and \fBoverride\fR parameters control the header keyword output.

SETAIRMASS will also calculate the universal time of the middle of the exposure
and place the value in the header keyword specified by the \fIutmiddle\fR
parameter.  This assumes that the value for the UT is in the date keyword
or ut keyword, with the same time stamp as the sidereal time. The
mid-observation UT is useful for interpolating calibration arc dispersion
solutions using REFSPECTRA, especially when the exposure time is
long.

.ih
ALGORITHMS
The mean airmass is calculated uses the formula described in "Some
Factors Affecting the Accuracy of Stellar Photometry with CCDs" by P.
Stetson, DAO preprint, September 1988.  This simple formula is:

.nf
	    AM (eff) = [AM (beginning) + 4*AM (middle) + AM (end)] / 6
.fi

and is derived by using Simpson's 1/3 rule to approximate the integral
that represents the mean airmass.

The beginning, middle and end airmasses are calculated using the
relation between airmass and elevation (or zenith distance) in John
Ball's book on Algorithms for the HP-45:

.nf
	    AM = sqrt (x**2 + 2*scale + 1) - x, where

	     x = scale * sin(elevation) = scale * cos(ZD)
.fi

The atmospheric scaling parameter is \fIscale\fR (see "Astrophysical
Quantities" by Allen, 1973 p.125,133).

.ih
KEYWORDS
The input keywords are:
.ls OBSERVAT
Observatory at which the data was taken.  If absent the observatory is
determined using the \fIobservatory\fR parameter.
.le
.ls \fIra\fR
Right ascension in hours at the beginning, middle, or end of the observation.
If ra is one of the CRVALn keywords it is assumed to be in degrees.
.le
.ls \fIdec\fR
Declination in degrees at the beginning, middle, or end of the observation.
.le
.ls \fIequinox\fR
The equinox of the coordinates.  The right ascension and declination will
be precessed from this epoch to the date of the observation before being
used.
.le
.ls \fIst\fR
Sidereal time in hours at the beginning, middle, or end of the observation.
.le
.ls \fIut\fR
Universal time in hours at the beginning, middle, or end of the observation.
This may be in either date plus time format or just in hours.  
.le
.ls \fIdate\fR
The value of the date parameter is the keyword name to be used for the date of
the observation.  The date must be in either the old or new FITS format.
.le
.ls \fIexposure\fR
The value of the exposure parameter is the keyword name to be used for the
exposure time in seconds.
.le

The output keywords are:
.ls \fIairmass\fR
The value of the airmass parameter is the keyword name to be used for
the computed airmass at either the beginning, middle, or end of the
exposure, or for the weighted effective value over the exposure.
.le
.ls \fIutmiddle\fR
The value of the utmiddle parameter is the keyword name to be used for
the universal time at the middle of the exposure.
.le

.ih
EXAMPLES

1. Calculate the effective airmass of the IRAF test picture, dev$pix.

.nf
    cl> setairmass dev$pix exposure=itime update-
.fi

Note that the test picture does not have the correct coordinate epoch
listed in its header, so no precession will be performed. 

2. Calculate the effective airmass of the IRAF test picture dev$ypix in two
ways.

.nf
    cl> setairmass dev$ypix exposure=itime update-

    cl> setairmass dev$ypix ra=crval1 dec=crval2 equinox=equinox \
        exposure=itime update-
.fi

Note the first way gives the same results as example 1. The second way
uses the J2000 equatorial system rather then the ra and dec at the time
of observation.

.ih
REVISIONS
.ls SETAIRMASS V2.11.4
The ut keyword now has precedence over any time in the date keyword
and it can be either date plus time or hours.
.le
.ls SETAIRMASS V2.11.3
The right ascension, declination, equinox, st, and ut keywords were made 
parameters rather than being hard wired.
.le
.ls SETAIRMASS V2.11.2
Y2K update: This task was updated to use the new FITS date format.
.le
.ih
SEE ALSO
airmass, hedit, refspectra, observatory
.endhelp