Personal tools
You are here: Home / COSMOS2 / Data Files

Data Files

Back to Table of Contents

Data Files

The COSMOS pipeline requires a number of data files as input, in addition to the CCD frames. Some are provided, but some must be generated by the user. Each is described below.


Image Files

IMACS

Each IMACS exposure produces 8 FITS image files, one for each CCD; These have names ccdmmmmcn.fits, if produced by the SITE dewar, or iftmmmcn.fits, if produced by the E2V dewar, where mmmm is the exposure sequence number and n is the chip number. Note that the chips are not numbered in the expected order; the arrangement of chips is as shown below. The red dot indicates the corner of the CCD with pixel (0,0). If binning is set to 1, each image file is 2048x4096 pixels in size, after removal of bias lines and overscan.

IMACS chip layout

LDSS3

Each LDSS3 exposure produces either 1, 2 or 4 FITS images files, depending on the current setup. These have names ccdmmmmcn.fits, where mmmm is the exposure sequence number and n is the chip number; the arrangement of chips for the three different setups are as shown below. The red dot indicates the corner of the CCD with pixel (0,0). If binning is set to 1, each file in the 4-file mode is 2032x2032 pixels in size, after removal of bias lines and overscan.

LDSS3 4 chip layout LDSS3 2 chip layout LDSS3 1 chip layout
For data analysis, LDSS3 2 and 4 chip data are combined into a single FITS file using the program stitch.

CCD files produced by reduction programs have additional labels appended; for example

Bias corrected:ccdmmmm_b_cn.fits
Flat fielded:ccdmmmm_f_cn.fits
Sky subtracted:ccdmmmm_s_cn.fits
Spectroscopic flats:ccdmmmm_flat_cn.fits
Mosaiced images:ccdmmmm_mos.fits
Extracted spectra:ccdmmmm_2spec.fits

Note that some of these designations are hierarchical (i.e. flat-fielded implies bias-corrected, and sky-subtracted implies flat-fielded and bias- corrected).


Dewar Offset File

The dewar offset file defines the position offsets for a particular instrument setup, including rotation, xy position, and scale. Default dewar offset files exist in $COSMOS_HOME/examples/dewoff for most combinations of camera (long or short), each dewar mounting (Normal or Nod&Shuffle;) and each disperser. The IMACS names are constructed as shown in the following tables:

Camera
LongLC
ShortSC
+
Disperser
None direct
150l/mm grism 150g
200l/mm grism 200g
300l/mm grism 300g
600l/mm grism 600g
300l/mm grating 300l
600l/mm 5180 Å blaze grating 600.5l
600l/mm 8410 Å blaze grating 600.8l
1200l/mm 4440 Å blaze grating 1200.4l
1200l/mm 9420 Å blaze grating 1200.9l
+
Dewar Mounting
Normal_N
Nod&Shuffle;_NS

Thus, for example, the dewar offset file for the long camera with the 300 l/mm grating and a nod & shuffle dewar mount is called LC300l_NS.dewoff. The LDSS dewar offset file names are

Instrument
LDSS2L2
LDSS3L3
+
Disperser
Nonedirect
low dispersion grismlow
medium dispersion blue grismmed_B
medium dispersion red grismmed_R
high dispersion grismhigh
VPH all grismVPH_all
VPH blue grismVPH_B
VPH red grismVPH_R

Thus, the dewar offset file for the LDSS3 instrument with the VPH blue grism is called L3VPH_B.dewoff A more accurate dewar offset file can be generated for an observation set using the program align-mask. They can be adjusted manually using the program adjust-offset.

Important: note that the dewar offset file type, N or NS, corresponds to the dewar mounting, not the type of spectra obtained. In particular, IMACS Nod&Shuffle; observations after April 2007 are taken with the dewar in the Normal mounting, and the _N dewoff files should be used.


Mask Definition File

The mask definition file is generated by the program maskgen which was used to design the slitmask. Files names are of the form maskname.SMF.


Observation Definition File

The observation definition file defines a particular observational setup, including:

  • Dewar (SITE, SITE2, E2V, LDSS2, or LDSS3)
  • Camera (LONG or SHORT if IMACS)
  • Mode (DIRECT or SPECTROSCOPIC)
  • Disperser
  • Disperser angle
  • Disperser order
  • Slit mask name
  • Dewar offset file name

