waqas bhatti / notes / reducing apo dis spectra with iraf

General Tips

The canonical references for reducing long-slit spectra in IRAF are below:

Some general information:

Reducing APO Spectra in IRAF

CCD processing steps

Spectrum extraction

Wavelength calibration

Looking at the spectrum using splot

Use splot to look at the final spectrum:

IRAF> splot [name of output object spectrum file]

The following splot commands may be useful:

a = autoexpand between cursor positions
d = deblend several lines by fitting
c = clear and redraw plot
e = equivalent width, integrated flux, and line center between cursor positions
k = profile fit to one line between cursor positions
m = mean, RMS, and SNR in selected region
o = next image will be overplotted
g = get the next image to plot (use in combination with o to overplot two spectra)
s = smooth using boxcar
t = fit continuum (can subtract/normalize, etc)
w = use a custom view window (hit e to mark one corner, then e again to mark the other corner of the window)
( = look at previous spectrum in image
) = look at next spectrum in image
[space] = coordinates and flux at position

When using deblending, mark the continuum first by hitting d on both sides of the lines in question. Then mark the centers of the lines and the line fit type by hitting g (Gaussian), l (Lorentzian), or v (Voigt) at the centers of each of the lines in question. After marking the lines type q to go on to the next step of selecting what to fit. The first question is whether to use the marked positions with f for fixed, fit a single position (the relative separations will be preserved) with s, or fit all the centers independently with a. Use a. The last question is whether to use the continuum entered or fit it simultaneously with the profiles. Hit y to fit the continuum. The deblended fits will then be shown. Use + or - to scroll through the different lines and see their centers, flux values, equivalent widths, and FWHMs.

Flux calibration

Continuum subtraction (optional)

To subtract the continuum from the spectra and normalize them, use the continuum function:

continuum [input spectrum] output=[output spectrum]

To continuum-subtract the sky background as well, use bands=* in the parameters for continuum.