DEEP2 DR1 Spectra Primer



The DEEP2 spectrscopic targets were selected down to a magnitude limit of R = 24.1 (AB) from the photometric catalog following the target-selection algorithms described in Davis et al. 2004 and Faber et al. 2005, in prep. For details regarding the reduction of the DEIMOS data, refer to the DEEP2 DEIMOS spec2d pipline documentation and Newman et al. 2005, in prep. Here, we present a brief overview of the data products (the 1-d and 2-d spectra).


2-d Spectra
The DEEP2 2-d spectra are contained in FITS files according to the naming convention "slit.xxxx.sssB.fits.gz" or" slit.xxxx.sssR.fits.gz" where xxxx gives the DEEP2 mask number (e.g. 2200), sss gives the slits number, and B/R denotes the Blue or Red portion of the spectrum. Within DEIMOS, each object spectrum is dispersed across two CCD chips. The spec2d pipeline reduces the chips independently with the blue and the red side leading to different files. Note that the first two digits of each mask number denote the CFHT photometric field/pointing in which the mask is located. Each of the "slit" files contains one HDU which holds the 2-d spectrum, stored as an IDL structure. Similar to the photometric catalogs, the 2-d spectra can be read using the mrdfits command as follows (for more on FITS files and IDL structures, refer to the photometry primer):

        IDL> slit = mrdfits('slit.xxxx.sssB.fits.gz', 1)

The tags for the structure (slit) follow the format:
FLUX FLOAT Array[4096, 229]
IVAR FLOAT Array[4096, 229]
MASK BYTE Array[4096, 229]
CRMASK BYTE Array[4096, 229]
LAMBDA0 FLOAT Array[4096]
DLAMBDA FLOAT Array[4096, 229]
LAMBDAX DOUBLE Array[6]
TILTX DOUBLE Array[3]
SLITFN FLOAT Array[229, 3]
DLAM FLOAT Array[229, 3]
INFOMASK BYTE Array[4096, 229]

