Order Definition

The first of the equations 7.1 defines the position of the spectral orders,

The function *f*_{1} is approximated by a polynomial of the form

where the coefficients

- A first guess of the position
of the orders is found on a trace perpendicular to the dispersion
direction done in the middle of the flat field image, in this way we define
the set of points
(
*x*_{0},*y*_{0m}),*m*being the relative order number. - For each order, the order-following algorithm finds the series of points located on the order at for points on the right half of the order, and at for points on the left half of the order, integer and is the step of the grid.

This set of points forms the basic grid with the geometric positions of the orders. Typical values of the standard deviation of the residuals of this approximation are about 0.3 to 0.1 pixel.

It is worth mentioning here that the order following algorithm finds
the center of the orders by taking the middle point with respect to the edges
of the orders. The edges of the orders are detected automatically by
thresholding the order profiles, perpendicular to the dispersion direction;
the level of the threshold is a function of the signal in the order.
The command `DEFINE/ECHELLE` performs the automatic order detection.

An alternative method is available, based on the Hough transform to perform the order detection and involving a tracing algorithm able to estimate an optimal threshold for each order independently. The order definition is performed as follows:

- A preprocessing of the frame is performed, including a median filtering
(radx,y=2,1) to remove hot pixels and bad rows from the image. Then the
background value is measured in the central area of the image
and subtracted. This preprocessing assumes that the
defaults are small enough to be corrected by a simple median filtering
and that the interorder background is basically constant all over the image.
If the above conditions are not respected, the frame must be processed by
the user. The echelle command
`BACKGROUND/SMOOTH`enables performance of a background correction at this early stage of the calibration. - A first guess of the position and the slope of the orders is found by processing the Hough transform of a subset of columns of the input image. The order detection by Hough transform is described in (Ballester, 1994).
- For each order, an initial threshold is estimated by measuring the pixel values in the middle of the order. The order following algorithm finds the series of points located on the order at regular steps on the grid, as describd above. The threshold is optimised in order to follow the order on the longest possible distance. If the trace of the order is lost, the algorithm extrapolates linearly the positions and attempts to skip the gap.
- For each position, the center of the order is
defined as the first moment of the pixel values above the threshold:

This algorithm is implemented in the command`DEFINE/HOUGH`. The algorithm can run in a fully automatic mode (no parameters are required apart from the name of the input frame). It is also possible to set the following parameters to enforce a given solution: