Introduction
Description
COSMOS is a set of
programs for the reduction of multislit,spectra
obtained with the IMACS and LDSS spectrographs on the Magellan
Telescopes. It can be used for the quick-look analysis of data at the
telescope as well as for pipeline reduction of large data sets. COSMOS
is based on a precise optical model of the spectrographs, which allows
(after alignment and calibration) an accurate prediction of the
location of spectra freatures. This eliminates the line search
procedure which is fundamental to many spectral reduction programs, and
allows a robust data pipeline to be run in an almost fully automatic
mode, so that large amounts of data
can be reduced with minimal intervention. The COSMOS reduction
process consists of three steps:
- Alignment of the slit mask relative to the CCD focal plane.
After proper alignment, the COSMOS optical model can predict the
location of slit position/wavelength points on the CCD images to an
accuracy of 1 to 2 pixels. If the optical models were perfect, the
accuracy of these predictions would be even better. Since they are
not, they must be improved by the following step.
- Production of an accurate spectral map, during which
the optical
model predictions are corrected using one or more comparison arcs. This
step reduces the errors in predicted positions to a small
fraction of a pixel. The map created in this step forms the basis of
all following data reduction steps.
- Spectral reduction.
Each of these steps consists of several procedures, which are
summarized below.
Input Data
The COSMOS reduction process requires the following input data:
- A
mask
definition file which
describes
the slit mask used. This
file was produced by the program maskgen which was used to
produce the mask, and will have the name maskname.SMF
- A dewar
offset file, which describes
the positional
zero-point of a particular slitmask+instrumental configuration.
Default dewar offset files exist for each of the principle
configurations and can be used as starting points for the alignment
process
- An observation defintion file which defines the observational setup,
including instrument, slitmask (i.e. SMF file), camera, disperser
element (and tilt, if a grating), and dewar offset file. These files
are created by the program defineobs.
- Input data frames,
including bias, flat field, comparison arc, and object spectra.
Alignment
Although the spectral mapping routines described below are able to
correct errors in the COSMOS optical model, they need a reasonably
accurate starting point. The processes of mounting masks, inserting
them into the focal plane, moving disperser elements in and out, etc
inevitably produce some errors in the predicted positions of slit
images. The program align-mask
uses either a direct or dispersed mask image to correct for errors in x
and y position, position angle, and scale of the mask image, by
adjusting the values of these parameters in the dewar offset file.
Corrections to the dewar offset file can also be made manually using
the program adjust-offset.
Spectral mapping
The process of generating and calibrating a spectral map serves two
purposes:
- It creates a
polynomial representation of the mapping
from the science coordinate system
of slit position and wavelength to the observing coordinate system of CCD
coordinates, using the program map-spectra.
This polynomial representation allows the data analysis to proceed
without the computational machinary involved in the optical model.
- It uses one or more
comparison arcs to calibrate the spectral map
to high precision, using the program adjust-map.
Spectral reduction
Once an accurate spectral map has been produced, reduction of science
exposures proceeds in the following steps:
- Subtraction
of bias, and division by flats, using the programs Sflats and biasflat.
- Subtraction
of sky, using the program subsky.
- Extraction
of individual 1 or 2 dimensional spectral exposures using extract, or extract-2dspec. Multiple sets
of extracted spectra can be combined, with optional comic ray removal,
using sumspec
Reduction Pipeline
Execution of the
spectral mapping and spectral reduction steps descirbed above can be
pipelined together
for a set of spectral exposures from a single night using the script-generators
process-1spec
and
process-2spec.
Display and visualization
A number of programs help to display the data and compare them with the
predictions of the optical model and spectral map. They include:
- stitch combines the (2 or
4) LDSS3 CCD files into one FITS file, for processing and for easier
viewing.
- mosaic
combines the multiple IMACS CCD files into one FITS file for easier
viewing.
- display8
is an IRAF
routine to display the multiple CCD files of an IMACS exposure
together as one mosaic
The following routines calculate the predicted location of images in
data frames. When used together with one of the above display routines,
and the IRAF routine tvmark, they
allow one to compare true and predicted location of features.
- apertures
uses the optical model and current alignment to predict the
positions of all apertures in the direct image of a slit mask.
- spectral-lines
uses the optical model and current alignment to predict the positions
of spectral features in a dispersed image of a slitmask.
- spectral-map
uses a spectral map to to predict the positions of spectral features in
a dispersed image of a slitmask.
- COSMOS is a work in progress. This
means that:
- some
features are not yet complete.
Grayed-out text describes planned features that not yet available. Read
the descriptions of programs carefully for any limitations on their
present functions. Check the Status section
frequently for updates on recent changes.
- Bugs
persist. Please report problems
to oemler@ociw.edu. We will
respond to all emails, but please first ensure that you have read the
documentation carefully and are using the software correctly.
|