Existing obsdef files can be edited or new ones created from existing ones using the program defineobs.Note that disperser order and angle are only relevant for gratings, not for grisms or direct. Template obsdef files can be found in the $COSMOS_HOME/examples/obsdef directory. Note that SITE2 refers to the SITE dewar after August 1, 2005, when chip 6 was changed. If, as is always recommended, the program defineobs is used to construct the obsdef file, the specification of SITE or SITE2 is done by the program based on the observation date.


Spectral Map File

The mapping of wavelength and slit position onto the individual CCDs is described by a spectral map file. Map files form the basis for all of the spectral reduction procedures. They are generated from the information in the mask definition and observation definition files using the program map-spectra. Using a comparison arc image, spectral maps can be improved using the program adjust-map.


Program Parameter Files

Most COSMOS programs have an accompanying IRAF-like parameter file, which modifies the program's behavior. These parameter files are edited by the program editpar. Programs search for their parameter files first in the directory defined by the environment variable COSMOS_PAR_DIR.


Bad Pixel Map

Maps of bad pixels in the dewars are contained in the files dewarname.badpix, located in $COSMOS_HOME/sdata. These maps are needed by the reduction pipeline. Users may also create their own bad pixel files, if desired. These files are tables, in which each line contains information on one bad pixel group. The format of the first and all following lines is:

Chip   Xmin   Xmax   Ymin   Ymax   [Binning]
Chip   Xmin   Xmax   Ymin   Ymax
etc

The optional parameter Binning, on line 1 must be specified only if the bad pixel group coordinates are NOT for 1 x 1 binning, and is either a one digit number if the x and y binning is the same, or a two digit number if x and y binning are different. For example, if x binning is 1 x 1 and y binning is 2 x 2, the Binning parameter will be 12. Note that bad pixel files of any binning can be used in the reduction of data of any binning, the two need not match, but it is clearly undesirable to use bad pixel files of higher binning than that of the data to be reduced, i.e. do NOT use a 2 x 2 bad pixel file to reduce 1 x 1 data. The bad pixel files provided in $COSMOS_HOME/sdata are all 1 x 1 binned.

New bad pixel maps, which include the locations of features from other spectral orders, which one might wish to mask out, can be created using the program badpixels.


Dewar Definition File

This file is not directly accessed by the user, but is described for completeness. The dewar definition file describes the physical layout of CCDs inside the dewar, and has a name like dewarname.dewdef. At the Magellan Telescopes (and Santa Barbara Street, if you use the default installation described in Installing and running COSMOS) these files are located in the directory $COSMOS_HOME/sdata. Do not mess with these files! Because chip 6 of the IMACS SITE dewar was changed on August 1, 2005, there are two dewdef files for the SITE dewar. The currently existing files are:

Instrument/configurationDewar Name
IMACS w/SITE dewar before 01 Aug '05SITE
IMACS w/SITE dewar after 01 Aug '05SITE2
IMACS w/E2V dewarE2V
LDSS2LDSS2
LDSS3/ 4 chip dataLDSS3-4
LDSS3/ 2 chip dataLDSS3-2
LDSS3/ 1 chip dataLDSS3

File Location

COSMOS expects all input files to be in the following locations:

  • dewarname.dewdef, and dewarname.badpix, in the directory $COSMOS_HOME/sdata. The environment variable COSMOS_HOME is predefined (either by the system or by you when you installed the software), and should not be messed with.
  • Parameter files are looked for in the directory specified by COSMOS_PAR_DIR.
  • All other data files in the working data directory, unless you specify filenames with full paths.
  • CCD fits files, i.e. bias, flatfield, comparison arc, and object spectra, in the directory tree specified by the environment variable COSMOS_IMAGE_DIR. For example, if COSMOS_IMAGE_DIR is defined as /home/joe_user/data and your images are in /home/joe_user/data/night1, the file names should be specified as night1/filename. If you want to keep both data files and image files in the same working directory, simply define COSMOS_IMAGE_DIR to be "." This is the default at startup. The value of COSMOS_IMAGE_DIR may be changed by using the usual system commands (i.e. setenv under csh), but a handy GUI setcosdir saves some typing.


Next: Programs

Back to Table of Contents