% @(#)backgrfero.hlq	19.1 (ESO-IPG) 02/25/03 14:20:54
% @(#)backgndfero.hlq (ESO-IPG) 12-11-1997
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1997 European Southern Observatory
%.IDENT      backgrfero.hlq
%.AUTHOR     AM, LSW Heidelberg, IPG/ESO
%.KEYWORDS   MIDAS, help files, BACKGR/FEROS
%.PURPOSE    On-line help file for the command: BACKGR/FEROS
%.VERSION    1.0  12-NOV-97 : Creation, AM
%----------------------------------------------------------------
\se
SECTION./FEROS
\es\co
BACKGR/FEROS                                         23-FEB-99 AM/OS
\oc\su
BACKGR/FEROS  [rawimage] [flatimage] [centertable] [bgmode] 
                 [bgparams] [medianfltsz] [fiber_mode]
            Determine (and subtract) background from echelle spectrum
\us\pu
Purpose:    
            Determine (and subtract) background from echelle spectrum  
\up\sy
Syntax:     
            BACKGR/FEROS [rawimage] [flatimage] [centertable] [bgmode]
              [bgparams] [medianfltsz] [fiber_mode]

\ys\pa
            rawimage = name of input image

\ap\pa
            flatimage = name of output image 

\ap\pa
            centertable = name of table with polynomial coefficients for
                          order centers  

\ap\pa
            bgmode = background  mode

            valid values are

                B for subtract background (default),
                N for compute background only 

\ap\pa
            bgparams = bg_step_x,bg_step_y,bg_width_x,bg_width_y,fitdeg

            parameters for background determination

                bg_step_x, bg_step_y  = step size for background
                                        determination in x and y direction
                bg_width_x, bg_width_y  = window size for background
                                          determination in x and y direction
                bgdist = minimum distance between orders

\ap\pa
            medianfltsz = bg_median_x,bg_median_y
                          size of median filter in x and y direction

\ap\pa      fiber_mode = 1 or 2. 
            For 2-fiber mode (FEROS mode), the background is also 
            determined  between the two fibers!

\ap\no
Note:       
            centertable must exist. It can be created using DEFINE/FEROS.
\on\sa
See also:
            DEFINE/FEROS

\as\exs	
Examples:
\ex
            BACKGR/FEROS rawspectrum flatspectrum
            Subtract background from image named rawspectrum and write
            data to image named flatspectrum using default parameters.
            
\xe\ex
            BACKGR/FEROS rawspectrum flatspectrum ? B ? 4,8
            Subtract background (no flatfield normalization) from image
            named rawspectrum and write data to image named flatspectrum.
            Use a median filter of 4 pixels width and 8 pixels height and
            default values for centertable and bgparams.
\xe \sxe
