casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casa::HogbomCleanModel< T > Class Template Reference

A Class for performing Hogbom Clean's of Arrays. More...

#include <HogbomCleanModel.h>

Inheritance diagram for casa::HogbomCleanModel< T >:
casa::ArrayModel< T > casa::Iterate casa::LinearModel< casacore::Array< T > >

Public Member Functions

 HogbomCleanModel ()
 The default constructor does nothing more than initialise a zero length array to hold the deconvolved model. More...
 
 HogbomCleanModel (const casacore::Array< T > &model)
 Construct the HogbomCleanModel object and initialise the model. More...
 
casacore::Bool solve (ResidualEquation< casacore::Array< T > > &eqn)
 Using a Hogbom clean deconvolution proceedure solve for an improved estimate of the deconvolved object. More...
 
casacore::Bool solve (ConvolutionEquation &eqn)
 
- Public Member Functions inherited from casa::ArrayModel< T >
 ArrayModel ()
 
 ArrayModel (const casacore::Array< T > &model)
 
 ArrayModel (casacore::Array< T > &model)
 
virtual const casacore::Array
< T > & 
getModel () const
 Return the current model. More...
 
virtual void getModel (casacore::Array< T > &model) const
 
virtual void setModel (const casacore::Array< T > &model)
 Set the current model. More...
 
virtual void setModel (casacore::Array< T > &model)
 
- Public Member Functions inherited from casa::LinearModel< casacore::Array< T > >
virtual ~LinearModel ()
 A virtual destructor is necessary. More...
 
- Public Member Functions inherited from casa::Iterate
 Iterate ()
 Constructor. More...
 
virtual ~Iterate ()
 
void setFree ()
 Is this a free variable? More...
 
void setNotFree ()
 
casacore::Bool free ()
 
void setNumberIterations (const casacore::Int n)
 
void setGain (const casacore::Float g)
 
void setTolerance (const casacore::Float t)
 
void setThreshold (const casacore::Float t)
 
void setMode (const casacore::String m)
 
casacore::Int numberIterations ()
 
casacore::Float gain ()
 
casacore::Float tolerance ()
 
virtual casacore::Float threshold ()
 
const casacore::String mode ()
 

Additional Inherited Members

- Protected Attributes inherited from casa::ArrayModel< T >
casacore::Array< T > theModel
 

Detailed Description

template<class T>
class casa::HogbomCleanModel< T >

A Class for performing Hogbom Clean's of Arrays.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

This class is called HogbomCleanModel because thats the algorithm it uses deconvolve the model.

Synopsis

This class is used to perform the Hogbom Clean Algorithm on an Array. Only the deconvolved model of the sky are directly stored by this class. The point spread function (psf) and convolved (dirty) image are stored in a companion class which is must be derived from ResidualEquation.

The cleaning works like this. The user constructs a HogbomCleanModel by specifying an initial model of the sky. This can by be one,two,three... dimensional depending on the dimension of the psf (see below). The user then constructs a class which implements the forward equation between the model and the dirty image. Typically this will be the ConvolutionEquation class, although any class which has a ResidualEquation interface will be work (but perhaps very slowly, as the ConvolutionEquation class has member functions optimised for cleaning)

The user then calls the solve() function (with the appropriate equation class as an arguement), and this class will perform the Hogbom clean. The various clean parameters are set (prior to calling solve) using the functions derived from the Iterate class, in particular setGain(), setNumberIterations() & setThreshold() (to set a flux limit).

The solve() function does not return either the deconvolved model or the residuals. The solved model can be obtained using the getModel() function (derived from ArrayModel()) and the residual can be obtained using the residual() member function of the Convolution/Residual Equation Class.

The size and shape of the model used in this class MUST be the same as the convolved data (Dirty Image), stored in the companion ResidualEquation Class. However the model (and convolved data) can have more dimensions than the psf, as well as a different size (either larger or smaller). When the dimensionality is different the cleaning is done independendtly in each "plane" of the model. (Note this has not been implemented yet but is relatively simple to do if necessary).

This multi-dimensionalty is exploited when cleaning arrays of StokesVectors. Here the casacore::Array of StokesVectors is decomposed into a stack of 4 Floating point arrays and the cleaning is done on all the the arrays simultaneosly. The criterion for choosing the brightest pixel has been generalised by using the "length" of the Stokesvector in 4 dimensional space.

A companion class to this one is MaskedHogbomCleanModel. This provides the same functionality but is used with MaskedArrays which indicate which regions of the model to search for clean components.

Example

casacore::Matrix<casacore::Float> psf(12,12), dirty(10,10), initialModel(10,10);
...put appropriate values into psf, dirty, & initialModel...\.
HogbomCleanModel<casacore::Float> deconvolvedModel(initialModel);
ConvolutionEquation convEqn(psf, dirty);
deconvolvedModel.setGain(0.2);
deconvolvedModel.setNumberIterations(1000);
casacore::Bool convWorked = deconvolvedModel.solve(convEqn);
casacore::Array<casacore::Float> finalModel, residuals;
if (convWorked){
finalModel = deconvolvedModel.getModel();
ConvEqn.residual(deconvolvedModel, finalResidual);
}

Motivation

This class is needed to deconvolve images.

Template Type Argument Requirements (T)

have tested this class with Arrays of Float StokesVector

To Do

Definition at line 141 of file HogbomCleanModel.h.

Constructor & Destructor Documentation

template<class T >
casa::HogbomCleanModel< T >::HogbomCleanModel ( )
inline

The default constructor does nothing more than initialise a zero length array to hold the deconvolved model.

If this constructor is used then the actual model must be set using the setModel() function of the ArrayModel class.

Definition at line 150 of file HogbomCleanModel.h.

template<class T >
casa::HogbomCleanModel< T >::HogbomCleanModel ( const casacore::Array< T > &  model)
inline

Construct the HogbomCleanModel object and initialise the model.

Definition at line 152 of file HogbomCleanModel.h.

Member Function Documentation

template<class T >
casacore::Bool casa::HogbomCleanModel< T >::solve ( ResidualEquation< casacore::Array< T > > &  eqn)

Using a Hogbom clean deconvolution proceedure solve for an improved estimate of the deconvolved object.

The convolution/residual equation contains the psf and dirty image. When called with a ResidualEquation arguement a quite general interface is used that is slow. The convolution equation contains functions that speed things up. The functions return false if the deconvolution could not be done.

template<class T >
casacore::Bool casa::HogbomCleanModel< T >::solve ( ConvolutionEquation eqn)

The documentation for this class was generated from the following file: