.ec _
.ll 76
.ad b
.in 4
.ti -4
1 Language
.nf
  CLARK       Shortcup to CLEAN with CLARK Method
  HOGBOM      Shortcup to CLEAN with HOGBOM Method
  MRC         Shortcup to CLEAN with MX Method
  MULTISCALE  Shortcup to CLEAN with MULTISCALE Method
  PIPELINE    Pipeline processing of all UV tables
  SDI         Shortcup to CLEAN with SDI Method
  TIPS        Give Random tip about IMAGER
.fi

.ti -4
1 TIPS
    IMAGER_\TIPS [Number]
.ti +4    
    Without argument, print out a random tip about IMAGER.
  With an argument, give the corresponding tip number.

 
.ti -4
1 PIPELINE 
.ti +4
    IMAGER_\PIPELINE [Arg1 [Arg2]] [/MODE Type] [/WIDGET]
    
    PIPELINE is a command activating the Imaging Pipeline. The pipeline contains 
all processing steps for high fidelity imaging (Self-calibration, continuum
extraction, line identification, etc...) 
  
    With no /WIDGET option, PIPELINE run in unattended mode (no SIC\PAUSE statement), 
one step after the other. 
.nf
    PIPELINE ?      will display the Pipeline input parameters
    PIPELINE *      will run the whole Pipeline with the current input parameters    
    PIPELINE NEXT   runs the next following step
    PIPELINE LAST   will repeat the last step.  
.fi    
PIPELINE with no argument stands for PIPELINE LAST. The /MODE option controls
the operating mode (default: last selected mode).

.ti -4
2 /MODE
.ti +4 
    IMAGER_\PIPELINE [Arg1 [Arg2]] /MODE All|Continuum|Split|Survey

Specifdy in which mode the Pipeline will run. 4 modes are possible

.ti +4
  CONTINUUM
.br
  Only produce continuum images, no data cube. In this mode, the emission is assumed
to be purely continuum, with no significant line contamination.

.ti +4
  SURVEY
.br 
  Only produce line+continuum data cubes. No attempt to separate line emission from
continuum emission is made. The complete spectral coverage is imaged, at the velocity
resolution specified by the user. This mode is especially adapted for extra-galactic
work, or sources with lines close to the spectral confusion limit.

.ti +4
  ALL
.br
  Produce data cubes that contains line and continuum emission together. Spectral line
identification will be performed if a Catalog is present, with the user-specified
velocity range and spectral resolution around each spectral line in the band.
If no Catalog is present, the complete spectral coverage is imaged, at the velocity
resolution specified by the user. 
  
.ti +4
  SPLIT
.br
  Similar to ALL, but produce data cubes that contains line and continuum emission 
separately. The separation is based on filtering performed by UV__PREVIEW. 
    
  
.ti -4
2 /WIDGET
.ti +4
  
  PIPELINE /WIDGET 
  
  Activates the widget that simplifies the interactive control of the Pipeline steps.
  
  Each step is controlled by a separate button. In this mode, the Self-Calibration
related button requires user interaction. Some buttons are duplicated on top of the widget,
which also contains a  SELF-CALIBRATION button that can execute all Self-Calibration related
steps in sequence.
  
    The PIPELINE button (as the GO button) will run the full Pipeline without
any further user interaction, like the PIPELINE * command.
  
.ti -4
2 Arguments:
.ti +4
    PIPELINE supports the following arguments when not used in Widget mode,
given here in sequential order of actions
.nf    
  ORGANIZE
  FIND
  SELECT
  CHECK 
  COMPUTE  (or SELF)
  COLLECT
  APPLY
  TIME
  TABLES
  IMAGE
  SHOW
  SAVE
.fi
In addition argument SKY can be used to apply primary  beam correction to existing
images.
  
.ti -4
2 ORGANIZE
.ti +4
  IMAGER\PIPELINE ORGANIZE

    Automatically re-arrange the set of UV tables or UVFITS files in the current
directory to a directory tree that is suitable for the Pipeline / Widget use.
    
    This is Step 1, NEXT step is FIND
    
.ti -4
2 FIND
.ti +4
  IMAGER\PIPELINE FIND
    
    Finds the UV tables in the directory tree and scan their properties for further use

    This is Step 2, NEXT step is SELECT

.ti -4    
2 SELECT
.ti +4
  IMAGER\PIPELINE SELECT
    
    Select the UV tables to be processed according to the Filter (all%filter) and identify
the Wide bands and Narrow bands
  
    This is Step 3, NEXT step is CHECK 
    
.ti -4
2 CHECK
.ti +4
  IMAGER\PIPELINE CHECK
    
    Check whether the continuum is strong enough to require and allow self-calibration.
  
    This is Step 4, NEXT step is COMPUTE (or its alias SELF)

.ti -4
2 COMPUTE
.ti +4
  IMAGER\PIPELINE COMPUTE    or    IMAGER\PIPELINE SELF
  
    Compute the Self-calibration solution from the Wide bands UV tables
    
    This is Step 5, NEXT step is COLLECT
    
