1 CLEAN CLEAN deconvolution of an input data cube
        CLEAN

    This   task   contains   implementations   of   several   CLEAN‐like de‐
    convolution  algorithm.  The algorithm is selected through  the  METHOD$
    keyword, which can be :
     SIMPLE    :  The straightforward direct method.
     CLARK     :  The Barry Clark major‐minor cycle method.
     MRC       :  a Multi‐Resolution Clean.
     THRESHOLD :  Components are not restricted to be point sources.

    The input map and beam should have the same sizes, except  for  the SIM‐
    PLE  method where different beam sizes are allowed, and  must  have  the
    same grid spacing.  Sources are searched only in the  inner  quarter  of
    the  map,  but  their  sidelobes are removed in the full map.  A smaller
    search box can be specified if desired.

    The  program can process all planes of a data cube at the same time, but
    a  separate list of component will be  produced  for  each  plane.   The
    cleaning cannot be restarted.
2 METHOD$
        TASK\CHARACTER "Method for Clean" METHOD$

    Specify the algorithm to use among :
     SIMPLE    :  The straightforward direct method.  Safe, but slow.
     CLARK     :  The Barry Clark major‐minor cycle method.  Safe and fast.
     MRC       :  a  Multi‐Resolution  Clean.   Recommended  for   extended
                  sources or large images.
     THRESHOLD :  Components are not restricted to be  point  sources.   NOT
                  RECOMMENDED, and NOT DEBUGGED.
2 DIRTY$
        TASK\FILE "Input dirty map" DIRTY$

    This is the name of the input "dirty map".  If the map has more than two
    dimensions, all planes will be cleaned successively.
2 BEAM$
        TASK\FILE "Input dirty beam" BEAM$

    This is the name of the input "dirty beam"  (Point  Spread  Function  in
    optical jargon).  The beam can be a cube.
2 RESIDUAL$
        TASK\FILE "Output residual map" RESIDUAL$

    This is the name of the output residual map.  The residual  map  is  not
    deleted at the end of the run.
2 CLEAN$
        TASK\FILE "Output clean map" CLEAN$

    This is the name of the output "clean map".
2 COMPONENT$
        TASK\FILE "Output clean component table" COMPONENT$

    The name of the table to received Clean Component coordinates  and  val‐
    ues. Default extension is .CCT

2 GAIN$
        TASK\REAL "Loop gain" GAIN$

    This is the gain of the subtraction loop.  It should typically be chosen
    in the range 0.05 and 0.3.  Higher values give faster convergence, while
    lower values give a better restitution of the extended structure.
2 NITER$
        TASK\INTEGER "Maximum number of clean components" NITER$

    This is the maximum number of components  the  program  will  accept  to
    subtract.   Once it has been reached, the program starts the restoration
    phase.
2 FRES$
        TASK\REAL "Maximum value of residual (Fraction of peak)" FRES$

    This is the minimal fraction of the peak flux in the dirty map that  the
    program  will  consider  as  significant.   Alternatively,  an  absolute
    threshold can be specified  using  ARES$.   Once  this  level  has  been
    reached the program stops subtracting, and starts the restoration phase.
    This parameter is normalised to 1 (neither in % nor in db).   It  should
    usually  be  of  the  order  of magnitude of the inverse of the expected
    dynamic range.
2 ARES$
        TASK\REAL "Maximum value of residual (Absolute)" ARES$

    This is the minimal flux in the dirty map that the program will consider
    as  significant.   Alternatively,  the  threshold  can be specified as a
    fraction of the peak flux using FRES$.  Once this level has been reached
    the  program  stops  subtracting,  and starts  the  restoration   phase.
    The  unit for this parameter is the map unit.  The parameter should usu‐
    ally be of the order of magnitude of  the expected noise  in  the  clean
    map.
2 BLC$
        TASK\INTEGER "Bottom left corner of cleaning box" BLC$[4]

    These are the (pixel) coordinates of  the  Bottom  Left  Corner  of  the
    cleaning  box.   Only  the first two coordinates are actually used.  The
    actual cleaning window will be the intersection of the specified  window
    with the inner quarter of the map.
2 TRC$
        TASK\INTEGER "Top right corner of cleaning box" TRC$[4]

    These are the (pixel)  coordinates  of  the  Top  Right  Corner  of  the
    cleaning  box.   Only  the first two coordinates are actually used.  The
    actual cleaning window will be the intersection of the specified  window
    with the inner quarter of the map.
2 POSITIVE$
        TASK\INTEGER "Minimum number of positive components" POSITIVE$

    The  minimum  number of positive components before negative ones are se‐
    lected.
2 KEEP$
        TASK\LOGICAL "Keep cleaning after convergence" KEEP$

    This is a logical flag to keep cleaning after an approximate convergence
    has been reached.  It should usually be set to .TRUE., except may be for
    the SIMPLE method.
2 MAJOR$
        TASK\REAL "Clean beam major axis" MAJOR$

    This is the major axis  (FWHP)  in  user  coordinates  of  the  gaussian
    restoring beam. If 0, the program will fit a gaussian to the dirty beam.

2 MINOR$
        TASK\REAL "Clean beam minor axis" MINOR$

    This is the minor axis  (FWHP)  in  user  coordinates  of  the  gaussian
    restoring beam.
2 PA$
        TASK\REAL "Position angle of clean beam" PA$

    This  is  the  position   angle   (from   North   towards   East,   i.e.
    anticlockwise)  of  the  major  axis  of the gaussian restoring beam (in
    degrees).
2 BEAM_PATCH$
        TASK\INTEGER "Size of cleaning beam in pixels" BEAMPATCH$[2]

    The dirty beam patch to be used for the minor cycles in  CLARK  and  MRC
    method.  It should be large enough to avoid doing too many major cycles,
    but has practically no influence on the result.   This  size  should  be
    specified  in  pixel  units.  Reasonable values are between N/8 and N/4,
    where N is the number of map pixels in the same dimension.  If set to N,
    the CLARK algorithm becomes identical to the SIMPLE algorithm.
2 CLARK

        A  Major‐Minor cycles method in which clean components are  selected
    using a limited beam patch, and deconvolved through Fourier transform at
    each major cycle. Usually faster than the Simple Hogbom method.
2 MRC

        A Multi Resolution Clean.  Two maps are cleaned instead of only one:
    a  smooth  dirty map, and the difference between this smooth map and the
    original  map.   The  same  process is applied to the  dirty  and  clean
    beams.   The  final  clean  map is obtained adding the two clean and two
    residual maps with proper weighting.

    Since the difference map contains no flux, a limited Clean  can  be per‐
    formed  on it.  The smooth map contains only larger  structure,  and  is
    compressed before cleaning.  Deeper clean can be performed  on  extended
    structures,  because they look more point‐like and have better signal to
    noise in the smoothed map.  Hence the MRC algorithm is able  to  recover
    more extended structure than a standard Clean.
1 ENDOFHELP








































