.ec _
.ll 76
.ad b
.in 4
.ti -4
1 Language
.nf
CLEAN         : Deconvolve a dirty image using the current METHOD
CLARK         : Deconvolve a dirty image using the CLARK clean algorithm
DUMP          : Dump the control parameters of the deconvolution algorithms
FIT           : Fit the dirty beam
FLUX          : Cross-Check flux scales (experimental)
HOGBOM        : Deconvolve a dirty image using the basic clean algorithm
LOAD          : Load an image or cube into the W SIC variable
# MFS           : Multi Frequency Synthesis (under development)
MAP__RESAMPLE  :  Resample a Map on a different Velocity/Frequency scale
MAP__INTEGRATE :  Compute a Moment 0 Map
MAP__COMPRESS  :  Average a Map by several channels 
MOSAIC        : Toggle the mosaic mode
MULTI         : Deconvolve a dirty image using the MULTI-SCALE Clean
MRC           : Deconvolve a dirty image using the MULTI-RESOLUTION Clean
MX            : Iteratively image and deconvolve a dirty image
PRIMARY       : Apply primary beam correction
READ          : Read the input files in internal buffers
SDI           : Deconvolve a dirty image using the Steer-Dewdney-Ito Clean
SHOW          : Display (in a plot) some internal buffer result
SPECIFY       : Change the Frequency / Velocity scale or the Telescope
STATISTIC     : Compute statistics on image
SUPPORT       : Define the support used to search clean components
UV__BASELINE   : Subtract a continuum baseline from a Line UV data
UV__CHECK      : Check UV data for null visibilities or per channel flags
UV__COMPRESS   : Compress a Line UV data into another Line UV data
UV__CONTINUUM  : Compress a Line UV data into a Continuum UV data
UV__EXTRACT    : Extract a range of channels from UV data
UV__FILTER     : Filter out (line) channels
UV__FLAG       : Interactively flag UV data
UV__MAP        : Build the dirty image and beam from a UV table
UV__RMS        : Compute the RMS spectrum of the UV table visibilities
UV__RESAMPLE   : Resample (in Velocity) the UV data
UV__RESIDUAL   : Subtract Clean Component from the UV Data
UV__RESTORE    : Restore a Clean image from UV data and Clean Components
UV__SHIFT      : Shift a Mosaic UV table to common phase center
UV__SORT       : Sort and Transpose UV data for plotting
UV__STACK      : Compute the mean spectrum of the UV table visibilities
UV__STAT       : Gives beam sizes and noise properties as a function of
                 tapering or robust weighting parameter
UV__STOKES     : Extract one polarization state from a polarized UV table
UV__TIME       : Time average the current UV data
UV__TRUNCATE   : Truncate the baseline range of the UV data
VIEW          : Show (in a GO VIEW-like plot) some internal buffer result
WRITE         : Save internal buffers into output files
.fi

.ti -4
1 CLARK
.ti +4
[CLEAN_\]CLARK [FirstPlane LastPlane] [/PLOT Clean|Residu] [/FLUX Fmin Fmax]

A Major-Minor cycles CLEAN method, originally developed by B.Clark, in
which clean components are selected using a limited beam patch, and
deconvolved through Fourier transform at each major cycle. In mosaic mode
(See command MOSAIC), a mosaic clean is performed. Rings and/or strips may
appear on extended sources.  Faster than the Hogbom method for single
fields but maybe slower for mosaics. The strategy to search for CLEAN
components in CLARK does not work properly when the secondary side lobes
are too large (e.g. larger than 0.3).

Clean the specified plane interval (default: planes between variables
FIRST and LAST). If option /PLOT is given, a display of the CLEAN or
RESIDUAL map will be shown at each major cycle, depending on the
argument (default: Residual). The cumulative, already cleaned flux is
displayed in real time in an additional window while cleaning goes on
when the /FLUX option is present. Parameters of the /FLUX option are
then used to give the flux limits for this display. The options /FLUX
and /PLOT are inactive in Parallel mode.

.so map-help-clean-input.nroff

.so map-help-clean-clean-list.nroff
.so map-help-clean-clean-desc.nroff

.ti -4
1 CLEAN
.ti +4
[CLEAN_\]CLEAN [FirstPlane LastPlane] [/PLOT Clean|Residu] [/FLUX Fmin Fmax] 
 [/NITER NiterList] [/ARES AresList]

Deconvolve a mosaic or single-field using the current METHOD (in SIC variable METHOD).
See INPUT CLEAN for the other SIC variables controlling the deeconvolution process.

Supported methods are CLARK, HOGBOM, MRC, MULTISCALE and SDI. See help of each
of these commands for further details on each algorithm



.so map-help-clean-input.nroff

.so map-help-clean-clean-list.nroff

.ti -4
2 /FLUX
.ti +4
[CLEAN_\]CLEAN [FirstPlane LastPlane] /FLUX Fmin Fmax [/PLOT Clean|Residu] [/NITER NiterList] [/ARES AresList]

Display the cumulative Clean flux as Clean progresses. This option is
inactive in Parallel mode.

.ti -4
2 /PLOT
.ti +4
[CLEAN_\]CLEAN [FirstPlane LastPlane] /PLOT Clean|Residu [/FLUX Fmin Fmax] [/NITER NiterList] [/ARES AresList]

Display the iterated Clean or Residual image for Cleaning methods which have
major cycles (CLARK or SDI). This option is inactive in Parallel mode.


.ti -4
2 /NITER
.ti +4

[CLEAN_\]CLEAN [FirstPlane LastPlane] /NITER NiterList [/PLOT Clean|Residu] [/FLUX Fmin Fmax] [/ARES AresList]

Use a per-plane value for the number of iterations, instead of the
global NITER variable.  NiterList should be a 1-D integer array
of dimension the number of channels.

This option is only available through the CLEAN command, not through
the specific command of each method.

.ti -4
2 /ARES
.ti +4

[CLEAN_\]CLEAN [FirstPlane LastPlane] /ARES AresList [/PLOT Clean|Residu] [/FLUX Fmin Fmax] [/NITER NiterList] 

Use a per-plane value for the absolute residual used to stop
cleaning,  instead of the
global ARES variable.  AresList should be a 1-D real  array
of dimension the number of channels.

This option is only available through the CLEAN command, not through
the specific command of each method.

.so map-help-clean-clean-desc.nroff

.ti -4
1 DUMP
.ti +4
[CLEAN_\]DUMP [U]

Dump on screen the control parameters of the different CLEAN deconvolution
algorithms, mainly for debugging purpose. "DUMP U" dumps the parameters as
input by the user while "DUMP" dumps the parameters really used and/or
modified by the deconvolution algorithm.

