MMTF Calibration Guide
Wavelength Calibration

Wavelength calibration involves solving the equation relating wavelength and plate spacing for the slope B and zero-point A:

`λ = A + B Zfine`

Once A and B are known, this equation yields the value of fine plate spacing (Zfine) necessary to observe the wavelength of interest.

A varies with time (possibly due to temperature changes) and with the parallelism setting. It must be calibrated at the beginning of the run and checked frequently using single, full-field images of rings. B (or dλ/dZ) depends on the coarse plate spacing Zcoarse and the interference order. However, it is stable and has been measured for 3 values of Zcoarse in each filter (see the table below).

The instrument scientist provides values of A and B to the astronomer at the beginning of a run. It is the astronomer's responsibility to track changes in A (due to, e.g., temperature drift).

Calibration Data

The table below has links to MMTF arc lamp spectra. These were taken by scanning the etalon spacing through somewhat more than 1 free spectral range (FSR): a "data sausage." The spectra are acquired using a small CCD subraster near the optical axis. This table also lists suggested lamps for doing wavelength calibration and parallelism tests, including whether it is internal or external ("Int/Ext") and good exposure times. The final column gives details about the etalon properties derived from these spectra, including values for B and FWHM and approximate Zfine ranges used to achieve a particular order.

Calibration Spectra
Filter ZC Lamp Int/Ext texp Z0 dZ nZ Spectra Parameter Table
5100 -2 Ne Int 15s 2800 15 120 plot table
+1 Ne Int 15s 2800 15 120 plot
+3 Ne Int 15s 1800 15 120 plot
5300 -2 Ne Int 15s 2000 15 130 plot table
+1 Ne Int 15s 2000 15 130 plot
+3 Ne Int 15s 2400 15 130 plot
6400 -2 Ne Ext 1s 1900 15 100 plot table
+1 Ne Ext 1s 1900 15 100 plot
3 Ne Ext 1s 1900 15 100 plot
6600 -2 Ne Ext 1s 2000 15 110 plot table
+1 Ne Ext 2s 2000 15 110 plot
+3 Ne Ext 2s 2000 15 110 plot
6800 -2 Ne Ext 1s 1700 15 120 plot table
+1 Ne Ext 3s 1400 15 110 plot
+3 Ne Ext 3s 1500 15 110 plot
7050 -2 Ar Int 1s 1800 15 100 plot table
+1 Ar Int 2s 1800 15 110 plot
+3 Ar Int 1s 1800 15 120 plot
8200 -2 Kr+Xe Int 1s 1800 15 110 plot table
+1 Kr+Xe Int 1s 1800 15 120 plot
+3 Kr+Xe Int 1s 1600 15 120 plot
9150 -2 Xe Int 1s 1500 15 120 plot table
+1 Xe Int 2s 1600 15 120 plot
+3 Xe Int 2s 1600 15 120 plot
Procedure to acquire a reference ring

During the afternoon preceding an MMTF run, the instrument scientist provides A and B to the observer for each filter. B comes from the calibration table above, and A from a data sausage (see the figure at right). A reference ring image must also be taken before each data sausage. We describe these procedures below.

A reference ring, taken by imaging an emission line
and running "ring" on the binned image.

1. IMPORTANT: This image should be taken immediately before or after a data sausage. The etalon should also be parallelized before any wavelength calibration proceeds.
2. Turn on the lamp suggested for the filter of interest (see table above).
3. Vary the etalon Zfine and take Snap exposures until a relatively strong emission-line ring appears in the field-of-view. The ring should be isolated from other lines, and its radius should be approximately halfway between the center and edge of the aperture.
4. Take a binned image of the emission-line ring, using the exposure time suggested in the table above. To minimize readout time, use the coarsest binning possible while maintaining an unsaturated image (preferably 8 x 8, but finer binning if necessary).
5. Give the number of this exposure, as well as the Zfine used, to the observer.
6. In a terminal window, check the spectrum by typing the following (fill in the proper exposure no. and filter central wavelength):
`% ring ccd0001 6600`
Procedure to acquire a "data sausage"

NOTE: If a data sausage for a given configuration (filter and coarse Z) has been acquired recently (since the MMTF was last removed), you may simply use "ringdrift" to find the appropriate change in A. It is safe to assume that B remains the same night-to-night.

A "data sausage" spectrum, taken by stepping the etalon spacing in small increments through approximately one free spectral range.

