Order Extraction

The pixel values in the numerical slit are found by linear
interpolation of the values in the image. The extracted flux number
is the weighted average of these interpolated pixel values. There are
three types of weights (*w*) depending on the selected option:

- option
`LINEAR`:*w*= 1, - option
`AVERAGE`:*w*= 1/*L*where*L*is the length of the slit, - option
`OPTIMAL`: weights optimising the signal to noise ratio of the extracted spectrum. This algorithm is based on (Mukai, 1990)

There are several effects to consider when defining the length of the extraction slit. If the length is too small, the orders are only partially extracted and they present a periodic variation due to the inclination of the orders with respect to the lines in the image. On the other side, if the slit is too large, the extracted flux will include noisy pixels from the flatfielded background, when the flat field correction is applied.

The command `EXTRACT/ECHELLE` is used for the order extraction. The method
is selected using echelle keyword `EXTMTD`.