.ti -4
1 FIT
.ti +4
[CLEAN_\]FIT [Field]

Fit the dirty beam to obtain the clean beam parameters.  This is done
automatically by all CLEAN algorithms when needed. Clean beam parameters can
also be specified by the users, by setting the variables MAJOR,
MINOR and ANGLE to values other than their default values (0,0,0). In
this case, no automatic fit will be performed.  We strongly discourage the
use of those variables.

In mosaic mode, you can specify on which field the fit has to be made,
using the first argument.

The result of the FIT command are stored in the following SIC variables
.nf
   FITTED%MAJOR   Beam major axis size in radian
   FITTED%MINOR   Beam minor axis size in radian
   FITTED%ANGLE   Beam position angle in degree
.fi


.ti -4
1 FLUX__SCALE
.ti +4
[CLEAN_\]FLUX Find|Apply|List|Calibrate [VarName]

A set of commands to check flux calibration on a day to day basis.  A
supervising procedure, check__flux.map, allows self-calibration of the
flux by using as intermediate model a table generated by the Clean
Component list.

FLUX FIND DateTolerance
.br
determines, by linear regression, the best scaling factor to match date
by date the UV data set with the MODEL data set. Dates are assumed identical
if separated by less than DateTolerance

FLUX APPLY VarName
.br
apply previously determined flux scale factors to the MODEL data set,
previously read by READ MODEL.
This is in general used only in an iterative search way, e.g. by procedure
check__flux. The resulting UV data set is loaded into the specified
VarName SIC variable.

FLUX LIST
.br
print out dates, baselines and determined flux factors

FLUX CALIBRATE
.br
apply previously determined flux scale factors to the UV data set. This
may then be written using command WRITE UV .


.ti -4
1 HOGBOM
.ti +4
[CLEAN_\]HOGBOM [FirstPlane LastPlane] [/FLUX Fmin Fmax]

See HELP CLEAN for the SIC variables controlling the deeconvolution process.

The simplest CLEAN algorithm, originally developed by Hogbom. In mosaic
mode (See command MOSAIC), a mosaic clean is performed.  Rings and or
strips may appear on extended sources. It is slower than CLARK for a single
field but maybe faster for a mosaic. It is extremely robust.  Cleaning can
be interrupted by pressing _^C at any time.

Clean the specified plane interval (default: Planes between variables FIRST
and LAST). The cumulative, already cleaned flux is displayed in real time
in an additional window while cleaning goes on when the /FLUX option is
present. Parameters of the /FLUX option are then used to give the flux
limits for this display.The option /FLUX is inactive in Parallel mode.

.so map-help-clean-input.nroff

.so map-help-clean-clean-list.nroff
.so map-help-clean-clean-desc.nroff

.ti -4
1 LOAD
.ti +4
[CLEAN_\]LOAD Buffer

Load the internal Buffer (CLEAN, DIRTY, RESIDUAL, BEAM, etc...) into the SIC
variable named W for future use with standard GREG commands. Used in
particular by the procedure GO PLOT, and by command SHOW.


.ti -4
1 MAP__COMPRESS
.ti +4
[CLEAN_\]MAP__COMPRESS WhichOne Nc

Resample (in frequency/velocity) the images (computed by UV__MAP or 
CLEAN, or loaded by READ WhichOne) by averaging NC adjacent channels. 

WhichOne indicates which image must be compressed (DIRTY, CLEAN, SKY).
WHichOne = * can be used to treat all the possible images.

.ti -4
1 MAP__INTEGRATE
.ti +4
[CLEAN_\]MAP__INTEGRATE WhichOne Min Max Type

Compute the integrated intensity map(s) over the specified
range from the current image()s (computed by UV__MAP or 
CLEAN, or loaded by READ WhichOne). Type can be VELOCITY
FREQUENCY or CHANNELS. 

WhichOne indicates which image must be compressed (DIRTY, CLEAN, SKY).
WhichOne = * can be used to treat all the possible images.

.ti -4
1 MAP__RESAMPLE
.ti +4
[CLEAN_\]MAP__RESAMPLE WhichOne Nc Ref Val Inc

Resample the images (computed by UV__MAP or 
CLEAN, or loaded by READ WichOne) on a different velocity scale.  
.nf
     Nc   new number of channels
     Ref  New reference channel
     Val  New velocity at reference channel
     Inc  Velocity increment
.fi
WhichOne indicates which image must be compressed (DIRTY, CLEAN, SKY)
WHichOne = * can be used to treat all the possible images.

.ti -4
1 SPECIFY
.ti +4
[CLEAN_\]SPECIFY FREQUENCY|VELOCITY|TELESCOPE Value

Modify the rest frequency, systemic velocity or telescope for the
current UV buffers.

.ti +4
SPECIFY FREQUENCY Value
.br
Modify the rest frequency and recompute the velocity scale accordingly.
Value is the new rest frequency in MHz

.ti +4
SPECIFY VELOCITY Value
.br
Modify the source velocity and recompute the rest frequency scale accordingly
Value is the new velocity in km/s.

.ti +4
SPECIFY TELESCOPE Name

Add or Replace the telescope section with the parameters (name,
size, position) for the specified telescope name, essentially to 
get the most appropriate beam parameter.

A Telescope section is required for MOSAIC. The beamsize will
depend on telescope diameter and frequency, with a telescope
dependent factor. The default beam size is 1.13 Lambda/D.

.ti -4
1 MOSAIC
.ti +4
[CLEAN_\]MOSAIC On|Off

Turn on or off the mosaic mode for deconvolution. Note that a READ PRIMARY
command, or a UV__MAP command working on a Mosaic UV Table, automatically switches
on the mosaic mode. The program prompt changes to inform the user of the
current operating mode for deconvolution.

.ti -4
1 MRC
.ti +4
[CLEAN_\]MRC [FirstPlane LastPlane] [/PLOT Clean|Residu] [/FLUX Fmin Fmax]

Perform a Multi-Resolution CLEAN on the current dirty image.  MRC does not
support mosaics for theoretical reasons.

Clean the specified plane interval (default: planes between variables
FIRST and LAST). If option /PLOT is given, a display of the CLEAN or
RESIDUAL map will be shown at each major cycle, depending on the
argument (default: Residual). The cumulative, already cleaned flux is
displayed in real time in an additional window while cleaning goes on
when the /FLUX option is present. Parameters of the /FLUX option are
then used to give the flux limits for this display. A summary plot
with the Difference, Smooth, and total CLEANed maps is also displayed.
The options /FLUX and /PLOT are inactive in Parallel mode.

.so map-help-clean-input.nroff

