### Flat-relative optimal extraction. A quick and efficient algorithm for stabilised spectrographs

(2 votes from 2 institutions)

Optimal extraction is a key step in processing the raw images of spectra as registered by two-dimensional detector arrays to a one-dimensional format. Previously reported algorithms reconstruct models for a mean one-dimensional spatial profile to assist a properly weighted extraction. We outline a simple optimal extraction algorithm including error propagation, which is very suitable for stabilised, fibre-fed spectrographs and does not model the spatial profile shape. A high signal-to-noise, master-flat image serves as reference image and is directly used as an extraction profile mask. Each extracted spectral value is the scaling factor relative to the cross-section of the unnormalised master-flat which contains all information about the spatial profile as well as pixel-to-pixel variations, fringing, and blaze. The extracted spectrum is measured relative to the flat spectrum. Using echelle spectra of the HARPS spectrograph we demonstrate a competitive extraction performance in terms of signal-to-noise and show that extracted spectra can be used for high precision radial velocity measurement. Pre- or post-flat-fielding of the data is not necessary, since all spectrograph inefficiencies inherent to the extraction mask are automatically accounted for. Also the reconstruction of the mean spatial profile by models is not needed, thereby reducing the number of operations to extract spectra. Flat-relative optimal extraction is a simple, efficient, and robust method that can be applied easily to stabilised, fibre-fed spectrographs.