with the following definitions:
  FLUX: the mean flux (e-/hour) of the spectral image
  IVAR: the appropriate inverse variannce of the sky-substracted spectrum, pixel by pixel.
  CRMASK: describes which pixels had cosmic rays in a given frame. Bit N of the CRMASK is set if a CR registered on a given pixel in Nth frame.
  MASK: describes whether this is a bad pixel, or vignetted: 1 = bad, 0 = good.
  LAMBDAX: coefficients for the Legendre polynomial over [0,4095] defining wavelength as a function of pixel for the central row of the slitlet.
  TILTX: coefficients of the Legendre polynomial giving the tilt of a constant lambda locus as function of pixel (if x,y define position in the 2-d array, and P is the Legende polynomial and yc is the central y value (in pixels), then
lambda(x,y,) = P(x|LAMBDAX) * (1.0 + (y-yc)*P(x|TILTX)) + DLAM(y).
  SLITFN: 1-d array for correcting slitlet irrefularities (normalized to 1).
  DLAM: shift in wavellength for this row, relative to the nominal wavelength fit (all wavelengths are specified in Angstroms).
  INFOMASK: a bitmask with the following deifnition (defined in deimos_spslit.pro):
Bit 0 - nearvigmask pixel is >0% vignetted
Bit 1 - bsplinemask pixel rejected in bspline process
Bit 2 - nobsplinemask bspline is undefined for pixel
  LAMBDA0: in conjunction with DLAMBDA, this field provides a secondary means for recovering the 2-d lambda solution. The LAMBDA0 array contains the wavelength value in angstroms for the zeroth pixel row in the slit.
  DLAMBDA: in conjunction with LAMBDA0, this field provides a secondary means for recovering the 2-d lambda solution. The DLAMBDA array contains the increment to add to LAMBDA0 to obtain the wavelength at pixel x,y: LAMBDA(x,y) = LAMBDA0[x] + DLAMBDA[x,y]. The wavelength info is encoded in this manner (rather than storing the full 2-d solution) so that the low order bits of all the large 2-D arrays can be set to 0 without loss of precision, allowing the files to be compressed.

Note that the values in the 2-d flux array are given in units of counts per hour. Also, the 2-d wavelength solution for each slit can be constructed from either the LAMBDA0 + DLAMBDA values or by using the lambda_eval routine included in the spec2d pipeline code.

All DEEP2 masks include ~8 sky-only slits placed in open spaces on the DEIMOS slitmasks. These slits are used to perform non-local sky subtraction for short (slitlength < 3") slits. The "slit" files corresponding to these short slits have an additional FITS extension (or HDU) which contains the 2-d spectrum derived from the non-local sky subtraction. This second extension can be read by using mrdfits like so:

        IDL> nlsky = mrdfits('slit.xxxx.sssB.fits.gz', 2)





1-d Spectra
The 1-d object spectra are extracted from the 2-d spectra using two distinct methods: a boxcar extraction (with bad/missing pixels corrected by assuming a Gaussian spatial profile) and a variant on the Horne (1986, PASP , 98, 609) optimal extraction which assumes a constant Gaussian profile at all wavelengths. Since indvidual DEEP2 slitlets sometimes contain multiple objects, the pipeline writes a separate output file for each object according to the naming convention, spec1d.xxxx.sss.objno.fits, where "objno" is the 8-digit DEEP2 object number as defined in the DEEP2 photometric catalog, "xxxx" gives the DEEP2 mask number, and "sss" specifies the slitlet number. Each spec1d file generally contains 4 separate HDUs, with Blue and Red HDUs for the boxcar extraction and corresponding extensions for the optimal extraction. Each HDU is a BINTABLE with the following tags:

SPEC FLOAT Array[4096]
LAMBDA FLOAT Array[4096]
IVAR FLOAT Array[4096]
CRMASK INT Array[4096]
BITMASK INT Array[4096]
ORMASK INT Array[4096]
NBADPIX INT Array[4096]
INFOMASK INT Array[4096]
OBJPOS FLOAT     32.9567
FWHM FLOAT     10.04573
NSIGMA FLOAT     0.467127
R1 LONG     22
R2 LONG     44
SKYSPEC FLOAT Array[4096]
IVARFUDGE FLOAT     1.24571

In these spec1d files, the structure tags are defined as follows:
  SPEC: the 1-d spectrum (at present, not flux-calibrated; in DEIMOS counts per hour)
  IVAR: the appropriate 1-d inverse variance array.
  LAMBDA: the wavelength in units of angstroms.
  CRMASK: a 1-d array giving the number of pixels at each wavelength which were affected by a CR.
  BITMASK: a 1-d representation of the 2-d MASK field contained in the slit file. The slit MASK array has been evaluated in the spatial direction (over the extraction width R1 to R2) using the boolean operator AND.
  ORMASK: a 1-d representation of the 2-d MASK field contained in the slit file. The slit MASK array has been evaluated in the spatial direction (over the extraction width R1 to R2) using the boolean operator OR.
  NBADPIX: the total number of pixels at each wavelength (summed over the extraction width R1 to R2) for which the 2-d slit MASK is set (that is, for which the MASK is greater than 0).
  INFOMASK: a 1-d representation of the 2-d INFOMASK field contained in the slit file. The slit INFOMASK array has been evaluated in the spatial direction (over the extraction width R1 to R2) using the boolean operator OR.
  OBJPOS: the spatial position of the object in the slit in units of pixels (recall that the IDL arrays are zero-indexed). This is employed as the extraction center position.
  FWHM: the measured full-width at half maximum of the object in units of pixels (recall that the DEIMOS pixel scale is roughly 0.117371 arcsec/pixel).
  NSIGMA: the spatial extent of the extraction window in terms of a number of sigma. Recall that for a Gaussian function FWHM ~ 2.35482 * SIGMA
  R1: in conjunction with R2, defines the spatial pixel rows in the 2-d flux array from which the 1-d spectrum was extracted (R2 > R1).
  R2: in conjunction with R1, defines the spatial pixel rows in the 2-d flux array from which the 1-d spectrum was extracted (R2 > R1).
  SKYSPEC: the average 1-d b-spline sky spectrum.
  IVARFUDGE: a diagnostic, useful only if S/N ~ 0, currently not used.


In slits for which non-local sky subtraction has been performed, there are corresponding "NLSKY" extensions in the "spec1d" file containing the 1-d spectrum as extracted from the non-local sky-subtracted 2-d spectrum. To read in a 1-d object spectrum, the spec2d pipeline code provides the fill_gap routine which pieces together the blue and red portions of the object spectrum into a single IDL structure.


Slitmask Design Info
The design specifications for each DEEP2 DEIMOS slitmask are provided in DR1 as individual "bintabs" files wrapped in a tarball:

        maskdesign.dr1.tar

The tarball unpacks as a directory, "maskdesign", containing a separate "xxxx.bintabs.fits.gz" file for each DEEP2 slitmask where "xxxx" is the DEEP2 mask number. Each "bintabs" file holds six HDUs which detail the mask design specifications and the objects targeted. Note that the OBJECT tag within the ObjectCat BINTABLE gives the DEEP2 object number, while OBJECTID is an id tag assigned by the mask design database. To match entries across the various BINTABLES, the fields OBJECTID and DSLITID must be utilized. The routine simple_tables.pro in the spec2d pipeline is also helpful in managing the mask design information.



created by M. Cooper
last updated 2004nov05