%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  2009 European Southern Observatory
%.IDENT      calibrbach.hlq
%.AUTHOR     CG, SDD/SED/ESO
%.KEYWORDS   MIDAS, help files,
%.PURPOSE    On-line help file for the command: BACHES/CALIBRATE
%.VERSION    1.0  08-SEP-09 : Creation, CG
%----------------------------------------------------------------
\se
SECTION./BACHES
\es\co
CALIBRATE/BACHES                                           09-SEP-09  CG
\oc\su
CALIBRATE/BACHES  flat thar [table] [orders] [wslit1] [wslit2] [rms] [pdeg]
         Interactive procedure to calibrate BACHES instrument in wavelength
\us\pu
Purpose:
          Interactive procedure for the wavelenght calibration of BACHES
\up\sub
Subject:
          BACHES, Spectroscopy
\up\sy
Syntax:
          CALIBRATE/BACHES  flat thar [table] [orders]  
                        [wslit1] [wslit2] [tol] [poly]
\ys\pa
          flat =  FITS or BDF 2-dimensional image of the spectrum of a 
                  halogen lamp
\ap\pa
          thar =  FITS or BDF 2-dimensional image of the spectrum of a 
                  Thorium-Argon calibration lamp
\ap\pa
          table = Table containing lines of calibratio lamp. Default: thar.fit
\ap\pa
          orders = Number of orders to be identified. Default: 16
\ap\pa
          wslit1 = Slit width in pixels for identification of orders. 
                   Default: 15
\ap\pa
          wslit2 = Slit width in pixels for extraction of signal. 
                   Default: 15
\ap\pa
          tol = Final tolerance on RMS error. Default: 0.5
\ap\pa
          poly = Final degree of polynomial dispersion. Default 3
\ap\sa

\ap\see
See also:
          CLEAN/BACHES
          PIPELINE/BACHES
          RESOL/BACHES
\ees\no
Note:    
          Two output tables are created:
             bachesLINE.fit 
             bachesORDE.fit 
\\
          These tables represent the ECHELLE calibration (they are the
          result of the ECHELLE command "SAVE/ECHE baches".

\on\exs
Examples:
\ex
          CALIBRATE/BACHES ff.fit th.fit              
          Calibrate with ff.fit and th.fit images and defaults: 
          thar.tbl, 16 orders, 15 pixels identification, 
          15 pixels extraction, 0.5 tol and 3 poly
\xe\ex
          CALIBRATE/BACHES ff.fit th.fit ? 25 ? 5 0.5 4  
          Calibrate with ff.fit and th.fit images and 
          25 orders, 15 pixels for identification,
          5 pixels extraction, 0.5 tol and 4 poly
\xe\ex
          CALIBRATE/BACHES ff.fit th.fit neon ? 5 5 0.5 4 
          Calibrate with ff.fit and th.fit images and 
          using neon.tbl, 5 orders, 5 pixels extraction, 0.5 tol and 5 poly
\xe\sxe
