.ti -4 
2 BEAM__SIZE

BEAM__SIZE is a Real array of size 3 containing the user-specified values
for the Clean beam size, with BEAM__SIZE[1] the Major axis, BEAM__SIZE[2] the
Minor axis (both in arcsec) and BEAM__SIZE[3] the Position angle (in degrees, North towards East).

If BEAM__SIZE[1] and BEAM__SIZE[2] are 0, the CLEAN or FIT commands will determine 
the Clean beam size (available in variable BEAM__FITTED similar
to BEAM__SIZE) by adjusting the dirty beam main peak.

If only one of BEAM__SIZE[1] and BEAM__SIZE[2] is non zero, it will be
used as the Clean beam size for a circular beam.

If both are non zero, BEAM__SIZE totally specifies the Clean beam size.
BEAM__FITTED is thus set to the BEAM__SIZE values when used.

.ti -4
2 CLEAN__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 CLEAN__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 (typically Jy/Beam).  The parameter should
usually be of the order of magnitude of the expected noise in the clean
map.

If 0, CLEAN__FRES will be used instead. If all of CLEAN__NITER, CLEAN__ARES 
and CLEAN__FRES are 0,
an absolute residual equal to the noise level will be used for CLEAN__ARES.

Short form is ARES.

This may be overseded by the /ARES option which imposes a limit
per plane through an array of values.

.ti -4
2 CLEAN__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 CLEAN__ARES.  Once this level has been reached the program
stops subtracting, and starts the restoration phase.  This parameter is
normalized to 1 (neither in % nor in db).  It should usually be of the
order of magnitude of the inverse of the expected dynamic range of the
intensity.

If 0, CLEAN__ARES will be used instead. If all of CLEAN__NITER, CLEAN__ARES 
and CLEAN__FRES are 0, an absolute residual equal to the noise level will 
be used for CLEAN__ARES.

Short form is FRES.

.ti -4
2 CLEAN__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. A sensible
default is 0.2.

Short form is GAIN.

.ti -4
2 CLEAN__INFLATE 

  Maximum Inflation factor for UV__RESTORE (MULTISCALE method).
If the number of true (i.e. pixel based) Clean components found by 
MULTISCALE is larger than CLEAN__INFLATE times the number of compressed 
(i.e. those with the smoothing factor information) components, expansion
of the compressed components will not be possible, and UV__RESTORE
or CLEAN /RESTART  will not be useable.  

  The default is 121, large enough to handles all expansion, but it might 
exceed the available memory. Smaller values are often acceptable. 
Better solutions might be found in the future, and this parameter suppressed. 
Apart from memory usage, this number has no consequence on the algorithm. 

.ti -4
2 CLEAN__NCYCLE     

  Maximum number of Major Cycles for the SDI and CLARK methods.

.ti -4
2 CLEAN__NGOAL   

  Number of clean components to be selected in a Cycle in the
ALMA heterogeneous array cleaning method.  
      

.ti -4
2 CLEAN__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. 

If 0, the program will guess a number, based on the image
size and maximum signal-to-noise ratio, and specified residual level
CLEAN__ARES and/or CLEAN__FRES.

Short form is NITER.

This may be overseded by the /NITER option which imposes a limit
per plane through an array of values.

.ti -4
2 CLEAN__NKEEP

This is an integer specifying the minimum number of Clean components
before testing if Cleaning has converged. The convergence is criterium 
is a comparison of the cumulative flux evolution separated by
CLEAN__NKEEP components. If th

IF CLEAN__NKEEP is 0, CLEAN will ignore this convergence criterium, 
and continue clean until the CLEAN__NITER, CLEAN__ARES or CLEAN__FRES 
criteria indicate to stop.

With CLEAN__NKEEP > 0, CLEAN will explore the stability of the total clean
flux over the last CLEAN__NKEEP  iterations. For a positive (resp. 
negative) source, if the Clean flux becomes smaller (resp. larger) 
than the Clean flux CLEAN__NKEEP iterations earlier, CLEAN will stop.

Using CLEAN__NKEEP about 70 is a reasonable value.
Some special cases (faint extended sources) may require larger 
values of CLEAN__NKEEP. 

.ti -4
2 CLEAN__POSITIVE

The minimum number of positive components before negative ones are
selected.

.ti -4
2 CLEAN__RESIDUAL

An integer code indicating what the Clean image will contain.
Its usage is reserved for tests or specific algorithm using
the basic CLEAN as an engine.

.nf
-1    The CLEAN image contains only the Clean components, not convolved
        with the Clean beam.
 0    Normal behaviour:  Convolve Clean components with Clean beam and 
        add the residuals.
+1    Convolve Clean components, but do not add the residuals. 
.fi 

.ti -4
2 CLEAN__SEARCH    

  (Deprecated, use alternate name  MOSAIC__SEARCH) 
Fraction of peak response of the primary beams coverage beyond
which no Clean component is searched in a Mosaic deconvolution.

The default is 0.2.
    
.ti -4
2 CLEAN__SIDELOBE  

