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, 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.

chip layour   

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 chip arrangement2 chips1 chip
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_1spec.fits / 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

Long

LC

Short

SC

+  

Disperser

None

direct

200l/mm grism

200g

300l/mm grism

300g

600l/mm grism

600g

 

 

300l/mm grating

300l

600l/mm 5180A blaze grating

600.5l

600l/mm 8410A blaze grating

600.8l

1200l/mm 4440A blaze grating

1200.4l

1200l/mm 9420A 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

LDSS2

L2

LDSS3

L3

+  

Disperser

None

direct

low dispersion grism

low

medium dispersion blue grism

med_B

medium dispersion red grism

med_R

high dispersion grism high

VPH blue grism

VPH_B

VPH red grism

VPH_R


Thus, the dewar offset file for the LDSS3 instrument with the VPH blue grims 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.


Mask Definition File.


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

ObservationDefinition File.

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

  • Dewar (SITE, SITE2, 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 Aug 01, 2005, when chip 6 was changed. If, as is always recommended, the program defineobs is used to construct the obsdef file, one choses the instrument IMACS2 to specify IMACS with the SITE2 dewar configuration.

Spectral Map File.

The mapping of wavelength and slit position onto the individual CCD's 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. New bad pixel maps, including the locations of features from other spectral orders, and any other regions 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 ccd's inside the dewar, and has a name like dewarname.dewdef.  At the Magellan Telescopes- and at home if you use the default installation described in Section5- 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/configuration Dewar Name
IMACS before 01 Aug '05
SITE
IMACS after 01 Aug '05 SITE2
LDSS2 LDSS2
LDSS3/ 4 chip data
LDSS3-4
LDSS3/ 2 chip data LDSS3-2
LDSS3/ 1 chip data LDSS3




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 specifiy 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