1. Running a well-sampled data sausage typically takes ~20-30 minutes; this is dominated by CCD readout time.
2. Turn on the arc lamp recommended in the table above for the filter of interest.
3. Before taking the data sausage, take a reference ring image as described above.
4. Turn on CCD subrasters by changing the ExpMode from Full to Subraster. When the subraster menu pops up, load the file defining the MMTF data sausage subrasters: mmtf_sausage.sub in the default path, /Users/imacs/Subrasters/. Click the Load button to load this subraster. REMEMBER: Set the SaveMode to Minimal to minimize readout time. Click Apply. Exit this window by clicking Done.
5. Ensure that CCD binning is set to 1x1, and that the exposure time is appropriate for the lamp you are using (the same exposure time as for the reference ring is fine).
6. Under the Script menu, click Create. In the pop-up window, select the Scan(seq) Mode. Set Z0 equal to the the lowest Zfine in the reference data sausage spectrum given in the table above. Set dZ (point spacing) to 15, and set nZ (number of points) to the value listed in the above table. The user should try to get 2 full orders, which is typically around nZ=120.
7. Save the etalon script.
8. To begin the data sausage, click Exec under the Script menu.
9. Once the data sausage has finished, type the following in a terminal window:
`% sausage [n0] [n0+nZ] 2`
where [n0] and [n0+nZ] are the beginning and ending frame values in the data sausage (leading zeros ignored) and the last number is the IMACS CCD chip. Always use chip 2, which is closest to the optical axis.
10. Output of sausage.

11. Sausage will display a spectrum, which you can compare to the one given in the table. It should have identical shape, but may be shifted. It will then attempt to obtain a calibration line based on your new sausage and pre-loaded data. ALWAYS check the final output plot from sausage, which will have a solid curve, representing the artificial spectrum that has been fit to your data and points representing the data from your sausage. If the curve appears to be a poor fit, calibration may have failed.

Sausage will also display messages to the terminal if it thinks the calibration has failed. Pay attention to these messages. You may need to reparallelize the plates and try again. Make sure that the correct filter is in place and the correct lamp is on. Check to ensure that the z coarse setting used on the etalon is what the output plot says is used. If these are all correct, you may try calibrating the sausage by hand (see below).
12. If you are satisfied with the fit generated by sausage, the A and B values should be entered into the appropriate fields of the MMTF wavelength calculator (WCALC). Make sure to also write them down in case of a computer failure!
Procedure to monitor the wavelength drift

Output of ringdrift.

During the afternoon preceding your run, the instrument scientist will acquire data sausages/links (see above) and reference ring images to determine the wavelength zero point (A) for each filter you plan to use. He/she will also provide the value of B (see also the table above). It is the observer's responsbility to track changes in A with time. We recommend checking A at least every 30 minutes at the beginning of the night, when the dome temperature changes rapidly.

Changes in A, and hence the values of fine plate spacing necessary to observe the wavelength of interest, are tracked using the MMTF online wavelength calculator (WCALC). To begin, enter the relevant information for your target into WCALC: the value of B provided by the instrument scientist, the wavelength of interest, and the object position with respect to the optical axis (which is approximately at the field center). Next, insert the reference A value into the Aref box, and click the button next to it. This will assign A = Aref and compute the value of Zfine when the reference data was taken.

To update A and Zfine, use the following procedure:

1. Take a binned exposure at the same Zfine setting and binning used for the reference image, using the same arc lamp. Let's call the new image ccd1159 and the reference image ccd1156, and assume that we are using the 6400 Å filter.
2. In a terminal window, type the following:
```% ring ccd1159 6400
% ringdrift 1156 1159
```
The resulting spectrum is shown at right.
3. Enter the change in A specified by ringdrift into the ΔA text window in WCALC. Press the "set A = Aref + dA and compute new Z" button.
4. Enter the new value of Zfine for the wavelength of interest into the IMACS observing computer.
5. Observe!
Calibrating a Sausage by Hand
1. This section assumes you have already taken a sausage by following the instructions in the above section.
2. type the following in a terminal window:
`% fitsausage [n0] [n0+nZ] 2`
where [n0] and [n0+nZ] are the beginning and ending frame values in the data sausage (leading zeros ignored) and the last number is the IMACS CCD chip. Always use chip 2, which is closest to the optical axis. Compare the resulting spectrum to the one given in the table, and make sure it is identical (there may be a small horizontal shift).
3. Copy the IRAF commands listed by the fitsausage output into an IRAF terminal window. Using the splot fitting routines, fit Lorentzian profiles to each of the emission lines. For a single line, do the following:
• type 'k' at the continuum level just to the left of the line, and 'l' at the same level to the right

