Megan M. Kiminki
(formerly Megan M. Bagley)
Aperture Extraction in IRAF: Apall
Here's a quick reference on using IRAF's apall task. These notes assume that you have some familiarity with IRAF and the process of reducing spectra.
Apall has many parameters. For maximum interactivity the first time through, set all the yes/no questions on the first page to yes. Other parameters you may want to set, either before running or during an interactive run, are:
- line—Defaults to the center of the image. If you're looking at something like an emission-line galaxy that has a very weak continuum, you may want to center this on a bright emission line instead.
- nsum—Again, with a faint source, you may need to increase this to sum over more lines.
- lower and upper—Adjust according to the width of your aperture.
- nfind—If you expect to find more than one aperture (e.g., you're doing echelle spectroscopy) set this to the number of expected apertures.
- backgro—This must be set to "fit" for the program to do background subtraction.
- t_func and t_order and t_niter—These are some of the key trace fitting parameters: the function to be used (I frequently use a cubic spline or "spline3"); the order of the function (varies widely depending on your data); and the number of times to reject outliers and refit.
- b_sampl—The region (relative to the center of the aperture) over which to fit the background.
- b_func—The order of the function to use when fitting the background. I often use 2, for a straight line with a slope.
After you hit enter for a few questions, apall enters interactive mode. You will see a cut across your 2D spectrum, with apertures automatically identified. (If things look really weird, you might have the dispersion axis set incorrectly in apextract.) Useful commands at this stage include:
- "n" makes a new aperture centered on the cursor.
- "l" sets the lower limit of your latest aperture.
- "u" sets the upper limit of your latest aperture.
- "b" puts you in background mode, where you can use "w" "a" to zoom out and "w" "e" "e" to zoom back in as usual in IRAF. "z" deletes an existing background region, "s" in two places sets the boundaries of a new background region, and "f" applies the changes and shows you a new fit. You can also adjust the fitting parameters as needed using colon commands. Press "q" to exit background mode.
- "q"in the main window (outside of background mode) exits to the next step.
Next, apall traces the aperture and asks you to confirm the fit. Ideally, there is a lovely curve that is relatively easy to fit. Delete any outlying points with "d", then hit "f" to see the new fit. If the trace is so ugly that no pattern is visible, try fitting a horizonal line. When satisfied, hit "q" to exit the trace.