Using the Software


1.  Getting started at home
2.  Getting started at the telescope

3.  Setting up multislit observations
4.  Setting up IFU observations
5.  Spectral extractions

6.  Reduction Pipeline
7.  Important notes
-read this!
8.  Bugs

1. Getting started at home.

First, read the section on Using COSMOS at home, then continue with Section 3.

2. Getting started at the telescope

At the present time, the COSMOS software is located in /home/llama/aoemler/cosmos. Programs must be run on llama unless you want to transfer everything to burro. See Running on Burro for instructions how to do that.

If you are reading this on a printout, read the web pages located at http://llama.lco.cl/~aoemler/COSMOS.html  and at www.ociw.edu/~oemler/COSMOS.html for a description of the current status of the software, which is changing rapidly.

Running on llama

Before running any programs, you must do the following:

Running on burro

If you need to run on burro, you must do the following.

3. Setting up multislit observations

Before the start of observing:
  1. Take direct images of each slitmask, using either the internal continuum lamp, or the flat-field screen at the secondary.. For alignment purposes, 2x2 binning gives adequate resolution, and ccd readout is much quicker than 1x1 binning. 
  2. Prepare a direct image obsdef file for each mask. Template files for each camera/dewar orientation may be found in $COSMOS_HOME/examples/obsdef. For alignment purposes, the template dewar offset files found in $COSMOS_HOME/examples/dewoff are sufficient.
  3. Run apertures, make mosaic images of the masks with mosaic and display, then overlay the aperture positions, using the iraf routine tvmark to check approximate alignment. Unless something is very wrong, the apertures should be close (+- ten pixels or so) to the predicted positions. If they are not close, a first guess is that the masks have been mounted incorrectly in their holders. See the IMACS Users Manual for instructions.
  4. run alignholes on each of these obsdef files to prepare align files for mask alignment. Note that the binning specified when running alignholes must match that of the slitmask and direct field images.
If you wish to run the quick-look analysis at the telescope, you should also do the following:
  1. Take a comparison arc through each slitmask, with each grating/grism you intend to use.
  2. Prepare a suitable list of comparison lines. The lines should be clean and isolated, to ensure correct convergence of the alignment routines. Some example linelists can be found in $COSMOSHOME/examples/linelists.
  3. Starting with the default dewar offset files found in $COSMOSHOME/examples/dewoff, run align-mask on each arc image, to produce a dewar offset file for each observing setup. If align-mask does not produce a satisfactory solution, run spectral-lines and overlay the predicted line positions on the arc image. This may show you that you need to (a) eliminate some of the comparison lines from your list or (b) adjust the size of the search region you are using: too small may miss lines, too large may find the wrong line.
  4. Run map-spectra to produce a spectral map for each mask/disperser/disperser-angle combination.
  5. Now, run adjust-map to correct any residual errors in the map. Important note: at the present time, the grating/grism distortions have not been fully calibrated for all dispersers, and the initial spectral-map may have significant (up to 10 pixel) errors. Read the notes on the usage of adjust-map, for hints on how to deal with this situation.
  6. If the number of slits on  your masks is large (in the hundreds) you may want to use quick-list to prepare an abbreviated SMF file for the quick-look reductions.
Setting up on your field:

Instructions for setting up slitmasks, using ialign for the alignment, can be found in the IMACS Users Manual. If you have trouble identifying the alignment stars in the ialign window, the following procedure may be helpful:
  1. Create a mosaic of the direct ccd image of the target field with mosaic. 
  2. Run apertures to create an xy file, containing the positions of all apertures on the slitmask, including slits and alignment holes.
  3. Display the mosaic, and overlay the slitmask apertures, using the IRAF routine tvmark.
  4. Comparison of this overlay with a finding chart of your field should find the correct offset.

4. Setting up IFU observations

Checking the IFU alignment.

Because the images of each IFU fiber are very small, and adjacent fiber images are quite close together (only a few pixels with the short camera), very precise alignment is necessary for reliable image and spectral extraction. To check the IFU alignment, do the following:
  1. Take a direct image of the IFU, using either the internal continuum lamp, or the flat-field screen at the secondary, using 1x1 binning (in fact, always use 1x1 binning for IFU exposures.)
  2. Make a mosaic of this image using mosaic.
  3. Copy the appropriate IFU dewar offset file from $COSMOSHOME/examples/dewoff, and the appropriate IFU obsdef file from $COSMOSHOME/examples/obsdef into your working directory.
  4. Copy the IFU.SMF file from $COSMOSHOME/sdata into your working directory.
  5. Run apertures to produce an xy file for the IFU fiber images.
  6. Use the IRAF routine tvmark to overlay the positions on the ifu mosaic (set mark type to "point"). The agreement will not be prefect: the individual fiber positions have not yet been totally calibrated, but there should be no systematic offset of greater than 1 pixel.
  7. If there is a significant offset, you will need to adjust the IFU.dewoff file. At the present time, ifu-offset is not yet available, so you must make the adjustments manually, using adjust-offset.

5. Spectral extractions

If you have already performed the steps listed above to set-up for quick look reductions, then spectral extraction requires only the following steps:
  1. Flat-field and bias subtract your spectra. First prepare a spectroscopic flat field using Sflats, then use biasflat.
  2. Prepare an adjusted map for each object exposure, using adjacent arc exposures.
  3. Use subsky to do sky subtraction, unless you are working in nod&shuffle mode.
  4. Use extract to CR clean, combine, and extract the spectra, or use extract-2dspec followed by sumspec to do the same more robustly.
  5. Use view-2dspec or view-1dspec to inspect them.
Nod & shuffle data: extract uses the information on nod&shuffle in the FITS header to automatically process nod&shuffle data. See the documentation of extract for details.

See A COSMOS Cookbook for helpful hints on reducing data.

6. Data reduction pipeline

A pipeline generator for 2-d data now exists; See process-2dspec

7. Important Notes:


Bugs


This is new software, guaranteed to contain many bugs. Please send all bug reports to oemler@ociw.edu.

Back to Table of Contents