A preliminary step to the wavelength calibration consists of extracting
the orders of the `WLC` image which can then be used to determine
the dispersion relation in two steps:

- The calibration lines are detected on the extracted orders by
means of a simple thresholding algorithm. The center of the line
is estimated by its center of gravity (
`GRAVITY`method) or by a gaussian fit to the line profile (`GAUSSIAN`method). This is done with the command`SEARCH/ECHELLE`. - A few lines are identified interactively on the 2D image display
and a set of global dispersion coefficients are derived by comparing the
identified lines with the line catalogue available in the system.
This global model for the dispersion is a function of the wavelength
and the spectral order number.
Finally, dispersion coefficients for each order are computed
using the global coefficients as a first approximation.
A polynomial of degree 2 or 3 is sufficient to obtain, for each order,
a good approximation of the wavelength scale.
The command

`IDENTIFY/ECHELLE`involves the echelle relation and requires the identification of two lines in overlapped regions of adjacent orders (method`PAIR`). The calibration can as well be performed for spectra which orders are not overlapped, this time requiring a minimum of four identifications (method`ANGLE`). Both methods are based on the echelle relation and therefore are not applicable if the disperser is not an echelle grating, as it is the case for`EFOSC`which involves a grism disperser. The method`TWO-D`allows to start directly the calibration with a two-dimensional fitting polynomial and requires more initial identifications. In case of several observations with the same, or near the same instrumental configuration, it is possible to use the global dispersion model from a previous calibration. The method`GUESS`implements this mode of operation. Two additional methods`RESTART`and`ORDER`are available. The selection of the method is performed by assigning a value to the echelle keyword`WLCMTD`.Solutions are computed either for each independent order (

`WLCOPT=1D`) or using a global bivariate polynomial (`WLCOPT=2D`).