Here, we provide a brief overview of the data formats for the DEEP2/DEEP3 DR4 1-d and 2-d spectra, which can be downloaded here. Additional information can be found by reading about the DEEP2 DEIMOS spec2d pipeline (see also Newman et al. 2013).
2-d Spectra
The DEEP2/DEEP3 2-d spectra are packaged as binary tables in standard FITS files according to the naming convention “slit.xxxx.sssB.fits.gz” or” slit.xxxx.sssR.fits.gz” where xxxx gives the DEEP2/DEEP3 mask number (e.g. 5100), sss gives the slits number, and B/R denotes the blue or red portion of the spectrum. Note that within DEIMOS each object spectrum is dispersed across two CCDs. The spec2d pipeline reduces the chips independently with the blue and the red side leading to different files. For DEEP2, the first two digits of each mask number denote the CFHT photometric field/pointing in which the mask is located — the orientation of these pointings within the EGS are illustrated here. For DEEP3, however, the mask numbers are not defined according to the CFHT field/pointing, with each mask assigned a number ≥5000 to distinguish it from the set of DEEP2 masks.
Each of the “slit” files contains one HDU that 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:
IDL> slit = mrdfits(‘slit.xxxx.sssB.fits.gz’, 1)
To list all of the tags contained in a given structure, execute the following command:
IDL> help, slit, /str
which will list the tags and their values for the first entry in the “slit” structure. Another option is to use the tag_names command like so:
IDL> print, tag_names(slit)
which will simply list the names of the tags. For more helpful routines related to FITS I/O and other assorted topics, refer to the GODDARD IDL Library.
The tags for the structure (slit) containing the 2-d spectrum follow the format (for a random slitlet with a length of 229 DEIMOS pixels [0.117371 arcsec/pixel]):
Tag Name | Data Type | Dimensions |
FLUX | FLOAT | Array[4096, 229] |
IVAR | FLOAT | Array[4096, 229] |
MASK | BYTE | Array[4096, 229] |
CRMASK | FLOAT | 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 sky-subtracted spectral image |
IVAR: | the inverse variance of the sky-subtracted spectrum |
CRMASK: | specifies those pixels impacted by cosmic rays in a given frame — bit N of the CRMASK is set if a CR registered on a given pixel in the Nth frame |
MASK: | denotes 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 for the Legendre polynomial giving the tilt of a constant lambda locus as a function of pixel — if (x,y) define position in the 2-d array, and P is the Legendre 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 irregularities (normalized to 1) |
DLAM: | shift in wavelength for this row, relative to the nominal wavelength fit (all wavelengths are specified in Å) |
INFOMASK: | a bitmask with the following definition (define by the deimos_spslit.pro as contained in the DEEP2 DEIMOS spec2d pipeline): 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 wavelength solution. The LAMBDA0 array contains the wavelength value in angstroms for the zeroth pixel row in the slit. |
DLAMBDA: | in conunction with LAMBDA0, this field provides a secondary means for recovering the 2-d wavelength solution. The DLAMBDA array contains the increment to add to LAMBDA0 to obtain the wavelength at pixel (x,y): LAMBDA(x,y) = LAMBDA0[x] + DLAMBA[x,y] The wavelength info is encoded in the manner (rather than storing the full 2-d solution) so tha the low-order bits of all of the large 2-d arrays can be set to 0 without loss of precision, allowing the files to be more readily 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.pro routine included in the DEEP2 DEIMOS spec2d pipeline.
All DEEP2 masks (but not DEEP3 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) that contains the 2-d spectrum derived from the non-local sky subtraction. This second extension can be read by using mrdfits.pro like so:
IDL> nlsky = mrdfits(‘slit.xxxx.sssB.fits.gz’, 2)
1-d Spectra
The DEEP2/DEEP3 1-d 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 of the Horne (1986, PASP, 98, 609) optimal extraction, which assumes a constant Gaussian profile at all wavelengths. Since individual 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 catalogs of Coil et al. (2004), “xxxx” denotes the DEEP2 slitmask number, and “sss” specifies the slitlet number on the mask. 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 contains a binary table (or BINTABLE) with the following tags:
Tage Name | Data Type | Dimensions |
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 |
with the following definitions:
SPEC: | the 1-d spectrum (not flux-calibrated; in DEIMOS counts per hour) |
LAMBDA: | the wavelength in units of Å |
IVAR: | the 1-d inverse variance array |
CRMASK: | a 1-d array giving the number of pixels at each wavelength that were affected by a cosmic ray. |
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 window 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 window R1 to R2) using the boolean operator OR. |
NBADMASK: | the total number of pixels at each wavelength (summed over the extraction with R1 to R2) for which the 2-d MASK array is set (that is, for which the MASK value is greater than 0). |
INFOMASK: | a 1-d representation of the 2-d INFOMASK array contained in the 2-d slit file. The 2-d INFOMASK array has been evaluated in the spatial direction (over the extraction window R1 to R2) using the boolean operator OR. |
OBJPOS: | the spatial position of the object in the slit in units of pixels (recall that arrays are zero-indexed in IDL). This is employed as the center position for the extraction. |
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 σ. Recall that for a Gaussian function FWHM ~ 2.35482 * σ. |
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 (again only for DEEP2 and not for DEEP3), 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.pro routine, which pieces together the blue and red portions of the object spectrum into a single IDL structure.