.so map-help-clean-clean-list.nroff
.nf
RATIO      [       ] Smoothing factor (default 0: guess, otherwise must be 2^n)
.fi
.so map-help-clean-clean-desc.nroff

.ti -4
2 RATIO

Used smoothing factor, which must be a power of 2. The default is 0, to indicate
that the actual value must be estimated from the image size.

.ti -4
1 MULTI
.ti +4
[CLEAN_\]MULTI [FirstPlane LastPlane] [/FLUX Fmin Fmax]

Multiscale CLEAN algorithm.

Clean the specified plane interval (default: Planes between variables
FIRST and LAST). The cumulative, already cleaned flux is displayed in
real time in an additional window while cleaning goes on when the
/FLUX option is present. Parameters of the /FLUX option are then used
to give the flux limits for this display. The option /FLUX is inactive
in Parallel mode.

MULTI does not yet work on mosaics.

.so map-help-clean-input.nroff
.so map-help-clean-clean-list.nroff
.nf
SMOOTH     [       ] Smoothing factor (default sqrt(3))
.fi
.so map-help-clean-clean-desc.nroff

.ti -4
2 SMOOTH

Smoothing ratio between the different scales. The default is sqrt(3), but larger
values should be used for large images with wide spatial dynamic range.

.ti -4
1 MX
.ti +4
[CLEAN_\]MX [FirstPlane LastPlane] [/PLOT Clean|Residu] [/FLUX Fmin Fmax] 

Make and deconvolve maps starting from a UV table. It combines UV__MAP and
CLEAN in a single step.

The mapping process is identical to UV__MAP.  It makes a map from UV data
by griding the UV data using a convolving function, and then Fast Fourier
Transforming the individual channels.  However, MX always produces a single
beam for all channels, thus neglecting frequency change between channels.
MX enables to shift the map center and rotate the image, by shifting the
phase tracking center and rotating the UV coordinates of the input UV
table.

The CLEAN algorithm is similar to the CLARK method, but with major
cycles operating directly on the ungridded UV table rather than in the
image plane. Accordingly, aliasing affects only of the residuals, not
the clean components. It is thus more accurate but also slower than
CLARK as it asks for the gridding step at each major cycle.  MX also
shares the same limitation as CLARK on large sidelobes. The option
/FLUX is inactive in Parallel mode.

.so map-help-clean-input.nroff

.so map-help-clean-uvmap-list.nroff
.so map-help-clean-clean-list.nroff
.so map-help-clean-uvmap-desc.nroff
.so map-help-clean-clean-desc.nroff
.\"====================================================================
.ti -4
1 PRIMARY
.ti  +4
[CLEAN_\]PRIMARY [/TRUNCATE Percent]

Apply approximate primary beam correction to a single field deconvolved
(CLEAN) image, in order to create the sky brightness image (named SKY).
The primary beam model is a simple Gaussian.

The Gaussian beam is taken from the telescope parameters, as found in
the telescope section of the CLEAN image, and from the observing frequency
of each channel in the CLEAN image (e.g. for ALMA it uses 1.13 Lambda/D).
For spectral cubes, the correction is thus frequency-dependent along the
spectral axis.

The SKY image is written with extension .lmv-sky by command WRITE.
.\"====================================================================
.ti -4
2 /TRUNCATE
.ti  +4
[CLEAN_\]PRIMARY /TRUNCATE Percent

Specify the truncation level. Default (in % of peak beam response)
is given by the MAP__TRUNCATE variable.
Values are blanked beyond this. For spectral cubes, this beam-response
threshold is evaluated independently for each channel.

.ti -4
1 READ
.ti +4
[CLEAN_\]READ Buffer File [/FREQUENCY RestFreq]
  [/RANGE Min Max Type] [/NOTRAIL]

Read the specified internal buffer (BEAM, CCT, CLEAN, DIRTY, MASK,
MODEL, PRIMARY, RESIDUAL, SKY, SUPPORT, UVDATA) from input
File. Default extension are .uvt for UVDATA and MODEL, and then .beam,
.lobe, .lmv, .lmv-clean, .msk, .cct and .lmv-sky respectively. A
subset of all available channels can be indicated through the /RANGE
option, even for UV tables.

READ FIELDS (reading the .fields file) is not available as the FIELDS
buffer is just a (redundant) 231 transposition of the PRIMARY
buffer. Mapping has no internal need on a FIELDS buffer, and uses the
PRIMARY buffer instead.

The corresponding buffer is available as a SIC image-like variable of
the same name, so that one can use e.g. HEADER DIRTY command.

READ * Name (without extension) will attempt to read all existing
files of same Name with the standard file extensions corresponding to
the respective buffers. Types and associated extensions are available
in Sic arrays FILE__TYPE and FILE__EXT.

The MODEL UV table is for use in conjunction with command FLUX.

The /NOTRAIL allows to ignore trailing columns (normally not
recommended. Used for debug only).
.\"--------------------------------------------------------------------
.ti -4
2 Optimisation
.ti +4

Reading can be lengthy, especially for ALMA data.
Mapping attempts to minimize read operations by checking
if anything has changed since the last command.  This
capability is enabled if the SIC variable MAPPING__OPTIMIZE
is non zero, disabled otherwise.
  Currently, the READ command always display a message
about what reading may have been skipped, and whether this
possible optimization has been overridden by user choice.

.ti -4
2 /COMPACT
.ti +4
[CLEAN_\]READ Buffer File /COMPACT [/RANGE Min Max Type]

Read the specified internal buffer (UV, MODEL,
BEAM, PRIMARY, DIRTY, CLEAN, MASK, CCT) from input File to the
"compact array" data area.

.ti -4
2 /FREQUENCY
.ti +4
[CLEAN_\]READ Buffer File /FREQUENCY RestFreq [/RANGE Min Max Type]

Read the specified internal buffer and reset the velocity
scale to the corresponding rest frequencies. Velocities specified
in the /RANGE Min Max VELOCITY option would then refer to this
new frequency.

.ti -4
2 /NOTRAIL
.ti +4
[CLEAN_\]READ Buffer File /NOTRAIL [/FREQUENCY Freq] [/RANGE Min Max Type]

When reading UV Tables, ignores any trailing column. Trailing
columns normally appear for mosaics. However, ALMA sometimes uses
known proper motions to shift (by small amounts) phase centers
between two observing periods, yielding pseudo-mosaics with tiny
(in general insignificant) displacements.  The /NOTRAIL option
allows to ignore these details.

.ti -4
2 /PLANES
.ti +4
[CLEAN_\]READ Buffer File /PLANES First Last

  ** OBSOLESCENT **
Use /RANGE for a simpler interface.

