The distortion along the slit s = s(X, Y) can be modelled using an image containing one or several spectra of (ideally: point-) sources with well defined continuum. The command SEARCH/LONG can be used to generate a table with the positions of the spectra at several wavelengths. (Contrary to the general conventions used throughout this chapter, for this particular application the dispersion direction must be parallel to the `Y'-axis!) The distortion is then modelled by a two-dimensional polynomial fitted to these positions (using, e.g., REGRESSION/TABLE). If the resulting coefficients are stored in the keyword COEFY*, (*=I,R,D) and combined with suitable (if necessary: dummy) coefficients for the dispersion resolution in the keyword KEYLONG*, (*=I,R,D), the command RECTIFY/LONG can be applied.
Note that these steps are not implemented as a convenient-to-use high-level command procedure.