For a doublet, the following procedure will fit two lines simultaneously:
• Type 'd' at the continuum level just to the left of the doublet and then 'd' again at the same level to the right.
• Move your mouse to the peak of the first line and type 'l'. Then, move to the second peak and type 'l' again. Finally, type 'q'.
• Type 'a' to fit all centroids, 'a' again to fit all widths, and 'y' to fit background.

The output after the line is fit will contain the centroid position for that line. If you have fit two lines simultaneously, you can view the properties of the next line by typing '+' or the previous line with '-'. To begin fitting a new line, type 'q' and then click your mouse anywhere on the screen to refresh the plot.
4. Create an ascii file (e.g. params.dat) with a new row for each emission line. The columns should be: 1 - wavelength, 2 - Z (centroid from splot), 3 - relative order. The wavelength and relative order can be obtained by looking at a reference data sausage from the table at the top of this page (under "Parameter Table"). Run FPSOLVE using the following syntax:
`% fpsolve 1 params.dat`
The output of this command will be the A and B parameters for the orders that you sampled. You should be aware of what order you will be operating in for the night, and what the corresponding B term should be. The RMS error in your calibration should be less than an angstrom. If it is too high, try removing one of the lines from your fit (it should be obvious which is contributing most to the error). Alternatively, go back and measure the line centroids more carefully.

Once you are satisfied with the fit, the A and B values should be entered into the appropriate fields of the MMTF wavelength calculator (WCALC). Make sure to also write them down in case of a computer failure!

NOTE: During normal operation sausage links are unnecessary - careful monitoring of the reference ring is sufficient. However, if the user is lost in wavelength space for some reason, a sausage link is a fast way of re-determining the wavelength zeropoint without performing a full data sausage.

For a sausage link, a bright, isolated (no blends) line should be used, which is as close as possible to the wavelength of interest for the observing run.

A "sausage link" spectrum, taken by stepping the etalon spacing
in small increments over the range of a single emission line.

1. Running a well-sampled sausage link typically takes ~5-10 minutes; this is about equal parts CCD readout time and line fitting.
2. Turn on the arc lamp recommended in the table above for the filter of interest.
3. Before taking the data sausage, take a reference ring image as described above.
4. Turn on CCD subrasters by changing the ExpMode from Full to Subraster. When the subraster menu pops up, load the file defining the MMTF data sausage subrasters: mmtf_sausage.sub in the default path, /Users/imacs/subrasters/. Click the Load button to load this subraster. REMEMBER: Set the SaveMode to Minimal to minimize readout time. Click Apply. Exit this window by clicking Done.
5. Ensure that CCD binning is set to 1x1, and that the exposure time is appropriate for the lamp you are using (the same exposure time as for the reference ring is fine).
6. Under the Script menu, click Create. In the pop-up window, select the Scan(seq) Mode. Set Z0 so that it is ~50 Zfine units lower than the location of the emission line used in the reference ring. Keep dZ at the default value of 20, and set nZ equal to ~10, or however long it takes to fully sample the emission line.
7. Save the etalon script.
8. To begin the sausage link, click Exec under the Script menu.
9. Once the sausage link has finished, type the following in a terminal window:
`% fitsausage 1 51 2`
where the first two numbers are the beginning and ending frame values in the sausage link (leading zeros ignored) and the last number is the IMACS CCD chip. Always use chip 2, which is closest to the optical axis.
10. Copy the IRAF commands listed by the fitsausage output into an IRAF terminal window. Using the splot fitting routines (e.g., 'k' and 'l' for a single-line fit, or 'd' and 'd' for a multi-line fit), fit a Lorentzian profile to the emission line.
11. Insert the wavelength and measured Zfine value of this emission line into the MMTF wavelength calculator (WCALC). Enter the subraster radius output by fitsausage. Enter the appropriate value of B from the table above (for the given filter, Zcoarse value, and interference order corresponding to the emission line that was measured). Click the compute A button, and note the resulting value of A. Give this value to the observer, and copy it to the Aref box in WCALC.
Parallelism

Parallelism is the process by which the two etalon plates are made parallel to one another. If the plates are not optimally aligned, the transmission profile will be broad and/or asymmetric. This diminishes the light transmitted in the core of the profile, and thus the system throughput (for an emission-line source) and the instrumental resolution. It is thus crucial that proper parallelism is achieved and maintained throughout the run.

