NRAO Home > CASA > CASA Toolkit Reference Manual
deconvolver.clean - Function

3.1.2 Make a clean image with Hogbom or MultiScale Clean


Description

Makes a clean image using either the Hogbom or MultiScale algorithms. The MultiScale algorithm is the default. The clean is performed on the residual image calculated from the dirty image minus the point spread function convolved with the model currently selected. Thus if you want to restart a clean, simply set the model to the model that was previously produced by clean.

Rather than explicit CLEAN boxes, mask images are used to constrain the region that is to be deconvolved. To make mask images, use either boxmask (to define a mask via the corner locations blc and trc) or mask (to define a mask via thresholding an existing image). The default mask is the inner quarter of the image.

The CLEAN deconvolution is joint in whatever Stokes parameters are present. Thus it searchs for peaks in either I or I + |V | or I + ∘------------
 Q2 + U 2 + V2, the rationale for the latter two forms being to be biased towards finding strongly polarized pixels first (these forms are also the maximum eigenvalue of the coherency matrix). The PSF is constrained to be the same in all polarizations (a feature of this implementation, not of the Hamaker-Bregman-Sault formalism).

The clean algorithms possible are:

Hogbom
The classic algorithm: delta function units of emission are found iteratively by searching for the peak. Each point is subtracted from the full residual image using the shifted and scaled point spread function.
Multi-Scale
As the Multi-Scale Clean algorithm is quite new, we provide entensive information on its use.

In the Multi-scale Clean, the image is cleaned simultaneously with several different beams given by the point spread function convolved with components of various shapes and sizes. The components we use in this implementation are upside-down paraboloids multiplied by first order spheroidal functions (ie, the same functions used in gridding Fourier plane data). The paraboloids are truncated at zero, and the multiplication by the spheroidal function results in a smooth shape with minimal power at long baselines. This shape is scaled to the component sizes specified in setscales. As these functions have finite extent (unlike a Gaussian), they can easily be used with mask images.

For each iteration, the scale size which is able to subtract the most flux is chosen (but with a caveat, see below). The model is then built up out of the spheroidal functions of the various scale sizes. The scale sizes are set by the setscales function, which will permit the user to specify the scale sizes explicitly, or will optionally take the number of scale sizes to clean for and calculate the scale sizes themselves from a power law.

Most images deconvolved with Multi-scale Clean will be dominated by extended structure, and the largest scale size will initially remove the most flux from the dirty image. As the algorithm reduces the residuals on the largest scale, the residuals on the smaller scales will also be reduced, even without cleaning on those size scales (a falling sea sinks all boats). However, at some point, the residual image will be dominated by features on smaller size scales. These smaller features will be both positive and negative (ie, to correct for the largest size scale being the wrong shape for the true emission features). Later in the algorithm, the magnitude of the residuals on all scales will be approximately equal. At this stage, most of the deconvolvable flux has been assimilated into the largest scale size components and detailed corrections to the large scale components must be made. At this point, the user may consider switching to a faster algorithm such as the Clark Clean.

Masking is fully available with Multi-scale Clean. No component is permitted to place any of its wings outside of the user-supplied mask. If the masking were based upon the different scale components’ center positions, then the large scale components could place their wings outside the mask, but the smaller scale components would not be able to make fine scale corrections. Hence, the Multi-scale Clean uses a different mask for each different size scale internally. If the mask is too restrictive or the scales are too large, the algorithm may not be able to fit the large scales into the mask at all, and the user is warned of this condition.

Traditional Clean algorithms use a small loop gain such as 0.1 to avoid confusing emission and sidelobes when extended emission is present. However, as MultiScale Clean can image large extended structure in a single spheroidal component, a loop gain in the range 0.5 to 1.0 can be used. If the largest residual oscillates between positive and negative with iteration number, as it can for some brightness distributions which include point sources, a lower loop gain will improve the imaging and the convergence.

A mild bias favoring cleaning small scale emission has been built into the Multi-scale algorithm. To illustrate the requirement of this bias, consider the case of a bright point source with very faint extended emission. Each scale may find its optimal component to subtract at the position of the bright point source, but each successively larger component will integrate more extended flux. Hence, the largeest scale component will be removed from the residuals. If most of the flux were in the point source, then several smaller negative components must be subtracted from the largest component, and finally the point component itself may be removed after the extended emission has been taken care of. To prevent this situation from occurring, we bias the selection of small-sized components.

Note that for all of these functions except fullmsclean, only a quarter of the image may be cleaned. If no mask is set, then the cleaned region defaults to the inner quarter. If a mask larger than a quarter of the image is set, then only the quarter starting at the bottom left corner is used. Algorithm fullmsclean will deconvolve the entire field. This is useful when performing a limited accuracy deconvolution (as needed for example in wide-field imaging) but will diverge if pushed too deep.

The clean threshold may be either absolute (’0.5Jy’) or relative (’1%’).

Arguments





Inputs

algorithm

Algorithm to use

allowed:

string

Default:

fullmsclean

msclean

hogbom

niter

Number of Iterations, set to zero for no CLEANing

allowed:

int

Default:

1000

gain

Loop Gain for CLEANing, try 0.7 for msclean or fullmsclean

allowed:

double

Default:

0.1

threshold

Flux level at which to stop CLEANing

allowed:

any

Default:

variant 0Jy

displayprogress

Display progress

allowed:

bool

Default:

false

model

Name of images

allowed:

string

Default:

mask

Name of mask images used for CLEANing

allowed:

string

Default:

async

Run asynchronously in the background?

allowed:

bool

Default:

false

Returns
record

Example

 
 
    dc.clean(image=’3C273XC1.clean.image’, model=’3C273XC1.clean.model’,  
    mask=’3C283XC1.mask’, niter=1000, gain=0.25, threshold=0.03)  
 

__________________________________________________________________


More information about CASA may be found at the CASA web page

Copyright 2016 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search