Where to find manuals

The best place to look for manuals is the IRAF documentation site. The
manuals on this site are in zipped (.Z) postscript format (after you
download them, unpack them with the unix "uncompress" command).  More
specifically, go to the spectroscopy manual page and get the first two
manuals describing general CCD reductions and reductions of
(long-)slit spectra.

Get the data

See specific instructions on this...

Types of Frames

Object frames
Bias frames 
Flat-field frames
Arc lamp frames

Getting Organized

check out the data files and catalog them

      IMHEAD <filename> to see the object name and the data type

check out the processing status

      CCDLIS <filename> to see processing steps already carried out

2-D Processing Flow Chart

process bias frames

      CCDPROC        subtract overscan, trim
      ZEROCOMBINE    average => bias.imh

process flat-field frames

      CCDPROC         subtract overscan, trim, subtract bias
      FLATCOMBINE     average => flat.imh
      RESPONSE        normalize to unit mean => bf.imh (balance factor)

process object frames

      CCDPROC         subtract overscan, trip, subtract bias, divide by b.f.
      
subtract the sky (if desired)

      BACKGROUND      fit and subtract sky spectrum, column by column
                      to produce a background-subtracted frame

extract spectra 

      APALL           extract 1-D spectra of objects (subtract sky on the
                      fly, if not already done)

      APALL           extract spectra of arc lamps from same region
                      as coresponding object; use the command below

apall <input> out=<output> ref=<reference> trace- recen- back- intera-

check spectra for cosmic rays, clean them mannually, and re-extract

      IMEDIT          edit 2-D spectra to clean cosmic rays that were 
                      not rejected by the extraction or sky subtraction
                      tasks.

1-D Processing Flow Chart

derive and apply wavelength calibration

Before even starting on the wavelength calibraiton, one should identify 
the lines in the spectrum of the arc lamp. This is not always an easy task.
Observatories have line identification charts and line lists that are 
needed fot this step. For the specific grating setting and arc lamp used for 
your practice data, here are line identification charts for strong lines
and weak lines separately. The list of lines is also avaialble in a file 
in an IRAF-readable format. IRAF has its own built-in database of line
lists. These are stored in data files in the directory linelists$. You
can get to it with the command  cd linelists$ to examine the contents and 
see what line lists are available.

      IDENTIFY        identify the emission lines in the first arc spectrum
                      and fit a polynomical to the wavelength-pixel relation
                      to get a "wavelength solution"

      REIDENTIFY      once you have made the line identifications in the 
                      first arc spectrum, you can repeat the procedure
                      automatically for other arc spectra, using the first
                      one as a reference

      HEDIT           edit the headers of the data files and insert reference
                      information about the wavelength solution (although 
                      the IRAF manual suggests a number of ways of doing this
                      the one described here is the most straightforward)

      DISPCOR         aply the wavelength solution to the spectra
                      see cautionary note in detailed instructions

derive and apply flux calibration

For all of the task described below, IRAF uses its extensive database of 
calibration data. The database resides in the directory onedstds$. At the 
top level of this directory one can find tables giving the atmospheric 
extinction as a function of wavelength at various observatories. Examples
are ctioextinct.dat and kpnoextinct.dat, which are plotted here. Under 
onedstds$ there are many subdirectories with tables of standard star fluxes 
vs wavelength (sampled coarsely, at intervals of 40-80 A). Examples of 
two such tabulated spectra are plotted here. The task standard will need
to make use of these tables. 

      SETAIRMASS      find the airmass in the middle of the exposure and 
                      write it into the header

      STANDARD        break up the observed spectrum of the standard star
                      into small windows (40-80 A wide) and tabulate the 
                      observed counts and nominal flux (or AB magnitude);
                      extinction in the Earth's atmosphere is taken into
                      account

      SENSFUNC        use the table derived by standard, above, to construct
                      the coarsely-sampled sensitivity function (for each
                      of the windows) and fit it; an example of the resulting
                      fit to the sensitivity function (OB-AB) is shown here.

      CALIBRATE       use the fit to the sensitivity function to derive a value
                      for each of the pixels in an object spectrum and apply
                      it to calibrate the flux scale; in the process the 
                      atmospeheric extinction is also corrected. 

      TELLURIC        use the spectrum of a featureless star to derive a
                      correction template for the discrete atmospheric 
                      absorption bands and use it to correct an object 
                      spectrum. In principle, it is better to carry out this 
                      correction before flux calibration so that the absorption
                      bands do not affect the determination of the sensitivity.

END OF STORY: NOW YOU SHOULD HAVE FULLY CALIBRATED SPECTRA