% @(#)badpixirsp.hlq	19.1 (ESO-IPG) 02/25/03 14:23:15 
% @(#)
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1992 European Southern Observatory
%.IDENT      badpixirsp.hlq
%.AUTHOR     E.Oliva, Arcetri (Florence)
%.KEYWORDS   MIDAS, help files, BADPIX/IRSPEC
%.PURPOSE    On-line help file for the command: BADPIX/IRSPEC
%.VERSION    1.0  21-SEP-1992 : Creation, E.Oliva
%----------------------------------------------------------------
\se
SECTION./IRSPEC
\es\co
BADPIX/IRSPEC                                   21-SEP-1992 EO
\oc\su
BADPIX/IRSPEC in out [l=load_opt.] [dir=clean_opt.] [debug=debug_opt.]
            Clean image of fixed pattern of bad pixels 
\us\pu
Purpose:    The IRSPEC array has a fixed pattern of bad pixels.
            This command cleans the image by substituting the values
            of the bad pixels with the average of the neighbouring
            good pixels. The fixed-pattern of bad pixels can be defined
            using DEFINE/IRSPEC and updated using SET/IRSPEC badpix=..... 

\up\sy
Syntax:     BADPIX/IRSPEC in out [load=load_opt.] [clean=clean_opt.] 
                          [debug=debug_opt.]
\ys\pa
            in      =  input image; untouched on exit. Must have the 
                       original size with starts and steps all equal to 1. 
                       It could also be an operation 
                       between images (see last example).
\ap\pa
            out     =  name of the output image.\\
\\
            Additional parameters and options:
\ap\pa 
            load    =  0,1 default=0.
                       If =0 (the default) the command works silently.
                       if =1 it will display the image before and after 
                       the correction
\ap\pa
            clean   =  a,x,y,b  default=a.
                       If = a (the default and recommended value) it decides
                       automatically, for each bad pixel, whether to use the 
                       average of the good pixels along x, y or b (x+y).
                       The user can force to use any of the x,y,b options
                       by setting dir=x, dir=y or dir=b.
\ap\pa
            debug   =  0,1 default=0.
                       Normally = 0, to be set to 1 only for reporting 
                       errors in case the command does not work properly 
                       in the automatic mode.
\ap\no
Note:       BADPIX works only with fairly isolated bad pixels and cannot handle
            cases when the bad pixels are clustered, in which case it will give
            an error message. In such a situation use FILTER/MEDIAN and similar
            commands.
\on\exs
Examples:
\ex
            BADP/IRS a0015 out1 
\xe\ex
            BADP/IRS myframe octopus c=x l=1
               (note that l=.. c=... are enough for clean=.. and load=...)
\xe\ex
            BADP/IRS (cc0012+cc0015-cc0013-cc0014)/2. out2 l=1
\xe\sxe






