% @(#)searchorde.hlq	19.1 (ESO-IPG) 02/25/03 14:18:40 
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1990 European Southern Observatory
%.IDENT      searchorde.hlq
%.AUTHOR     PB, IPG/ESO
%.KEYWORDS   MIDAS, help files, DEFINE/TRACE
%.PURPOSE    On-line help file for the command: DEFINE/TRACE
%.VERSION    1.0  30-JUL-1991, Creation: PB
%----------------------------------------------------------------
\se
SECTION./ORDE
\es\co
SEARCH/ORDER						30-JUL-1991 PB
\oc\su
SEARCH/ORDER    [ordref] [w,t,s]  [ordtab]  [defmtd]
	define echelle order positions
\us\pu
Purpose:    
            Low-level command called by DEFINE/ECHELLE.
            Search for order positions in a 2-D echelle frame. The positions 
            of points located in order and in interorder space are stored 
            in auxiliary table ordtab.
\up\sy
Syntax:     SEARCH/ORDER [ordref] [width1,thres1,slope] [ordtab] [defmtd]

\ys\pa
            ordref = raw input image. Must be at standard orientation.
                     Echelle keyword is ORDREF.
\ap\pa
            width1 = is the full width at half maximum of the orders accross 
                     the dispersion direction (in pixels). Default is 8.
                     Echelle keyword is WIDTH1.
\ap\pa
            thres1 = is the absolute threshold for the order detection
                     Default is 1000.
                     Echelle keyword is THRES1
\ap\pa
            slope  = is the mean slope of the orders. Default is 0.05
                     Echelle keyword is SLOPE
\ap\pa
            ordtab = is the name of ouput table. Default: order.tbl
\ap\pa
            defmtd = defines the method used to detect the orders. Possible
                     methods are :
                     STD: the standard (default) method, recommended for well 
                          separated orders (e.g., for CASPEC above 4700 A).
                     COM: thresholding is done after complementing pixel 
                          values. Useful where orders are more crowded 
                          (interorder space less than order width).

                     Echelle keyword is DEFMTD.

\ap\no
Note:         The auxiliary table order is used as intermediate storage
              Parameters can be defaulted to the corresponding session
              values (SHOW/ECHELLE to display the current values).
             
              The performance of the algorithm depends sensitively on 
              the value entered for the width of the order profile. 
             
              In its present version, the algorithm will crash if the 
              exposure level of a detected order drops below the detection 
              threshold. This can cause problems if, as can be the case 
              with the Echellec, in the center of the frame the scattered 
              light level in the interorder region is higher than the 
              exposure level within the orders towards their end(s). Use 
              {\tt EXTRACT/IMAGE} to extract the useful part of the frame. 

\on\exs
Examples:
\ex
             SEARCH/ORDER  stdframe 6,10
\xe \sxe