Parallelism is achieved and maintained through a capacitor and piezo-electric feedback system. See this page for a brief description.

The parallelism is optimized by the instrument scientist prior to the run. However, the parallelism depends on two variables: (1) wavelength, due to changes in the behavior of the multi-layer reflection coating with wavelength; and (2) the rotation angle of the etalon, probably due to gravity-induced sag of the plates that remains uncorrected by the system feedback mechanism. Rotation is inevitable during the course of a run, as the IMACS camera rotates to maintain a constant orientation of the CCD mosaic with respect to the sky. Fortunately, the rotation effect is reproducible as is outlined below. The observer should check the parallelism roughly every half hour, after every large telescope movement, and when the filter is changed.

There are several methods for achieving parallel plates. We have developed a simple procedure that relys on scanning the transmitted image in the radial coordinate to prodcue a spectrum. The plate alignment is scanned along both axes of movement using a (M x N) grid of [Xfine, Yfine]. At each value of [Xfine, Yfine], an image is taken of an emission line. Each image is then azimuthally averaged to create an emission-line spectrum. The profiles of emission features are compared by eye (and, where possible, with line fits) to find the narrowest and most symmetric profile. This procedure is discussed below, followed by a separate procedure for quickly determining the drift in X and Y with gravity angle.

Parallelism Data

The table below has parallelism values that have worked in the past for various filter and Zc arrangements. Use of these values will bring the etalon close to parallel but will still require a careful parallelization using the procedure below.

Initial Plate Spacings
Filter Zc=-2 Zc=+1 Zc=+3
X Y X Y X Y
5100 Å 1990 2090 2025 2125 2025 2100
5300 Å 1995 2075 2000 2075 2015 2075
6400 Å 2010 2115 2025 2100 2035 2035
6600 Å 2020 2125 2025 2100 2050 2100
6815 Å 2050 2170 2100 2175 2100 2160
7050 Å 2105 2225 2150 2225 2120 2175
8200 Å 2240 2305 2275 2250 2275 2250
9150 Å 2300 2375 2300 2335 2315 2300
Procedure for Parallelizing

Here is a detailed procedure:

The output of ringplot. The optimal parallelism values are [Xfine, Yfine] ~ [2150, 2275], as evidenced by the symmetric peak at these values and small width (re: the rough sigma values in the upper right-hand corners).

1. Choose a lamp appropriate for the filter being used. (See this table for options.)
2. If this is the first time during the run: With the lamp on, adjust the fine etalon spacing Zfine and take snapshot images until you observe a bright emission line well separated from other lines in the field of view. The ring should be isolated from other lines, and its radius should be approximately halfway between the center and edge of the aperture. If a single, well-separated emission line is not present, a doublet will serve.

Warning: Using a double or blended line can make it VERY difficult to parallelize. Always use a single line if possible (you may have to try other lamps).

3. If this is not the first time: Select the same Zfine value used for previous parallelism tests in this filter.
4. In the Script menu, click Create to bring up the script creation window. Choose Parallelize and enter the starting [Xfine, Yfine] (x, y), step size in X and Yfine (dx, dy), and number of steps in X and Yfine (nx, ny). Assuming the image does not saturate, use 8x8 on-chip binning to minimize the readout time. Click Exec to bring up the script execution window, and run the loop.
5. When the script has finished, create the spectra by typing the following in a terminal:
```% ringbatch 1 9 6600 --fast [--ms 1]
```
where 1 and 9 are the starting and ending frame numbers (leading zeros ignored) and 6600 is the central wavelength of the filter. The '--fast' option is good for parallelism tests, as it decreases the pixel sampling rate and thus increases the processing speed. For noisy data (faint lines), the '--ms 1' option smooths the spectrum using a median filter of width 1 Å.
6. Plot the spectra in a grid of [Xfine, Yfine] values by running the following:
```% ringplot 1 9
```
To do a Voigt fit of the profile peak, add --fit to the end of the command.
7. Search for the [Xfine, Yfine] that optimizes the etalon transmission profile. The optimal profile will be peaky (at or near the peak flux), narrow, and symmetric.
8. If necessary, take another grid of spectra with different starting and ending values of [Xfine, Yfine] until the optimal parallelism settings are found.
9. Enter the chosen [Xfine, Yfine] pair into the IMACS software.
Procedure for Calculating Drift in X and Y Due to Change in Gravity Angle