.ti -4
2 COLLECT
.ti +4
  IMAGER\PIPELINE COLLECT
  
    Improve self-calibration solution by interpolating correction delays between different
wide bands.  This can increase S/N of self-calibration on weaker sources, but may degrade 
solutions with very high S/N per band on strong sources.

    This is Step 6, NEXT step is APPLY

.ti -4
2 APPLY
.ti +4
  IMAGER\PIPELINE APPLY
  
    Apply self-calibration solution derived previously to all Wide and Narrow band UV tables.
The selected solution is from the Wide band that is closest in Frequency, using the DELAY
mode for the solution.
  
    This is Step 7, NEXT step is TIME
    
.ti -4
2 TIME
.ti +4
  IMAGER\PIPELINE TIME
  
    Time average the self-calibrated UV tables to save space and further time processing
    
    This is Step 8, NEXT step is TABLES 
    
.ti -4
2 TABLES
.ti +4
  IMAGER\PIPELINE TABLES
  
    Extract UV tables around each spectral line available in the CATALOG and covered by the
frequency setup. Continuum emission is (empirically) separated from Line emission using
the UV__PREVIEW, UV__BASELINE / UV__FILTER mechanism.

  This step is only needed when direct image analysis in the UV plane is required.
    
    This is Step 9, NEXT step is IMAGE

.ti -4
2 IMAGE
.ti +4
  IMAGER\PIPELINE IMAGE
  
    Produce deconvolved images around each spectral line available in the CATALOG and covered by the
frequency setup. Continuum emission is (empirically) separated from Line emission using
the UV__PREVIEW, UV__BASELINE / UV__FILTER mechanism, and the continuum images are also produced.
  
    This step does not use the result of the PIPELINE TABLES step, but only the self-calibrated
UV tables produced by PIPELINE APPLY and PIPELINE TIME.

    This is Step 10, NEXT step is SHOW
.ti -4
2 SHOW
.ti +4
  IMAGER\PIPELINE SHOW
  
    Show some plots about Self-calibration quality

    This is Step 11, NEXT step is SAVE

.ti -4
2 SAVE
.ti +4
  IMAGER\PIPELINE SAVE
  
    Save PIPELINE input parameters into ./all-memory.ima, so that PIPELINE * will redo the whole 
processing with the these parameters. The script can be edited if any correction is required
(e.g. changing image size, robust parameter, etc...)

  An implicit SAVE is done after PIPELINE IMAGE
  
.ti -4
2 SKY
.ti +4
  IMAGER\PIPELINE SKY
	
	Apply primary beam correction to the Clean images in the all%maps (default MAPS) directory
to produce the Sky brightness images (.lmv-sky).  This steps does nothing when processing
Mosaics, since Clean directly restores Sky brightness images for Mosaics.
		
.ti -4
2 NEXT
.ti +4
  IMAGER\PIPELINE NEXT
  
    Run the next step of the Pipeline.
    
.ti -4
2 LAST
.ti +4
  IMAGER\PIPELINE LAST
  
    Repeat the last executed step of the Pipeline (presumably after changing some control parameters)

.ti -4
2 Variables :
.ti +4

  Apart from the usual imaging parameters, PIPELINE is controlled by a few variables.
.nf
  ALL%CATALOG   indicates the spectral line catalog (set by the CATALOG command)
  ALL%DROP		Number of edge channels drop at each edge
  ALL%FILTER    indicates the files to be processed
  ALL%MINFRES   is a threshold in spectral resolution to separate continuum-only data from Lines
  ALL%RANGE     gives the velocity range and resolution
.fi
  
  In addition, the self-calibration step is controlled by ALL%PHASE__NITER, ALL%PHASE__TIMES,
ALL%AMPLI__NITER and ALL%AMPLI__TIMES that specify the number of Clean components and
integration times for Phase and Amplitude respectively
 
.ti -4
2 ALL%CATALOG
.ti +4
    Name of spectral line catalog. This is a Read-Only variable, defined using the CATALOG
command. See HELP CATALOG for details.
  
  If a line catalog is selected, the Pipeline scripts will produce one
image for each spectral line falling into the observed "high resolution"
spectral windows, over the specified velocity range ALL%RANGE.
  
  If no line catalog is selected, all channels of all "high resolution"
spectral windows will be imaged.  No velocity range is used in this case.
  
  "Low resolution" spectral windows will be used to produce continuum
only images. The distinction between "Low" and "High" resolution spectral
windows is made from variable ALL%MINFRES

.ti -4
2 ALL%DROP
.ti +4
	INTEGER ALL%DROP[2] 
	
This is an integer array giving the number of edge channels
ignored when reading a UV table. Edge channels may have different
weights than the other ones, especially for ALMA data because of the
off-line Doppler correction. 

Such low weights edge channels are automatically
dropped for Single fields, so you can use ALL%DROP = 0, 
but not yet for Mosaics, where ALL%DROP = 5 is more appropriate.


