Using the Software
Using the Software
Setting up multislit observationsSetting up IFU observations
Spectral extractions
Important notes!
Setting up multislit observations
Before the start of observing:
- 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.
- 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. - Run apertures, display the images with display8 (or 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 (±10 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.
If you wish to run the quick-look analysis at the telescope, you should also do the following:
- Take a comparison arc through each slitmask, with each grating/grism you intend to use.
- 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
. - 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. - Run map-spectra to produce a spectral map for each mask/disperser/disperser-angle combination.
- Now, run adjust-map to correct any residual errors in the map.
- 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 icbox, ialign, and ifalign for the alignment, can be found in the IMACS Cookbook. If you have trouble identifying the alignment stars in the ialign window, the following procedure may be helpful:
- CDisplay a direct CCD image of the target field with display8, or create a mosaic with mosaic and display.
- Run apertures to create an xy file, containing the positions of all apertures on the slitmask, including slits and alignment holes.
- Overlay the slitmask apertures, using the IRAF routine tvmark.
- Comparison of this overlay with a finding chart of your field should find the correct offset.
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:
- 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.)
- Make a mosaic of this image using mosaic
- Copy the appropriate IFU dewar offset file from
$COSMOS_HOME/examples/dewoff
, and the appropriate IFU obsdef file from$COSMOS_HOME/examples/obsdef
into your working directory. - Copy the
IFU.SMF
file from$COSMOS_HOME/sdata
into your working directory - Run apertures to produce an xy file for the IFU fiber images.
- 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.
- 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.
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:
- Flat-field and bias subtract your spectra. First prepare a spectroscopic flat field using Sflats, then use biasflat.
- Prepare an adjusted map for each object exposure, using adjacent arc exposure.
- Use subsky to do sky subtraction.
- Use extract to CR clean, combine, and extract the spectra, or use extract-2dspec followed by sumspec to do the same more robust.
- Use viewspectra to inspect them.
- Nod & shuffle data: see the notes in the COSMOS Cookbook for specifics of how COSMOS handles N&S data. See COSMOS Cookbook for helpful hints on reducing data.
Data reduction pipeline
A pipeline generator for 2-d data now exists; See process-2dspec.
Important Notes!
- At the present time, COSMOS programs cannot be executed from within IRAF. Run them from another window. (ialign, display8 are IRAF programs, and should be run under cl.)
- Only a fraction of the disperser elements currently have default dewoff files. They will be added as each disperser is characterized. If you create a satisfactory dewoff file for a disperser element for which none exists, please send it to cosmos[at]obs.carnegiescience.edu, so it can be added to the collection.
- Optical distortions in the camera, collimator, gratings, and grisms have not been completely characterized. Images may, even after careful alignment, have systematic position errors of up to several pixels. As a consequence, the initial spectral mapping produced by map-spectra may have significant errors. Pay careful attention to the suggested procedure for testing spectral mapping described in the documentation on adjust-map.
- Do not try installing the software on llama or burro on your home machine for data reduction. See Using COSMOS at home for information on installing COSMOS at your home institution.
- At the present time, badorders only works with 1x1 binned data.
- At the present time, COSMOS does not work with FFTW3, be sure to compile with FFTW2.
- At the present time, apertures does not work with IMACS Long Camera data, be sure to use spectral-lines or spectral-map.
Please report all bugs to cosmos[at]obs.carnegiescience.edu, but please first make sure that you have carefully read the documentation and are using the software correctly.