% @(#)regreseche.hlq	19.1 (ESO-IPG) 02/25/03 14:18:39 
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1990 European Southern Observatory
%.IDENT      regreseche.hlq
%.AUTHOR     JDP, IPG/ESO
%.KEYWORDS   MIDAS, help files, REGRESSION/ECHELLE
%.PURPOSE    On-line help file for the command: REGRESSION/ECHELLE
%.VERSION    1.0  17-DEC-1986 : Creation, JDP
%----------------------------------------------------------------
\se
SECTION./ECHE
\es\co
REGRESSION/ECHELLE					25-MAR-1992   PB
\oc\su
REGRESSION/ECHELLE [defpol]  [niter]  [absres]  [kappa]
	fit 2-dim. polynomial to order positions (defpol limited to 5,5)
\us\pu
Purpose:    
            Fit a 2D polynomial to the order positions. The command is
            used internally by DEFINE/ECHELLE and DEFINE/HOUGH. An iterative
            rejection of outliers is performed by kappa-sigma clipping.
\up\sy
Syntax:     
            REGRESSION/ECHELLE [defpol]  [niter]  [absres]  [kappa]
\ys\pa
            defpol = degree of the 2D polynomial. Default is 3,4.
                     Check the current value with the command
                     SHOW/ECHELLE. Echelle keyword is DEFPOL. Limit is 5,5.
\ap\pa
            niter  = number of additional loops for outlier rejection.
                     No related echelle keyword. Default is 3.
\ap\pa
            absres = maximum allowed residual in pixels. Default is 2.0
                     No related echelle keyword.
\ap\pa
            kappa  = number of standard deviation. Default is 4.5
                     No related echelle keyword.
\ap\no
Note:       The algorithm involves the following steps:\\
               - The rms error to a linear fit is estimated for each order
                 and written to a temporary table middummw.tbl\\
               - A maximum admissible rms is computed from the median of 
                 the order by order rms's. maxrms = 3.5 * median(rms(i)), 
                 i=1,nb of orders\\
               - All orders which rms is larger than maxrms are rejected
                 from the first bivariate polynomial fitting.\\
               - An iterative polynomial fitting is performed, rejecting
                 outliers by a kappa-sigma clipping.
\on\exs
Examples:
\ex
            REGRESSION/ECHELLE 3,4
\xe \sxe