The output of xydrift. The gravity angle of the reference and new frames are shown in orange and blue, respectively. The change in X and Y are calculated to be -10.5 and -8.3. The "Danger Zone", marked in red, is avoided in this instance.

Once properly parallelized, the etalon plates should remain parallel for all time. However, there is a fairly strong correlation between the gravity angle and the plate spacing, suggesting that the glass is sagging under gravity. We advise observers to operate at a constant gravity angle, nudging IMACS back to Θgrav ~ 0° before each exposure, as outlined in the following procedure . However, if you do not wish to use this method of observing, the following will be necessary.

Any time the telescope moves, whether a large motion across the sky or small motions due to tracking, the parallelism should be checked. Luckily, the changes in X and Y as a function of gravity angle are largely reproducable and thus a lookup table can be used to predict how X and Y will change.

Using xydrift, the change in gravity angle between two exposures can be converted to a change in X and Y. The proper syntax to run xydrift is:

```% xydrift 13 25
```

This will calculate the change in X and Y, assuming that the etalon was parallel for exposure 13. Once the proper offsets to X and Y have been applied, the observer must also check the wavelength calibration using ringdrift, since a change in X and Y always corresponds to a change in Z.

Warning: For reasons which remain unclear, the parallelism values become extremely difficult to predict for gravity angles between -120 and -20, a region dubbed the danger zone. If you are currently working in the danger zone, you should parallelize carefully using the full-blown procedure outlined above.

Flat Fielding

It is recommended that observers take a series of dome flats at approximately each wavelength in which they observe. Because of drift in the zero-point of the λ-Z relation, observers should recompute the appropriate Z value for the wavelengths of interest when taking flats. Using the Quartz High lamp, exposure times of 3-5 seconds should be sufficient (depending on the filter).

In the case of charge shuffling / frequency switching, it is recommended that flats be taken in charge shuffling / frequency switching mode, adjusting the exposure times appropriately.

Photometry

Observers should observe flux standards at each wavelength in which science data is taken. Because of drift in the zero-point of the λ-Z relation, observers should recompute the appropriate Z value for the wavelengths of interest when taking flats. The observer should be aware of where in the field of view the calibration star is placed, since wavelength changes with distance from the optical axis. Exposure times of approximately 60 seconds should be appropriate for a star of magnitude 14-15.

Spectrophotometric Standards

A good database of Southern spectrophotometric standards resides at ESO. Because of the narrow bandpasses involved, care should be exercised in choosing a standard when the wavelengths of interest are near deep stellar absorption lines.

Emission-Line Standards

Emission-line flux standards are useful when observing in the 6600 Å and 6815 Å filters. See Tables 3-5 of Dopita & Hua (1997, ApJS, 108, 515) for a list of planetary nebulae that can serve as emission-line flux standards.

Optical Axis

There is a wavelength gradient in the MMTF due to the angle at which rays pass through the etalon. This gradient is circularly symmetric aboout the optical axis (the projection of the MMTF normal axis onto the CCD). The optical axis is in the center of the field of view, but shifts slightly from run to run (due to the re-mounting of the IMACS CCD) and must be re-measured. During a particular run, it is constant within a few pixels as long as the etalon stays parallel.

To find the optical axis, we use the fact that there is a faint ghost reflection between the MMTF and the CCD. Use the following procedure:

1. Make sure the etalon is properly parallelized.
2. Insert into the beam the MMTF pinhole mask (ID #2049).
3. Take a quartz lamp (high) exposure with 1x1 binning. The exposure must be long enough that the 8 "stars" in the upper half of the field of view have ~ 40,000 counts at their peak. At 6600Å this corresponds to an exposure time of ~ 15 seconds.
4. Run the "optaxis" command with the following syntax:
```% optaxis input_file
```
where "input_file" is the prefix name of your exposure (e.g. ift0001). The first page of the output plot is shown below. Record the optical axis location in chip coordinates. The coordinates are with reference to pixel [1,1] of the chip listed. Note that the optical axis can be located between chips, as indicated by negative coordinates or coordinates greater than 2048 (4096) on the X (Y) axis.
5. Put the optical axis location in chip coordinates into the file optaxis.dat, a copy of which should reside in each data directory for analysis. The contents should look as follows:
```Optical axis location
chip#   X(pix)  Y(pix)
5       6       4098
```

The output of optaxis. The position of the optical axis in CCD coordinates is listed in the upper right-hand corner.