Load only "channels" between First and Last.
For UV tables with more than 1 Stokes parameter,
which are **NOT** fully supported by Mapping, the
meaning of "channel" is ambiguous.

.ti -4
2 /RANGE
.ti +4
[CLEAN_\]READ Buffer File /RANGE Min Max Type

Load only the channels between the First and Last
defined by Min Max and Type.  Type can be
CHANNEL, VELOCITY or FREQUENCY.

For type CHANNEL, Min and Max indicate offsets from
Channel 1 and Channel Nchan (the number of channels
in the data set). Thus Max can be negative: it then
indicates Last = Nchan-Max. Also Min=0 and Max=0 implies
loading all the channels.

.ti -4
1 SDI
.ti +4
[CLEAN_\]SDI [FirstPlane LastPlane] [/PLOT Clean|Residu] [/FLUX Fmin Fmax] 

Perform a Steer-Dewdney-Ito CLEAN. This clean method selects an ensemble of
clean components and remove them at once using FFTs.  It works best for
extended sources and UV coverages with short spacings. In such a case, it
may avoid the "ringing" features which appear using the CLARK or HOGBOM
techniques. In mosaic mode (see command MOSAIC), a mosaic clean is
performed.

Clean the specified plane interval (default: planes between variables
FIRST and LAST). If option /PLOT is given, a display of the CLEAN or
RESIDUAL map will be shown at each major cycle, depending on the
argument (default: Residual). The cumulative, already cleaned flux is
displayed in real time in an additional window while cleaning goes on
when the /FLUX option is present. Parameters of the /FLUX option are
then used to give the flux limits for this display. The options /FLUX
and /PLOT are inactive in Parallel mode.

.so map-help-clean-input.nroff
.so map-help-clean-clean-list.nroff
.so map-help-clean-clean-desc.nroff

.ti -4
1 SHOW
.ti +4
[CLEAN_\]SHOW Variable [Arg1 [Arg2]]

Variable
.ti +4
is the internal buffer to be plotted (BEAM, CCT, CLEAN, DIRTY, FIELDS,
MASK, RESIDUAL, SUPPORT, UV)

.br
Arg1 and Arg2
.ti +4
are optional arguments to restrict the range of channels to be plotted
(default FIRST and LAST variables), except for UV data where they have
a different meaning, with Arg1 being the antenna to be highlighted, if
any, and Arg2 for an optional date.

The buffer is loaded in SIC Header variable W, and then displayed using
the appropriate procedure
.nf
  p__plot__w
  p__cct__w for Clean Component Tables
  p__uvshow for UV data
.fi
Command VIEW offers a different style of display for cubes.

The UV data in the internal buffer is the one loaded by command
READ UV File and optionally resampled by UV__RESAMPLE, UV__COMPRESS or
transformed by UV__CONT. Flagged UV data  will appear in a different color.

GO PLOT and GO UVSHOW offer similar features, but taking
data from files instead of the internal buffers. They may overwrite the
internal buffers.

.ti -4
2 COVERAGE
.ti +4
SHOW COVERAGE [Ant [Date]]

Displays the UV coverage.
Ant and Date are optional arguments indicating which Antenna
is to be highlighted, and for which date. Date is a sequential
number from 1 to the number of observing dates.

.ti -4
2 UV
.ti +4
SHOW UV [Ant [Date]]

Displays the UV data.  Items to be displayed are controlled
by XTYPE and YTYPE variables.
Ant and Date are optional arguments indicating which Antenna
is to be highlighted, and for which date. Date is a sequential
number from 1 to the number of observing dates.

Structure uvshow% controls some additional options, such
as coloring of various dates, of data flagging, etc...

.ti -4
2 GO__PLOT
.ti +4
GO PLOT provides a somewhat different plotting mechanism, using the
corresponding disk files rather than the internal buffers.
.nf
  GO PLOT Variable [First [Last]]
.fi
which will plot channels of the specified data set.
First (default: 0) and Last (default: First) are optional arguments
indicating the first and last channel to be displayed. If not specified the
variables FIRST and LAST are used.

Most aspects of the display are controlled through the same SIC variables
as the ones used by the "GO BIT|MAP|LMV" commands. Detailed information
about those variables is found through the "INPUT LMV" command.

.ti -4
2 GO__UVSHOW
.ti +4
GO UVSHOW

Display UV data from the 'name'.uvt file. Control parameters
are available as SIC variables. Use command INPUT UVSHOW to check them.

.ti -4
1 STATISTIC
.ti +4
[CLEAN_\]STATISTIC [Clean|Dirty|Residu] [Plane] [/WHOLE]

Compute some basic statistics (min, max, mean, rms,...) on the specified
buffer (default: Clean) and plane (default: variable FIRST). The current
polygon (see command SUPPORT) is used to define the area on which the
pixels are to be taken into account, except when option /WHOLE is present:
The whole image is then considered.

.ti -4
1 SUPPORT
.ti +4
[CLEAN_\]SUPPORT [Polygon] [/CURSOR] [/MASK] [/PLOT] [/RESET] 
  [/VARIABLE] [/THRESHOLD [Raw Smooth Length Guard]]

Define and/or plot the support inside which to search for CLEAN 
components. The support can be defined through a mask or a polygon, 
depending on the selected options.
selected.

A polygon stored in a file, or in a Sic variable (/VARIABLE option),
can be loaded as support. The /PLOT option can then be used to plot
it.


.ti -4
2 /CURSOR
.ti +4
[CLEAN_\]SUPPORT /CURSOR

With option /CURSOR, it calls the interactive cursor to define the polygon
summits.  Type any key to go to next summit, D to correct the last one and
type E to end the polygon definition. The last polygon side will then
appear. The polygon definition may be aborted by typing Q. For graphical
displays, you may use the mouse buttons for the commands.  The left mouse
button draws a vertex, the middle mouse button deletes the last vertex, and
the right mouse button ends the polygon definition.

The resulting support is available in the Sic structure SUPPORT:
.nf
  - SUPPORT%NXY  [Integer]  Number of summits
  - SUPPORT%X    [Double]   X coordinates
  - SUPPORT%Y    [Double]   Y coordinates
.fi

.ti -4
2 /RESET
.ti +4
[CLEAN_\]SUPPORT /RESET

Reset any support to default. This deletes the current polygon support.
This does not unload any mask defined  by READ MASK: it can be 
re-instated by SUPPORT /MASK.

.ti -4
2 /MASK
.ti +4
[CLEAN_\]SUPPORT /MASK

Use the mask defined by READ MASK as the clean support. This does not
suppress the current polygon: it can be re-instated by SUPPORT /PLOT.
The Mask can be a 3-D array: CLEAN will find out match which mask 
plane must be used for each spectral channel. 

