EXTRACT is an "optimal extraction" routine for extracting the spectra of 1-dimensional sources (point-sources) from 2-D spectral images. It is based on the algorithm described by Keith Horne (``An Optimal Extraction Algorithm for CCD Spectroscopy'', 1986, PASP, 98, 609). In brief, each pixel in the spectral extraction is weighted according to the fraction of the flux which is expected in that pixel assuming a uniform spatial profile. The weighting scheme is optimized to retrieve the maximum signal-to-noise without biasing the resulting fluxes.
EXTRACT operates much like MASH, and should result in better signal-to-noise in those cases where the noise in the spectrum is dominated by the background (either from the sky or from the detector read-out noise).
WARNING: It is inappropriate to use EXTRACT for moderate or bright objects in which the noise is dominated by the Poisson statistics of the object itself. In such cases the extraction routine may discard so many points from the spatial profile fits it does that parts of the spectrum can become meaningless. It is also inappropriate to use EXTRACT for objects whose spectra are dominated by bright, unresolved emission lines (as EXTRACT might reject them as being ``cosmic rays''), and for extended sources. For bright sources, emission-line objects, and extended sources, use MASH or SPECTROID as appropriate.
The steps which EXTRACT goes through are as follows:
Note that the uncertainties at all stages are estimated using the assumed detector characteristics. When the data are of sufficient quality this means that the uncertainties in the fits will be so small that the inability of the fit parameterizations (both sky and profile) to accurately model the data will be detectable. The program will then start rejecting large numbers of points because the model assumed is not quite appropriate. In this case the MASH command should be used, as the data are probably of such high signal-to-noise that the optimal extraction routine will not gain anything over a simple summation. The interested user is referred to Keith's article for more details.