.ti -4
2 ALL%FILTER
.ti +4
    CHARACTER*256    ALL%FILTER
    
  File filter to be used to select the relevant UV tables.

  This filter MUST NOT contain the .uvt extension. The default filter
is *, but a specific file name can be given to process only one
UV table instead of all of them (or all tables for a given source for example).

.ti -4
2 ALL%AMPLI__NITER

    ALL%AMPLI__NITER is a size-variable integer array of rank 1. 
    
It indicates the number
of clean components for each iteration of Amplitude self-calibration.
The number of iterations is defined by its number of elements.
The size of this array can be changed using the LET /RESIZE option.
    
    0 means to select all Clean components.
    
.ti -4
2 ALL%AMPLI__TIMES

    ALL%AMPLI_TIMES is a size-variable real array tof rank 1.
    
It indicates the 
integration time for each iteration of Phase self-calibration.
The number of iterations is defined by its number of elements.
The size of this array can be changed using the LET /RESIZE option.
    
    Typical values are 90 to 180 seconds for NOEMA, 60 seconds for ALMA.
    
.ti -4
2 ALL%COLLECT
.ti +4
  Real ALL%COLLECT

Stability Threshold for flagging data after Self-Calibration. 

For Self-calibration solutions with more than
one iteration, the solution is flagged if the difference between the
last two iterations exceeds Threshold times the expected phase error
due to noise.

  The default is 0, a convention indicating to ignore this flagging step.

  When the noise level is appropriately estimated, a Threshold of 3
is a good value to suppress unstable solutions that reflect some
issues in the self-calibration model.


.ti -4
2 ALL%COMBINE
.ti +4
  Logical ALL%COMBINE
  
Indicates whether the COLLECT step (that derives an atmospheric delay
correction from the per-band phase correction) 
should be performed or not for the Self-Calibration in PIPELINE mode.

.ti -4
2 ALL%ITIME

    Real ALL%ITIME
    
Integration time used for the TIME compression step. 0 means that 
IMAGER will derive the best time given the baseline lengths and 
field of view.

.ti -4
2 ALL%MINFRES
.ti +4
    REAL ALL%MINFRES
    
  Maximum frequency resolution under which a UV Table is considered
as a spectral line data. UV Tables with coarser spectral resolution
are treated as continuum only data: the line emission is filtered out,
and a pure continuum image is generated using bandwidth synthesis
in this case.
  
  
.ti -4
2 ALL%PHASE__NITER

    ALL%PHASE__NITER is a size-variable integer array of rank 1.
    
It indicates the number
of clean components for each iteration of Phase self-calibration.
The number of iterations is defined by its number of elements.
The size of this array can be changed using the LET /RESIZE option.
    
.ti -4
2 ALL%PHASE_TIMES

    ALL%PHASE__TIMES is a size-variable real array of rank 1.
    
It indicates the 
integration time for each iteration of Phase self-calibration.
The number of iterations is defined by its number of elements.
The size of this array can be changed using the LET /RESIZE option.
    
    Typical values are 45 seconds for NOEMA data, 6 to 24 sec for ALMA data.
    
.ti -4
2 ALL%RANGE
.ti +4
    REAL ALL%RANGE[3] 
    
  Velocity sampling around each spectral line (in km/s). ALL%RANGE[1:2] give
the Min and Max velocities ([0,0] indicates to take the whole coverage
of the sub-band).  
  
  ALL%RANGE[3] gives the desired spectral resolution (0 indicates to use the
spectral resolution of the sub-band).
  
.ti -4
2 ALL%SPLIT
.ti +4
    LOGICAL ALL%SPLIT
    
  Separate (Split) Line emission from Continuum emission in data Cubes or
extracted uv Tables, or keep Line+Continuum data together.

.ti -4
1 HOGBOM
.ti +4    
    IMAGER\HOGBOM [First Last] [/FLUX Min Max]
  
  is a short cut for
.nf
      LET METHOD = HOGBOM
      CLEAN [First Last] [/FLUX Min Max]
.fi
      
.ti -4
1 CLARK
.ti +4
    IMAGER\CLARK [First Last] [/FLUX Min Max] [
    
  is a short cut for     
.nf
      LET METHOD = CLARK
      CLEAN [First Last] [/FLUX Min Max] 
.fi
.ti -4      
1 MRC
.ti +4
    IMAGER\MRC [First Last] 

  is a short cut for     
.nf
      LET METHOD = MRC
      CLEAN [First Last] 
.fi
.ti -4      
1 MULTISCALE
.ti +4    
    IMAGER\MULTISCALE [First Last] [/FLUX Min Max]

  is a short cut for
.nf
      LET METHOD = MULTI
      CLEAN [First Last] [/FLUX Min Max]
.fi
.ti -4
1 SDI
.ti +4
    IMAGER\SDI [First Last] [/FLUX Min Max] 

  is a short cut for     
.nf
      LET METHOD = SDI
      CLEAN [First Last] [/FLUX Min Max] 
.fi
.ti -4
1 ENDOFHELP
    (Mandatory dummy entry) 
    
