Airmass Calculations

program names, file names
variable names
prompts, commands, program code


Contents:

Overview

Airmass is a geometric factor indicating the angular distance of an object from the zenith (this is called the zenith angle). The further from zenith, the higher the airmass -- in fact, the airmass is the cosecant of the zenith angle. An object at the zenith has an airmass of 1, and the airmass of the horizon is infinite. A higher airmass means that you are looking through more atmosphere. Generally speaking, we try to time our observations such that we are observing at a low airmass (this minimizes atmospheric effects). So it is necessary to know in advance when an object will have a low airmass. Knowing the airmass is also necessary for flux calibration (eg., jyperadu).


Airmass calculation: amprofiles

The calculation of airmasses requires that one have the coordinates of the object(s) in question. Ideally, these coordinates should be precessed to the epoch of the observation. This can be done with the pmprecess program. Let's say that we know the B1950 coordinates of HD 162208 to be 17h 46m 20.7s, +39° 59' 40'', with proper motions of -0.0018 (RA) and +0.122 (dec) arcsec/year. If we want to precess these coordinates to an observation epoch of June 1993, we'd do something like the following:
IDLprompt> pmprecess, ten(17, 46, 20.7) * 15., ten(39, 59, 40), $ IDLprompt> 1950, 1993.5, -0.0018, +0.122, /b1950, /print
The ten function is used to convert from sexigesimal to decimal, and the right ascention coordinates are multiplied by 15. to render them in degrees. The third and fourth parameters are the coordinate and observation epochs, respectively. The fifth and sixth parameters are the proper motions in arcsec/year, and they may be omitted if you don't have the proper motions. Since we are precessing B1950 coordinates, it is necessary to set the b1950 keyword -- there is no corresponding j2000 keyword (pmprecess assumes J2000 coordinates). Finally, set the print keyword so that pmprecess will print the following results to the command window:
Equinox (1993.50): 17 47 45.73 +39 58 56.1

The amprofiles program is used for computing the airmass of one or more objects as a function of time. The first order of business is to edit the ~/idlpro/amprofiles.txt. This file needs to contain the latitude and longitude of the observatory, the date of the observation, whether or not daylight savings time is in effect, the times of sunrise and sunset (The Old Farmer's Almanac is a good place to look these up), and the precessed coordinates of the objects to be observed (I wouldn't bother with standard stars). The file for an observing run to WIRO at the end of April looks something like this. (Here's a quick reference table for the coordinates of WIRO and MLOF:

observatory WIRO MLOF
latitude (degrees N of equator) 41.09833 32.44166
longitude (degrees W of prime meridian) 105.9766 110.79166
And bear in mind that Arizona doesn't participate in Daylight Savings Time.)

amprofiles computes the airmass as a function of time for all the objects listed in ~/idlpro/amprofiles.txt for a time interval beginning eight hours prior to local midnight, and lasting until eight hours after local midnight. This is done with the following command:
IDLprompt> amprofiles, times, airmasses, names, pd, coords
After runtime, coords will be a 2-D array of the precessed coordinates, names will be a 1-D array of character strings corresponding to the objects' names, and pd will be an array of information needed by the plotting program (see below). times will be a 1-D array of times -- these times will be evenly spaced from 0 to 16, serving as abscissa values for the computed airmasses. The default resolution for this parameter is 4.8 minutes (200 time steps in 16 hours), but this resolution may be controlled with the ntu keyword: ntu specifies the number of time steps -- a higher value of ntu gives a higher resolution. Finally, airmasses will be a Nxntu array, where N is the number of objects listed in ~/idlpro/amprofiles.txt.

amprofiles doesn't generate plots, but it does print some useful information to the command window:
34.0000 days after the vernal equinox. Airmass plots begin at 6.26667 hours LST = 17.0651 local clock time. LST at local midnight (NOT clock midnight) = 14.2667. Sunset at 7.20156 hours LST, sunrise at 20.7016 hours LST.
This tells us that the date of the observation is 34 days after the vernal equinox, that time interval of the plots will begin at roughly 6h 16m local sidereal time (LST) (which is just past 5:00 PM on the clock), that local midnight occurs at around 14h 16m, and that sunset and sunrise occur at around 7h 12m LST and 20h 42m LST, respectively.

The particular use of the variables created by amprofiles will become apparent in a moment, but let's go ahead and take a quick look at how the data in these variables are formatted. The numbers in airmasses may be considered to be a collection of profiles, each profile giving the airmass of an object as a fuction of time (the time interval specified by times). The following command may be used to display the airmass profile of the first object on the list:
IDLprompt> plot, times , airmasses(0,*), xrange=[0,16], xstyle=1
(Setting the xrange and xstyle keywords in the call to the IDL program plot restricts the abscissa values to the values in times; otherwise IDL would expand the abscissa interval, leaving part of the plot blank.) The resulting plot is shown below:

[A plot of airmass 
as a function of time]

These profiles are arbitrarily trucated at an airmass of 5, so that the plots don't try to display infinite airmasses. The plot shows that the airmass of this particular object minimizes to around 1.1 airmasses around 13 hours into the plot interval. Therefore, this object would best be observed in the pre-dawn hours.


Generating plots: amplots

The output of amprofiles is used as input to amplots. Let's just go ahead and look at an example:
IDLprompt> amplots, times, airmasses, pd, 1.5, names=names, $ IDLprompt> timestr = '5pm MDT 26 April WIRO'
The following is the generated plot:

[A plot of airmass 
v. time for several objects]

The plot shows the times during which the different objects have airmasses less than 1.5 (specified by the fourth positional parameter in the call to amprofiles, whose default value is 2, if omitted). Some of the objects (ie., M2-9, M3-28, M2-46) never have airmasses less than 1.5, and so those lines do not appear on the plot. Most of the objects here happen to be Galactic objects, so they're all up at the same time, the end of the night in this case. The vertical lines, as advertised, indicate the times of sunset, local midnight, and sunrise.

Running amplots again with the airmass limit set higher than 1.5 would make the lines longer, as the objects will have higher airmasses for longer lengths of time. The character string given as timestr was composed using from the printed output of amprofiles (ie., the clock time at which the airmass plots begin). Finally, the output of amplots can be sent to a Postscript file using the ps and bigps keywords (see the documentation to amplots).


Carl Welch