Caution: READ MASK does not perform an implicit SUPPORT /MASK command.

.ti -4
2 /PLOT
.ti +4
[CLEAN_\]SUPPORT [Name] /PLOT

Plot the current (or specified) polygon, or plot the current mask
(if it is 2-D only).

.ti -4
2 /THRESHOLD
.ti +4
[CLEAN_\]SUPPORT /THRESHOLD [Raw Smooth [Length [Guard]]

Define a Mask from thresholding the CLEAN image. If the CLEAN image
is 3-D, the Mask will be 3-D.   `

The method involves a first thresholding, followed by a smoothing
to extend the support and a second thresholding. 

The algorithm to define the mask is controlled by 4 parameters.
.ti +4  
Raw    
.br 
Initial threshold (in units of CLEAN image noise) under 
which the mask is set to 0.  Default is 6 sigma. The noise is
taken from the computed Clean noise (clean%gil%rms) if defined,
or from the theoretical noise (dirty%gil%noise) if not.
.ti +4  
Smooth 
.br 
Threshold under which the Mask is set to 0 after smoothing. The
default is 2 sigma.
.ti +4  
Length
.br 
FWHM of the smoothing gaussian to derive the smooth mask from
the initial mask.  The default is the Clean beam major axis.
.ti +4 
Guard 
.br 
Size of the guard band at edges where the mask is set to zero, in units
of image size. The default is 0.18, i.e. the mask can extends
a little more than the inner quarter.  This is to avoid the
edges where sidelobes aliasing occurs.

The computed mask can be displayed by SHOW MASK and saved by
WRITE MASK for further use.
 
.ti -4
2 /VARIABLE
.ti +4
[CLEAN_\]SUPPORT VarName /VARIABLE

Load the support from the Sic variable VarName. VarName can be an 
array of the form:
.br
         VarName[NXY,2]  Real or Double

or a structure of the form (i.e. same as output):
.br
         VarName%NXY             Integer or Long
         VarName%X[VarName%NXY]  Real or Double
         VarName%Y[VarName%NXY]  Real or Double


.ti -4
1 UV__BASELINE
.ti +4
[CLEAN_\]UV__BASELINE [Degree] [/CHANNELS Channel__List] [/RANGE list of ranges]
  [/FREQUENCY List of Frequencies] [/WIDTH Width [TYPE]]

Subtract a continuum from a line UV data set, by fitting a baseline
for each visibility. The degree for the baseline can be either 1 or 0,
with the default being 0. The channels to be ignored in this process
(i.e. the ones including the line emission) can be specified either by
the /CHANNELS option, the /RANGE option or by the /FREQUENCY and
/WIDTH options.

.ti -4
2 /CHANNELS
.ti +4
[CLEAN_\]UV__BASELINE /CHANNELS C1 [... [Cn]] | VARIABLE

List of channels to ignore while fitting the baseline. The channels
can be given as values C1, C2, ..., Cn or through a SIC variable. The
SIC variable can be either a scalar (i.e. a single channel) or a 1-D
array (i.e. a list of channel).

.ti -4
2 /RANGE
.ti +4
[CLEAN_\]UV__BASELINE /RANGE F1 L1 [... [Fn Ln]] [TYPE]

Specify ranges to be ignored while fitting the baseline.  At least two
values must be provided, F1 and L1 being the first and last elements
of the range TYPE in the first range and Fn and Ln being the first and
last elements of the range TYPE in the n-eth range. TYPE can be
FREQUENCY (in MHz), VELOCITY (in km/s) or CHANNEL (the default if TYPE
is not provided).

.ti -4
2 /FREQUENCY
.ti +4
[CLEAN_\]UV__BASELINE /FREQUENCY F1 [... [Fn]] [/WIDTH Width [TYPE]]

Specify around which frequencies the line emission should be ignored
while fitting the baseline. Frequencies F1 to Fn must be in MHz. The
full width of the spectral window to be ignored around each frequency
should be set explicitly with the option /WIDTH. If this option is not
given the width of the spectral window will be 1 channel. The optional
argument TYPE indicates the type of the width: FREQUENCY (in MHz),
VELOCITY (in km/s) or CHANNEL, the default being FREQUENCY.

Tip: it can be convenient to have a list of SIC variables containing
the frequencies of the most intense spectral lines, e.g.
.ti +8
HCO10 = 89188.52
.br
to be used as argument to the /FREQUENCY option e.g.
.ti +8
UV__BASELINE /FREQUENCY 'HCO10' 'CO10' /WIDTH 20 VELOCITY
.br

.ti -4
2 /WIDTH
.ti +4
[CLEAN_\]UV__BASELINE /FREQUENCY F1 [... [Fn]] /WIDTH Width [TYPE]

Specify the full width of the spectral windows to be defined around
each frequency given with the /FREQUENCY option. There is only one
width for all frequencies given. The optional argument TYPE indicates
the type of the width: FREQUENCY (in MHz), VELOCITY (in km/s) or
CHANNEL, the default type being FREQUENCY. The default width is the
current channel width.

.ti -4
1 UV__CHECK
.ti +4
[CLEAN_\]UV__CHECK  Beams|Nulls

  Check UV data for weight consistency.

  BEAMS
.br
  List which channel range can be processed with the same synthesized beam.

  NULLS
.br
  Check if there are null visibilities with non-zero weights, and flag
  them if found.


.ti -4
1 UV__COMPRESS
.ti +4
[CLEAN_\]UV__COMPRESS Nc

Resample the UV data loaded by READ UV by averaging NC adjacent
channels. All other UV commands except UV__RESAMPLE work on the "Resampled" UV table.

The "Resampled" UV table is a simple copy of the original one after a READ UV
command, or after a UV__RESAMPLE or UV__COMPRESS commands without arguments.



.ti -4
1 UV__CONTINUUM
.ti +4
[CLEAN_\]UV__CONTINUUM Naver [First Last]

Transform the (presumably spectral line) UV data set loaded by READ UV
into a "continuum" data set.

The transformation selects line channels from First to Last, average
them by groups of Naver contiguous channels, and concatenate the
resulting visibilities into a "continuum" UV table.

For each of the (First-Last+1)/Naver channels, and for all visibilities,
the U and V coordinates are rescaled to the mean observing frequency,
and the resulting (single-channel) visibilities are concatenated into
the "continuum" UV data set. The continuum dataset becomes the current
UV data. Flagged channels are ignored: this allows to mask channels
containing spectral lines (see UV__FILTER).

Default for First and Last is 0 0, meaning all channels are selected.
Negative value for Last indicate an offset from end channel (i.e. -20 means
ignore the last 20 channels).


.ti -4
1 UV__EXTRACT
.ti +4
[CLEAN_\]UV__EXTRACT  [/FREQUENCY frequency [/WIDTH Width [Unit]]] [/RANGE First Last [Unit]] 

Extract spectral line channels from UV table. The extracted channels
can be defined either through a range (/RANGE) or around a frequency
(/FREQUENCY) with a width around it (/WIDTH). If the specified
channels to extract go beyond the original spectral axis, the new
channels will be filled with zero for the real and imaginary parts as
well as the weights, effectively flagging them.

One of the options, /RANGE, or /FREQUENCY must be given and are mutually
exclusive.

.ti -4
2 /RANGE
.ti +4
[CLEAN_\]UV__EXTRACT /RANGE First Last [Unit]

Specify the spectral range to be extracted from UV table. By default
unit is CHANNEL.  Other options are FREQUENCY (in MHz) and VELOCITY
(in km/s).

.ti -4
2 /FREQUENCY
.ti +4
[CLEAN_\]UV__EXTRACT /FREQUENCY frequency [/WIDTH width [Unit]] 

Specify frequency around which to extract channels. Frequency must be
in MHz.  The full width of the extraction window around the frequency
can be set by option /WIDTH.  The optional argument Unit indicates the
type of width: FREQUENCY (in MHz), VELOCITY (in km/s) or CHANNEL (no
unit), the default being FREQUENCY.

.ti -4
2 /WIDTH
.ti +4
[CLEAN_\]UV__EXTRACT /FREQUENCY frequency /WIDTH width [Unit]

Specify frequency around which to extract the channels. Frequency must
be in MHz.  The full width of the extraction window around the
frequency can be set by option /WIDTH.  The optional argument Unit
indicates the type of width: FREQUENCY (in MHz), VELOCITY (in km/s) or
CHANNEL (no unit), the default being FREQUENCY. The default width is
the current channel width.
.\"====================================================================
.ti -4
1 UV__FILTER
.ti +4
[CLEAN_\]UV__FILTER [/ZERO] [/CHANNELS Channel__List] [/FREQUENCY List
of Frequencies] [/WIDTH Width] [/RANGE List of Ranges] [/ANTENNA List]
[/BASELINE List]

"Filter" line emission, by flagging the corresponding channels. The
channels can be specified either by the /CHANNEL option or by the
/FREQUENCY and /WIDTH options.

By default, channels to be filtered are flagged (weights becoming
negative).  Option /ZERO can be used to erase them: weights and
visibilities are set to zero, see HELP UV__FILTER /ZERO.
.\"--------------------------------------------------------------------
.ti -4
2 /CHANNELS
.ti +4
[CLEAN_\]UV__FILTER [/ZERO] /CHANNELS C1 [... [Cn]] | VARIABLE

With C1 to Cn being channels or variable being a scalar or 1-D SIC
variable containing the list of channels to filter out.
.\"--------------------------------------------------------------------
.ti -4
2 /RANGE
.ti +4
[CLEAN_\]UV__FILTER [/ZERO] /RANGE F1 L1 [... [Fn Ln]] [TYPE]

Specify ranges over which the emission should be filtered. At least
two values must be provided, F1 and L1 being the first and last
elements of the range TYPE. TYPE can be FREQUENCY (in MHz), VELOCITY
(in km/s) or CHANNEL (the default if TYPE is not provided).
.\"--------------------------------------------------------------------
.ti -4
2 /FREQUENCY
.ti +4
[CLEAN_\]UV__FILTER [/ZERO] /FREQUENCY F1 [... [Fn]] [/WIDTH Width]

Specify around which frequencies the line emission should be filtered.
Frequencies F1 to Fn must be in MHz. The full width of the filtering
window around every frequency can be set by option /WIDTH.
The optional argument TYPE indicates the type of width: FREQUENCY
(in MHz), VELOCITY (in km/s) or CHANNEL (no unit), the default
being FREQUENCY.  The default width is the current channel width.

Tip: it can be convenient to have a list of SIC variables containing
the frequencies of the most intense spectral lines, e.g.
.ti +8
HCO10 = 89188.52
.br
to be used as argument to the /FREQUENCY option e.g.
.ti +8
UV__FILTER /FREQUENCY 'HCO10' 'CO10' /WIDTH 20 VELOCITY
.\"--------------------------------------------------------------------
.ti -4
2 /WIDTH
.ti +4
[CLEAN_\]UV__FILTER [/ZERO] /FREQUENCY F1 [... [Fn]] /WIDTH Width [TYPE]

Specify the full width of the filtering
window around every frequency given in the /FREQUENCY option.
The optional argument TYPE indicates the type of width: FREQUENCY
(in MHz), VELOCITY (in km/s) or CHANNEL (no unit), the default
being FREQUENCY.  The default width is the current channel width.
.\"--------------------------------------------------------------------
.ti -4
2 /ZERO
.ti +4
[CLEAN_\]UV__FILTER /ZERO [/CHANNELS Channel__List]
  [/FREQUENCY F1 [... [Fn]] [/WIDTH Width [TYPE]]

Erase filtered channels (set weight and visibilities to zero) rather than
simply flagging them (weight set to negative value). This can be more
convenient for further display, but is not reversible.

By default, channels to be filtered are flagged (weights becoming negative, and
data can be unflagged by UV__FLAG).  Flagged channels are ignored in the averaging
process, such as UV__RESAMPLE or UV__CONT. However, as UV__MAP (in general) uses
only one channel to define the weights for all others, these flagged channels will
nevertheless appear in the imaged data cube.
.\"--------------------------------------------------------------------
.ti -4
2 /ANTENNA
.ti +4
[CLEAN_\]UV__FILTER ... /ANTENNA Ant1 ... AntN

Specify that the filtering applies on the given antennas only. Option
can be combined with /BASELINE.
.\"--------------------------------------------------------------------
.ti -4
2 /BASELINE
.ti +4
[CLEAN_\]UV__FILTER ... /BASELINE AntI1-AntJ1 ... AntIN-AntJN

Specify that the filtering applies on the given baselines only. Baseline
syntax accepts AntI as a 1 or 2 digits integers separated by a dash,
e.g. 1-2, 01-02, 1-10, etc. Option can be combined with /ANTENNA.
.\"====================================================================
.ti -4
1 UV__FLAG
.ti +4
[CLEAN_\]UV__FLAG [/RESET]

Display UV data and calls the cursor to interactively select a region where
UV data will be flagged (sign of weight is reversed). The /RESET option is
used to unflag the data. UV data flagged using command UV__FLAG can be saved on file
with command WRITE UV File. Detailed information about the display control
of the UV data may be found in the UV__SHOW help.

The user can control the algorithm through variables. Values of those
variables can be checked using "EXAMINE VARIABLE". New values can be given
using "LET VARIABLE value".

.nf
DATE__START  [    ] The date of the first data to be flagged
UT__START    [    ] The UT time of the first data to be flagged
DATE__END    [    ] The date of the last data to be flagged
UT__END      [    ] The time of the last data to be flagged
BASELINE    [    ] Baseline to flagged
CHANNEL     [    ] Channel range to be flagged/unflagged
FLAG        [    ] Flag or unflag the specified time range
.fi

Subsequent mapping with UV__MAP will ignore flagged data. However, for
multi-channel imaging, the weight column is (by default) taken from
one channel, so that channel-based flagging will not be recognized in the
default mode, but only in the "One Beam per Channel" mode.

.ti -4
2 DATE__START

The date (DD-MMM-YYYY) of the first data to be flagged.

.ti -4
2 UT__START

The UT time (hh:mm:ss.ss) of the first data to be flagged.

.ti -4
2 DATE__END

The date (DD-MMM-YYYY) of the last data to be flagged.

.ti -4
2 UT__END

The time (hh:mm:ss.ss) of the last data to be flagged.

.ti -4
2 BASELINE

Baseline (ALL, 12, 13, 23, ...) to flagged.

.ti -4
2 FLAG

Flag (T) or unflag (F) the specified time range.

.ti -4
2 CHANNEL

Channel range to be flagged/unflagged.
.\"====================================================================
.ti -4
1 UV__MAP
.ti +4
[CLEAN_\]UV__MAP [/TRUNCATE Percent]

Compute a dirty map and beam from a UV data. UV data must have been loaded
from a UV table by command "READ UV File".

The UV data can be a Mosaic UV table. In this case, UV__MAP will image
the Mosaic, using appropriate primary beam size and truncation level.

The primary beam size is taken from the telescope parameters, either
as found in the telescope section of the UV table and the observing
frequency (e.g. for ALMA it uses 1.13 Lambda/D). If absent, the
telescope section can be added by command SPECIFY TELESCOPE.

The truncation level is taken from variable MAP__TRUNCATE or from the 
/TRUNCATE option argument.

.so map-help-clean-input.nroff

.so map-help-clean-uvmap-list.nroff
.so map-help-clean-uvmap-desc.nroff
.\"====================================================================
.ti -4
1 UV__RMS
.ti +4
[CLEAN_\]UV__RMS

Compute the RMS of the visibilities loaded by READ UV as a function of the
frequency. The result is a complex visibility containing the RMS of the
real, imaginary, and weight.

.\"====================================================================

.ti -4
1 UV__RESAMPLE
.ti +4
[CLEAN_\]UV__RESAMPLE [Nc Ref Val Inc]

Resample the UV data loaded by READ UV on a different velocity scale.  All
other UV commands except UV__COMPRESS work on the "Resampled" UV table.
.nf
     Nc   new number of channels
     Ref  New reference channel
     Val  New velocity at reference channel
     Inc  Velocity increment
.fi
The "Resampled" UV table is a simple copy of the original one after a READ UV
command, or after a UV__RESAMPLE or UV__COMPRESS command without arguments.

.\"====================================================================

.ti -4
1 UV__RESIDUAL
.ti +4
[CLEAN_\]UV__RESIDUAL [Niter]

  Subtract the Niter first (default all) Clean Components from the UV data.
The residual UV data can be written by WRITE UV, and imaged by UV__MAP.

CAUTION: Does not work for Mosaics.

.\"====================================================================
.ti -4
1 UV__RESTORE
.ti +4
[CLEAN_\]UV__RESTORE

Create a Clean image from the UV data set and the Clean Component list.
The Clean Components are subtracted from the UV data set, and these residuals
are gridded and Fourier transformed to compute the Residual image. This
Residual image is added to the Gaussian beam convolved image of the sum of
Clean components. The results are similar to those of MX, since only the
residual are aliased.

The Gaussian restoring beam can also be specified by the user through
the SIC variables MAJOR, MINOR and ANGLE. As for CLEAN, if MAJOR and/or
MINOR are non-zero, no automatic beam fit is performed (see HELP CLEAN
MAJOR for details).

This command can be used after HOGBOM, CLARK, MULTI, SDI or MX (although
it is pointless after MX), but not MRC which has no notion of Clean
Components.

This command does not work for Mosaic (yet).
.\"====================================================================

.ti -4
1 UV__REWEIGHT
.ti +4
[CLEAN_\]UV__REWEIGHT Scale

Scale the weights of the current UV data with the defined Scale
factor.  Can be used to patch VLA data files which may
have only relative weights, not absolute values indicating the
noise.

.\"====================================================================

.ti -4
1 UV__SHIFT
.ti +4
[CLEAN_\]UV__SHIFT
.ti +4
[CLEAN_\]UV__SHIFT OffX OffY [Angle]
.ti +4
[CLEAN_\]UV__SHIFT HH:MM:SS.SSS DDD:MM:SS.SSS [Angle]

Shift a UV table to a new phase center.

.in +4
.ti -4
PHASE OFFSET MOSAICS:
.br
If the table is an observed mosaic with phase and pointing described
by the same offsets, the visibilities are aligned to a common phase
center and the offsets are replaced by pointing offsets only, with
pointing reference matching the phase center. That is, a pointing
offset mosaic.
.ti -4
POINTING OFFSET MOSAICS:
.br
If the table is already a phase-shifted mosaic with pointing offsets,
the visibilities are realigned to the new phase center, and the
pointing offsets are recomputed so that the pointing reference matches
the phase center.
.ti -4
SINGLE FIELD:
.br
If the table is single field UV table (i.e. with no offsets), the
visibilities are realigned to the new phase center. The pointing
reference is left unchanged.
.in -4

The new center can be defined as follows:

.in +4
.ti -4
COMMAND LINE ARGUMENTS:
.br
If a new phase center (absolute or relative coordinates) is provided
on the command line, it is used as new center. For phase offset
mosaics, relative coordinates are relative to the mosaic center
(i.e. UV__SHIFT 0 0 behaves like UV__SHIFT without argument). In the
other cases, they are relative to the A0 D0 reference in the table
header.
.ti -4
MAP__* VARIABLES:
.br
Without argument, UV__SHIFT rely on the variables MAP__RA, MAP__DEC
(absolute coordinates), and MAP__ANGLE if MAP__RA is non-empty.
.ti -4
AUTOMATIC
.br
Without arguments and MAP__RA empty, the phase center of a phase
offset mosaic is set as the mosaic center (it might not be A0 D0
depending on the fields coverage). If the mosaic is already
phase-shifted, the center is left unchanged.
.in -4

UV__SHIFT is implicitely called by UV__MAP.

.\"====================================================================

.ti -4
1 UV__SORT
.ti +4
[CLEAN_\]UV__SORT TIME|BASE|FIELD

Sort and transpose the UV data set, loaded by command READ UV File.
Order can be TIME for Time-Baseline ordering, BASE for Baseline-Time
ordering or FIELD to sort a mosaic UV data set per field. The sorted
UV data is then available in variable UVS for further plotting.

NOTE: This is only done in an internal buffer. WRITE UV will **NOT**
write this sorted, transposed, buffer.

.\"====================================================================

.ti -4
1 UV__STACK
.ti +4
[CLEAN_\]UV__STACK

Compute the mean of the visibilities loaded by READ UV as a function of the
frequency. The result is a complex visibility containing the RMS of the
real, imaginary, and weight.


.\"====================================================================

.ti -4
1 UV__STAT
.ti +4
[CLEAN_\]UV__STAT CELL|HEADER|SETUP|TAPER|WEIGHT  [Step Start]

UV__STAT allows the astronomer to select the best weighting
and imaging parameters according to its personal trade off between
angular resolution, sensitivity and field of view.

  Default is HEADER+SETUP

.ti -4
2 CELL
.ti +4
[CLEAN_\]UV__STAT CELL [Step Start]

Predict the synthesized beam, expected noise level, and recommended pixel
size for different values of  the uv cell size for current robust
weighting parameters.

.ti -4
2 HEADER
.ti +4
[CLEAN_\]UV__STAT HEADER

Display a brief summary of the UV data: number of antennas,
observing dates, baseline ranges,  spectroscopic information.

.ti -4
2 SETUP
.ti +4
[CLEAN_\]UV__STAT SETUP

Display recommended values for the imaging: image size,
pixel size, field of view, largest angular scale, etc...

.ti -4
2 TAPER
.ti +4
[CLEAN_\]UV__STAT TAPER [Step Start]

For TAPER, beam sizes and noise level (in flux and brightness) will be
computed for 9 different tapers (from Start to Start*Step^9).
Default value for Step is sqrt(2), Default value for Start
is 50 m. Weighting mode, UV cell size and "robust" parameter
are taken from variable UV__CELL (i.e. one can combine
Robust weighting and Tapering).

.ti -4
2 WEIGHT
.ti +4
[CLEAN_\]UV__STAT WEIGHT [Step Start]

For WEIGHT, beam sizes and noise level (in flux and brightness) will be
computed for 9 different "robust" weighting parameters (from Start to
Start*Step^9). Default value for Step is sqrt(10), and default value
for Start is derived to center the "robust" parameter values around 1.
UV cell size is taken from variable UV__CELL[1], and Taper is taken
from variable UV__TAPER.

.ti -4
1 UV__TIME
.ti +4
[CLEAN]UV__TIME [Time] [/Weight Wcol]

Average in time the current UV data set to reduce the number of visibilities.
Time must be in seconds. If not specified, an automatic guess
is performed based on antenna size and baseline lengths.

.ti -4
2 /WEIGHT
.ti +4
[CLEAN]UV__TIME Time /WEIGHT Wcol

Select the weight column. Default is 0.

.ti -4
1 UV__TRUNCATE
.ti +4
[CLEAN]UV__TRUNCATE Max [Min]

Truncate the UV data, by removing baselines out of
the specified range Min (default 0) and Max (in meter).

.ti -4
1 VIEW
.ti +4
[CLEAN_\]VIEW Variable [First [Last]]

where
.br
Variable
.ti +4 
is the internal buffer to be plotted (PRIMARY, BEAM, DIRTY,
RESIDUAL, CLEAN, SUPPORT or MASK)
.br
First and Last
.ti +4
are optional arguments to restrict the range of
channels to be plotted (default FIRST and LAST variables)

The buffer is loaded in SIC Header variable W, and then displayed using
the p__view procedure like in GO VIEW.  See SHOW for an alternative.

.ti -4
1 UV__STOKES
.ti +4
[CLEAN_\]UV__STOKES Key UVin  [UVout] 

Derive a single polarization UV table (UVout) with the polarization state 
specified by Key from a multi-polarization UV table (Uvin).  If UVout
is not specified, UVin is overwritten.  Key is any of the following:
NONE, I, Q, U, V, LL, RR, HH, VV.

A typical use is after command FITS on CASA data:
.nf 
  FITS Fits.uvfits TO UVin.uvt
  UV__STOKES NONE UVin
.fi


.ti -4
1 WRITE
.ti +4
[CLEAN_\]WRITE Buffer File [/APPEND] [/RANGE Start End Kind] [/REPLACE] [/TRIM]

WRITE the specified buffer (UV, BEAM, PRIMARY, DIRTY, CLEAN, RESIDUAL,
SUPPORT, CCT, SKY) onto a File. Default extension are uvt, beam, lmv,
lobe, lmv-clean, lmv-res, pol, cct, and lmv-sky respectively.

For UV data, the flagged data are written by default. They may be
omitted using the /TRIM option.

WRITE * Name (without extension) can be used to write all modified
image-like buffers (not the UV tables) under a common Name. This
typically include .beam, .lmv and .lmv-clean, but also the .lmv-sky
file if the PRIMARY command has been used after deconvolution. The
whole list of buffers and associated extensions are available in Sic
arrays FILE__TYPE and FILE__EXT.
.\"--------------------------------------------------------------------
.ti -4 
2 /RANGE
.ti +4
[CLEAN_\]WRITE Buffer File /RANGE Start End Kind [/REPLACE]

A range of image planes can be specified through /RANGE option. Kind
is the unit of the Start-End values: CHANNEL, VELOCITY, or FREQUENCY.

Restrictions:
.br   
- The option is still experimental
.br   
- The Buffer name must be specified (* is not valid here) 
.br   
- This does not apply to UV data.

.ti -4
2 /APPEND
.ti +4 
[CLEAN_\]WRITE Buffer File /APPEND [/RANGE Start End Kind] 

EXPERIMENTAL: The selected channels are appended to an existing file. 

.ti -4
2 /REPLACE
.ti +4 
[CLEAN_\]WRITE Buffer File /REPLACE [/RANGE Start End Kind] 

EXPERIMENTAL: The selected channels are replaced in an existing file. 

.ti -4
2 /TRIM
.ti +4
[CLEAN_\]WRITE UV File /TRIM 

Remove the flagged visibilities while writing.



.ti -4
1 ENDOFHELP