Minimal relative intensity to consider for fitting the syntheized
beam to obtain the Clean beam parameters (BEAM__FITTED variable)
when 0.  The default is 0.35.

In case of poor UV coverage, CLEAN__SIDELOBE should be higher than the
maximum sidelobe level to perform a good Gaussian fit. Some particularly
bad UV coverage may not allow any good fit at all, however.

.ti -4
2 CLEAN__SMOOTH     

  Smoothing factor between different scales in the MRC and MULTISCALE
methods.  The default is 2 or 4 for MRC
depending on image size. It is sqrt(3) for MULTISCALE and may
be set to larger values if needed. 
  
.ti -4
2 CLEAN__SPEEDY    

  Speed-up factor for the CLARK major cycles. The default is 1.0.
Larger values may be used, but at the expense of possible instabilities
of the algorithm.

.ti -4
2 CLEAN__STOP

  CLEAN__STOP is a 2-elements character string that defines the Clean stopping criterium. 
  
If CLEAN__STOP is not empty, it supersedes the older CLEAN__ARES, CLEAN__FRES and CLEAN__NITER 
variables (and their even older ARES, FRES, NITER historical equivalent), and even the CLEAN__NKEEP
variable, providing a more flexible syntax to specify the stopping criterium.

The general syntax is
  LET CLEAN__STOP Value [Unit]
.nf
  LET CLEAN__STOP   1 Sigma     Indicates stopping at 1 times the noise level
  LET CLEAN__STOP   10 mJy      Indicates stopping at 0.01 Jy/beam  
  LET CLEAN__STOP   1  %        Indicates stopping at 0.01 of the peak value
  LET CLEAN__STOP   100 Iterations  Set the max number of iterations to 100
  LET CLEAN__STOP   20 Stop     Indicates convergence is tested over 20 iterations
.fi
If no unit is specified, the last specified unit is used instead. Sub-units (mJy, Jy, milliJy, microJy, etc...)
are allowed for convenience.

CLEAN__STOP overwrites the previously specified CLEAN__ARES, CLEAN__FRES, CLEAN__NITER and CLEAN__NKEEP
values when (and only when) CLEAN is executed.

.ti -4  
2 CLEAN__TRUNCATE   

  Fraction of peak response of the primary beams coverage under
which the Sky brightness image is blanked in a Mosaic deconvolution.
  
  It is also used as a default truncation value in the PRIMARY
command. The default is 0.2.  An alternate name is MOSAIC__TRUNCATE.

.ti -4
2 CLEAN__WORRY     

  Worry factor in the MULTISCALE method for convergence. It propagates
the S/N from one iteration to the other, so that if this S/N
degrades, the method stops. Default is 0 (no propagation, and
hence no test on S/N).  The value should be < 1.0 in all cases.

 
.ti -4
2 METHOD

  Method used for the deconvolution. Can be HOGBOM, MULTI, MRC,
  SDI or CLARK.
  
  
.ti -4
2 MOSAIC__SEARCH    

Fraction of peak response of the primary beams coverage beyond
which no Clean component is searched in a Mosaic deconvolution.

The default is 0.2. (Old, deprecated name CLEAN__SEARCH)

.ti -4
2 MOSAIC__TRUNCATE   

  Fraction of peak response of the primary beams coverage under
which the Sky brightness image is blanked in a Mosaic deconvolution.
  
  It is also used as a default truncation value in the PRIMARY
command. The default is 0.2.  An alternate name is CLEAN__TRUNCATE
(for historical reasons).

.ti -4
2 Old__Names:

  Some of the CLEAN parameters have kept their old names:
BLC, TRC and BEAM__PATCH (which are seldom used)
  
  Others have equivalent short names: ARES, FRES, GAIN, NITER
for which the CLEAN__ prefix may be omitted.

  MAJOR, MINOR, ANGLE (which were used to control the Clean beam
size) have been replaced by BEAM__SIZE[3]

.ti -4
2 BLC

These are the (pixel) coordinates of the Bottom Left Corner of the cleaning
box.  The default (0,0) means the bottom left quarter (Nx/4,Ny/4).
If a SUPPORT is defined, BLC is ignored.

.ti -4
2 TRC

These are the (pixel) coordinates of the Top Right Corner of the cleaning
box.  The default (0,0) means the top right quarter (3*Nx/4,3*Ny/4).
If a SUPPORT is defined, TRC is ignored.

.ti -4
2 MAJOR

This was the major axis (FWHP) of the Gaussian restoring beam. 
Replaced by BEAM__SIZE[1] instead.

.ti -4
2 MINOR

This was the minor axis (FWHP) of the Gaussian restoring beam. 
Replaced by BEAM__SIZE[2] instead.

.ti -4
2 ANGLE

This was the position angle (from North towards East, i.e. anticlockwise) of
the major axis of the Gaussian restoring beam. 
Replaced by BEAM__SIZE[3] instead.

.ti -4
2 BEAM__PATCH

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 HOGBOM algorithm.


