Spitzer Documentation & Tools
IRS Instrument Handbook

5.7.3             EXTRACT

The EXTRACT module takes as one of its inputs the file bcd.fits, and extracts the 1-D spectrum along the trace defined in the input file ridge.tbl. It also takes as input the associated uncertainty func.fits, and bmask.fits. The corresponding inputs from the 2-dimensional coadder are c2unc.fits and c2msk.fits, and from background subtraction they are bkunc.fits and bkmsk.fits.

In the high-resolution slits, this module extracts a one-dimensional spectrum from the full slit. In the low-resolution slits, the spectrum is extracted along the RIDGE location in accordance with the wavelength-dependent Point Spread Function (PSF) and the spectral trace. The width of the extraction is defined in the psf_fov.tbl calibration file, which gives the width to employ at a fiducial wavelength for each order. The width and fiducial wavelength may be overridden if specified in the parameters w and l, in units of pixels and microns, respectively. The width of the extraction scales with wavelength in all low-resolution slits, under the assumption that the spectrum is diffraction limited. However, the width does not scale between subslits. Rather, the extraction width has been empirically determined for each subslit, and wavelength scaling is performed within each order individually. The exception to the wavelength-dependent window width in low resolution is the case of mapping observations taken in the "Both" fields of view, namely “Long-Low-Both” or “Short-Low-Both.” In that case, the default is to perform a full-slit extraction. The module may use a non-scaling width by setting the parameter l to 0 while also setting the extraction width to w.

The source spectrum incident on the array is not rectilinear in either the spectral or cross-dispersed direction. As a result, the EXTRACT module does not extract whole pixels, but rather subdivides the array into a network of polygon-shaped sampling elements referred to as “pseudo-pixels” (see Figure 5.13), which lie within the “pseudo-rectangle” that defines each wavelength in each order (specified in the wavsamp.tbl calibration file). Pseudo-pixels do not necessarily overlap the rectangular pixel grid. These elements allow Nyquist sampling of spectra in the dispersion direction. Extraction is performed by calculating the signal that falls within the boundary of the “pseudo-rectangles” which lie within the extraction window. Light is assumed to be evenly distributed within a pixel for purposes of calculating fractional contribution. The file bmask.fits identifies fatally masked pixels that will be excluded from the average of the pseudo-rectangle.

Figure 5.13  (Left) A pseudo-rectangle is divided into pseudo-pixels. The pixels form the FITS image for a rectangular grid, as illustrated in the upper left corner. (Right) A pseudopixel is shown overlaid on the pixels of the original FITS image. The pseudo pixel contains partial detector pixels, so each partial pixel must be carefully accounted for to perform the extraction.

For SL, LL, and LH data, the extraction is the sum of signal in the non-fatally masked pixels at each wavelength divided by the height (measured along the spectrum in pixels) of the extraction window, as set by the wavsamp.tbl wavelength calibration file.  For SH, the extraction is the sum of signal in the non-fatally masked pixels at each wavelength.

The module interpolates by default over NaN pixels in the data. NaNs can be present in IRS BCDs when there is no good data available for that pixel. The NaN pixels may or may not be fatally masked. EXTRACT averages the 2 rows above the NaN pixel, and the 2 rows below, column by column within the same order. It then fits a line to those column averages to interpolate over the NaN pixel. To disable this feature, the parameter fix can be set to 0.

The output of the module is the one-dimensional extracted spectrum, in units of electron/sec, written to the table extract.tbl.

The uncertainty defined in the input uncertainty plane is propagated into the extracted output spectrum. The output spectrum table includes the order, wavelength, flux (in electron/sec), propagated error, and cumulative pixel status for each wavelength. The cumulative pixel flag is a bit-wise OR of the flags of contributing pixels.