This section summarizes a few imaging use-cases, and lists currently supported parameter combinations that control various parts of the image-reconstruction.
Note : This is not a complete list of parameters. Only parameters relevant to choosing imaging and deconvolution are shown. All other parameters apply to whatever combination is set by this listed subset. For example, data selection parameters are independent of those listed below, and parameters such as 'niter','gain','threshold','imsize','cellsize', etc... apply to all the following choices.
mode | 'mfs' | Use all channels together
|
||||||||||||||||||
'frequency' | Make a spectral cube (see inline help for subparams)
Note : chaniter=False uses the first channel's PSF to compute the clean restoring beam, but chaniter=True uses a channel-dependent restoring beam. |
|||||||||||||||||||
'channel' | (almost) same as above | |||||||||||||||||||
'velocity' | (almost) same as above | |||||||||||||||||||
'cube' | merges 'channel','frequency','velocity'
Not yet implemented |
|||||||||||||||||||
stokes | 'I' | Stokes and correlation options :
I, Q, U, V, IQ, IV, QU, UV, IQU, IUV, IQUV - for Circular and Linear feeds RR, LL, RRLL - for Circular feeds; XX, YY, XXYY - for Linear feeds |
||||||||||||||||||
outlierfile | ' ' | AIPS-style outlier file (a text file with field id, phase-center, and image size for a set of outlier fields) Multiple fields can also be specified by giving lists for imagename, cell, imsize, phasecenter, mask. This mode has not been tested with all possible combinations of masking and modelimage options. |
||||||||||||||||||
gridmode | 'widefield' | When wprojplanes=1 and facets > 1, a grid of facets is created and deconvolved separately | ||||||||||||||||||
mask | ' ' | One or more pixel ranges ( mask=[10,10,20,20] ), region files ( mask=[ 'one.rgn', 'two.rgn'] ), mask-image names ( mask='3c286.mask' ), boxfiles ( mask='boxlist.txt' ) or some combinations of them. If unspecified, it defaults to a full-image of ones.
For multifields, the 'outlierfile' is used to specify masks. When 'imagermode='mosaic', 'minpb' is used to set a primary-beam-based mask irrespective of 'pbcor'=True/False; otherwise, a PB-based mask is made only when 'pbcor'=True. |
The number of major and minor cycles depend on the choice of total number of iterations (niter), the user supplied stopping threshold (threshold), and the Minor-cycle stopping threshold computed as max(threshold,flux-limit) where flux-limit = current peak residual x PSF sidelobe level. The peak sidelobe level is computed as a fraction of the PSF peak. The additional parameters cyclefactor and cyclespeedup are used to control the number of minor-cycle iterations.
threshold | '0.0mJy' | final stopping threshold |
niter | 500 | maximum number of iterations (across major cycles) |
cyclefactor | 1.5 | flux limit = (peak residual) x (PSF sidelobe level) x cyclefactor
A lower cyclefactor will force the minor cycle to clean deeper. If (PSF sidelobe x cyclefactor) > 0.8, fluxlimit = (0.8 x peak residual) to prevent getting a threshold larger than the peak residual |
cyclespeedup | -1 | If larger than 0, the threshold is increased by pow(2.0, itercount/cyclespeedup).
A value larger than zero will cause shallower cleaning than that computed by the flux-limit. Also, for values larger than zero, a higher cyclespeedup causes the minor cycle to clean deeper. [Note: This parameter is currently not treated the same in all algorithms. Its behaviour will either be modified or removed. ] |
maxniter | -1 | If larger than 0, this is the maximum number of allowed minor-cycle iterations before a major cycle is forced.
[Note: Not yet Implemented. Will be added as a clearer alternative to 'cyclespeedup'.] |
psfmode | 'hogbom' | Use the full PSF in minor-cycle updates
Accurate but expensive. |
'clark' | Use a radially truncated PSF for minor cycle updates.
Approximate but quick for fields of point-sources. |
|
gridmode | ' ' | Standard Imaging : gridding-convolution function is a prolate spheroidal. |
'widefield' | Wide-field imaging : gridding convolution function is the w-projection kernel. | |
imagermode | ' ' | Do only one major cycle, and use 'psfmode' to decide how to use the PSF in the minor cycle iterations |
'csclean' | Do Cotton-Schwab major/minor cycles. Customize with cyclefactor,cyclespeedup. Use psfmode. | |
'mosaic' | Mosaic imaging : Pointing offsets are applied via gridding convolution functions. Uses Cotton-Schwab major/minor cycles. Use psfmode. | |
multiscale | [] | If not empty, use the ms-clean algorithm with the specified list of scale sizes. Ignores 'psfmode'.
Will be moved into 'psfmode'. Use the full PSF convolved with multiscale basis functions in minor-cycle updates |
pbcor | False | no primary-beam correction |
True | apply image-domain primary-beam correction | |
Exceptions | psfmode is ignored if gridmode='widefield' or imagermode='mosaic' or multiscale is not [] | |
The combination of gridmode='widefield' and imagermode='mosaic' is currently not supported | ||
For nterms>1, imagermode='mosaic' and pbor=True are currently not supported, and psfmode is ignored. |
Imaging : Standard gridding using a prolate-spheroidal function and natural, uniform or briggs weighting. No direction-dependent corrections.
Deconvolution : Hogbom, Clark, Cotton-Schwab CLEAN Multiscale-CLEAN
mode | 'mfs' with nterms=1 (OR) 'channel','frequency','velocity' |
gridmode | ' ' : use standard gridding |
psfmode | 'hogbom' : use full PSF (OR) 'clark' : use truncated PSF |
imagermode | ' ' : one major cycle (OR) 'csclean' : multiple major cycles |
multiscale | [] : point-source flux model (OR) [0,6,10] : list of scale sizes in units of pixels
If this list is not empty, psfmode is ignored and the ms-clean algorithm uses the full PSF smoothed to the specified scale sizes |
pbcor | False : no primary-beam correction |
Imaging : Standard gridding, primary-beam correction (image-domain only), mosaics (with and without pb-correction), w-term correction (faceting or w-projection), all with natural, uniform or briggs weighting.
Deconvolution : Cotton-Schwab CLEAN, multiscale CLEAN.
mode | 'mfs' with nterms=1 (OR) 'channel','frequency','velocity' |
gridmode | ' ' : standard gridding (OR) 'widefield' : faceting or w-projection (wprojplanes>1 and/or facets>1) |
psfmode | 'hogbom' : use full PSF (OR) 'clark' : use truncated PSF
psfmode is ignored if gridmode='widefield' or imagermode='mosaic' or multiscale is not [] |
imagermode | ' ' : one major cycle (OR) 'csclean' : multiple major cycles (OR) 'mosaic' : multiple major cycles, primary-beam correction according to mosaic pointing offsets (psfmode and pbcor are ignored)
The combination of gridmode='widefield' and imagermode='mosaic' is currently not supported. |
multiscale | [] : point-source flux model (OR) [0,6,10] : list of scale sizes in units of pixels |
pbcor | False : no primary-beam correction (OR) True : apply image-domain primary-beam correction
If imagermode='mosaic', then irrespective of pbcor, a mask is created using 'pbmin' as a cutoff. It imagermode is not 'mosaic', then a 'pbmin' based mask is created only if 'pbcor=True'. |
Imaging : Standard gridding, w-term correction (w-projection) with natural, uniform or briggs weighting
Deconvolution & MS-MFS (multi-scale multi-frequency synthesis)
mode | 'mfs' only, with nterms > 1 |
gridmode | ' ' : standard gridding (OR) 'widefield' : w-projection only (wprojplanes>1 and facets=1) |
psfmode | Ignored. multiscale is always used. |
imagermode | Ignored. Multiple major cycles are always used. An adaptive flux limit is used per major cycle.
Mosaic mode is not yet supported for wideband imaging |
multiscale | [] : point-source flux model (OR) [0,6,10] : list of scale sizes in units of pixels |
pbcor | False : no primary-beam correction PB correction is not yet supported for wideband imaging |
Here are a few diagrams to convey the layout and flow-of-control within the Imager-module classes.
Note : This diagram shows the main calls that are common to all derivatives of ImageSkyModels and FTMachines. The actual code tree has much more code for many special-cases controlled by various state variables. Various set-up functions are not listed. There are also some naming differences between the diagram and code : The function CubeSkyEquation::calculateResidualImages() is actually CubeSkyEquation::gradientsChiSquared() in the code. Also, ImageSkyModel::solve() is in some cases, ImageSkyModel::solveResiduals(). The Deconvolver interface is not consistent across all minor-cycle algorithms.
CASA images contain an intrinsic spectral reference frame, plus an optional conversion layer that relabels the frequency coordinates in other frames. Tools like the Viewer can also apply on-the-fly conversions to relabel frequencies in frames other than what the image contains.
Internal to Imager, the gridding process operates entirely in the LSRK frame. Data channel frequencies are converted to LSRK via vb.lsrfrequency() and compared with image channel frequencies also in LSRK, to determine the mapping between data channels and image channels. For the data, this is a time-dependent relabelling of the frequencies ( if the data are not already in LSRK/REST ).
This difference in behaviour has caused some confusion, and we plan to synchronize things. To the end user, however, both these options give the same results when Viewed with the appropriate output frame in the Viewer.
Note that Conversions to TOPO or GEO represent a single time within the observation ( our convention is the start time of the dataset ). If the dataset is also TOPO or GEO, this will not be a one-to-one mapping between data channels and image channels ( a common source of user confusion ). A true one-to-one mapping is possible only if the MS frame is redefined as 'REST' so that no time-dependent LSRK conversion is done internally.