Back to Table of Contents

Introduction


Read this documentation before you go observing:
Why? (1) The reduction software is also used in the observing setup and for  quick-look analysis during observations, and there are certain files you will need to bring to the telescope in order to use it there and (2) there are certain CCD frames you may wish to obtain at the telescope in order to make optimal use of the reduction software when you later reduce your data.

Note:
Grayed-out text describes features not yet available.

COSMOS is a set of programs for the acquisition and  reduction of multislit, longslit,  and IFU spectra. The version described here is tailored for IMACS; another version will be available for LDSS-3. Parts of the COSMOS package have several applications, including
  1. Target acquisition and alignment
  2. Quick-look analysis of observations
  3. Data reduction pipeline
As a data pipeline, COSMOS is designed to be amost fully automatic, so that large amounts of data can be reduced with minimal intervention. This is made possible by two features of IMACS (1) an excellent analytical model of the optical system, which allows one to predict with great accuracy the location in the dewar focal plane of any location in the telescope/slit mask focal plane, for any wavelength of dispersed or undispersed light and (2) IMACS' excellent stability, which means that the predicted positions will not shift significantly despite changes in temperature or rotation angle, multiple insertions and removals of the slit masks or disperser elements, and even multiple mounting and removal of the ccd dewar.

Spectral reduction consists of two kinds of operations (1) making changes to the intensity values of pixels (e.g. bias correction, flat-fielding, sky subtraction) and (2) mapping CCD pixels onto the coordinate system of wavelength and slit position.  All of the hard work, particularly in multi-object spectra, is in the mapping process, and much of the COSMOS software is related to that. Input to the COSMOS programs consists of (1) information on the observing setup (2) a file defining the slit mask used (3) a set of ccd images comprising direct and/or spectroscopic observations and bias, flat field and comparison arcs. When used as a data pipleline, output consists of either 1 or 2-dimensional extracted, wavelength calibrated spectra.

Whether used for target acquisition, quick looks at the data, or for data reduction, all COSMOS programs require the following input data:
  1. Definition of the observational setup, including slitmask, camera, disperser element (and tilt, if a grating), and dewar offset. This information is contained in an observation defintion file.
  2. The slitmask definition, contained in the mask definition file for 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 Make sure that you have these files with you at the telescope. You will need them for the setup of multislit observations, and for quick-look analysis of your observations.
  3. The dewar offset, specified by the dewar offset file, which describes the positional zero-point of a particular instrumental configuration.  Default dewar offset files exist for each of the principle configurations. However, although IMACS is remarkably stable, it is not perfect, and there is some slop in the insertion of slitmasks into their frames. It is therefore  useful to create anew, more accurate dewar offset files for a particular set of observations, using the program align-mask. More accurate dewar offset files for the IFU can be generated with align-ifu, and more accurate dewar offset files for long slits  with align-longslit.
For quick-look or pipeline analysis of spectra, the following additional input is needed.
  1. Generation of a slitmask map, from the information contained in the observation definition file, using the program map-spectra. This map defines the relation between the dewar coordinate system of ccd pixel values, and the science coordinate system of wavelength, and slit position.
  2. Creation of a mean bias frame (optional).
Spectral reduction proceeds in the following steps.
  1. Tweaking of the wavelength and slit locations, using a comparison arc and the program adjust-map.
  2. Subtraction of bias, and division by flats, using the programs Sflats  and biasflat.
  3. Subtraction of sky, using the program subsky.
  4. Extraction of individual 1 or 2 dimensional spectral exposures using  extract, or extract-2dspec.
  5. Multiple sets of extracted spectra can be combined, with optional comic ray removal, using sumspec.
Generation of the map file, and execution of Steps 1 through 5 above can be pipelined together for a set of spectral exposures from a single night using the script-generators process-1spec and process-2spec.

Quick Look Reduction

Steps 1-3 above take typically 1-2 seconds per slit on the current data taking computers at the Baade Telescope. This is inconveniently long to do after each exposure for slitmasks containing hundreds of slits. To provide quick-look capability, the program quick-list allows one to create a truncated mask definition file containing a managable subset of slits for examination after an exposure. The programs view-1dspec and view-2dspec provide convenient means of examining these spectra.


Target acquisition and alignment

The program ifu-image allows one to reconstruct the focal plane image entering the object and sky fiber bundles of the IFU unit for a direct image taken through the IFU. The program alignholes produces data files describing the alignment holes on a slitmask,  which are used as input to the telescope/instrument alignment program ialign. mosaic puts together all 8 chip images into a mosaiced image. apertures produces a file with individual chip and mosaic coordinates of all apertures in direct images, and spectral-lines does the same for spectral images for use with the IRAF routine tvmark which marks their locations and types in an image display window. Several IRAF routines allow display or processing of all 8 chips of data with one command.


Next: Data Files 

Back to Table of Contents