If the astronomical object is peaked up correctly, its spectrum is found at a
given row in the spectral image, with some leakage into one or two rows
either side of it (see bottom panel of Figure 3.2). The negative
beam can be
found at a different row in the same image
. Each beam can be extracted by co-adding the respective rows. A
more efficient way of doing it though, is to use the optimal extraction
algorithm developed by Horne (1986). This algorithm constructs the
spatial profile of the spectrum at each detector column. The extracted
spectrum, rather than being simply the average of the signal over a few
rows, is an average weighted by the spatial profile. In this way, pixels
with less signal from the source, and therefore noisier, will contribute
less to the extracted spectrum. The signal-to-noise ratio of the
spectrum extracted in this way is larger than that of a spectrum
extracted by simply co-adding the rows with signal from the object.