casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::MultiTermMatrixCleaner Class Reference

#include <MultiTermMatrixCleaner.h>

Inheritance diagram for casa::MultiTermMatrixCleaner:
casa::MatrixCleaner

List of all members.

Public Member Functions

 MultiTermMatrixCleaner ()
 Create a cleaner.
 ~MultiTermMatrixCleaner ()
 The copy constructor uses reference semantics MultiTermMatrixCleaner(const MultiTermMatrixCleaner & other);.
Bool setntaylorterms (const int &nterms)
 Input : number of Taylor terms Reshapes PtrBlocks to hold the correct number of PSFs and Residual images.
Bool setscales (const Vector< Float > &scales)
 Input : scales.
Bool initialise (Int nx, Int ny)
 Initialize all the memory being used.
Int computeHessianPeak ()
 Calculate Hessian elements and check for invertibility Does not have to be called externally, but can be.
Bool setpsf (int order, Matrix< Float > &psf)
 Input : psfs and dirty images.
Bool setresidual (int order, Matrix< Float > &dirty)
 Input : psfs and dirty images.
Bool setmodel (int order, Matrix< Float > &model)
 Input : model images.
Bool setmask (Matrix< Float > &mask)
 Input : mask.
Int mtclean (Int maxniter, Float stopfraction, Float inputgain, Float userthreshold)
 Run the minor cycle.
Bool getmodel (int order, Matrix< Float > &model)
 Output : Model images.
Bool getresidual (int order, Matrix< Float > &residual)
 Output : psfs and dirty images.
Bool computeprincipalsolution ()
 Compute principal solution - in-place on the residual images in vecDirty.
Bool getinvhessian (Matrix< Double > &invhessian)
 Output : Hessian matrix.

Private Member Functions

Int verifyScaleSizes ()
 Initial setup functions.
Int allocateMemory ()
Int setupScaleFunctions ()
Int setupUserMask ()
 Setup per major cycle.
Int computeFluxLimit (Float &fluxlimit, Float threshold)
Int computeRHS ()
Int solveMatrixEqn (Int ntaylor, Int scale, IPosition blc, IPosition trc)
 Solver functions : minor-cycle iterations.
Int chooseComponent (Int ntaylor, Int scale, Int criterion, IPosition blc, IPosition trc)
Int updateModelAndRHS (Float loopgain)
Int updateRHS (Int ntaylor, Int scale, Float loopgain, Vector< Float > coeffs, IPosition blc, IPosition trc, IPosition blcPsf, IPosition trcPsf)
Int checkConvergence (Int updatetype, Float &fluxlimit, Float &loopgain)
Bool buildImagePatches ()
Int writeMatrixToDisk (String imagename, Matrix< Float > &themat)
 Helper functions.
Int IND2 (Int taylor, Int scale)
Int IND4 (Int taylor1, Int taylor2, Int scale1, Int scale2)

Private Attributes

LogIO os
Int ntaylor_p
 using MatrixCleaner::makeScaleMasks;
Int psfntaylor_p
Int nscales_p
Int nx_p
Int ny_p
Int totalIters_p
Float globalmaxval_p
Int maxscaleindex_p
IPosition globalmaxpos_p
Int itercount_p
Int maxniter_p
Float stopfraction_p
Float inputgain_p
Float userthreshold_p
Float prev_max_p
Float min_max_p
IPosition psfsupport_p
IPosition psfpeak_p
IPosition blc_p
IPosition trc_p
IPosition blcPsf_p
IPosition trcPsf_p
Vector< FloatscaleSizes_p
Vector< FloatscaleBias_p
Vector< FloattotalScaleFlux_p
Vector< FloattotalTaylorFlux_p
Vector< FloatmaxScaleVal_p
Vector< IPositionmaxScalePos_p
IPosition gip
Int nx
Int ny
Bool donePSF_p
Bool donePSP_p
Bool doneCONV_p
Matrix< Complex > dirtyFT_p
Block< Matrix< Float > > vecScaleMasks_p
Matrix< Complex > cWork_p
Block< Matrix< Float > > vecWork_p
Block< Matrix< Float > > vecScales_p
 h(s) [nx,ny,nscales]
Block< Matrix< Complex > > vecScalesFT_p
Block< Matrix< Complex > > vecPsfFT_p
 B_k [nx,ny,ntaylor] Block<Matrix<Float> > vecPsf_p;.
Block< Matrix< Float > > vecDirty_p
 I_D : Residual/Dirty Images [nx,ny,ntaylor].
Block< Matrix< Float > > vecModel_p
 I_M : Model Images [nx,ny,ntaylor].
Block< Matrix< Float > > cubeA_p
 Block <Matrix<Float> > vecScaleModel_p;.
Block< Matrix< Float > > matR_p
 R_{sk} = I_D * B_{sk} [nx,ny,ntaylor,nscales].
Block< Matrix< Float > > matCoeffs_p
 a_{sk} = Solution vectors.
Double memoryMB_p
 Memory to be allocated per Matrix.
Block< Matrix< Double > > matA_p
 Solve [A][Coeffs] = [I_D * B] Shape of A : [ntaylor,ntaylor].
Block< Matrix< Double > > invMatA_p
FFTServer< Float, Complex > fftcomplex
 FFTserver.
Bool adbg

Detailed Description

Definition at line 36 of file MultiTermMatrixCleaner.h.


Constructor & Destructor Documentation

Create a cleaner.

The copy constructor uses reference semantics MultiTermMatrixCleaner(const MultiTermMatrixCleaner & other);.

The assignment operator also uses reference semantics MultiTermMatrixCleaner & operator=(const MultiTermMatrixCleaner & other);

The destructor resizes arrays to empty before destruction.


Member Function Documentation

Int casa::MultiTermMatrixCleaner::checkConvergence ( Int  updatetype,
Float fluxlimit,
Float loopgain 
) [private]
Int casa::MultiTermMatrixCleaner::chooseComponent ( Int  ntaylor,
Int  scale,
Int  criterion,
IPosition  blc,
IPosition  trc 
) [private]
Int casa::MultiTermMatrixCleaner::computeFluxLimit ( Float fluxlimit,
Float  threshold 
) [private]

Calculate Hessian elements and check for invertibility Does not have to be called externally, but can be.

Either way, it executes only once.

Compute principal solution - in-place on the residual images in vecDirty.

Output : Hessian matrix.

Bool casa::MultiTermMatrixCleaner::getmodel ( int  order,
Matrix< Float > &  model 
)

Output : Model images.

Bool casa::MultiTermMatrixCleaner::getresidual ( int  order,
Matrix< Float > &  residual 
)

Output : psfs and dirty images.

Int casa::MultiTermMatrixCleaner::IND2 ( Int  taylor,
Int  scale 
) [private]
Int casa::MultiTermMatrixCleaner::IND4 ( Int  taylor1,
Int  taylor2,
Int  scale1,
Int  scale2 
) [private]

Initialize all the memory being used.

Int casa::MultiTermMatrixCleaner::mtclean ( Int  maxniter,
Float  stopfraction,
Float  inputgain,
Float  userthreshold 
)

Run the minor cycle.

Input : mask.

Bool casa::MultiTermMatrixCleaner::setmodel ( int  order,
Matrix< Float > &  model 
)

Input : model images.

Input : number of Taylor terms Reshapes PtrBlocks to hold the correct number of PSFs and Residual images.

Bool casa::MultiTermMatrixCleaner::setpsf ( int  order,
Matrix< Float > &  psf 
)

Input : psfs and dirty images.

Input : psfs and dirty images.

Input : scales.

Reimplemented from casa::MatrixCleaner.

Setup per major cycle.

Int casa::MultiTermMatrixCleaner::solveMatrixEqn ( Int  ntaylor,
Int  scale,
IPosition  blc,
IPosition  trc 
) [private]

Solver functions : minor-cycle iterations.

Need to be efficient.

Int casa::MultiTermMatrixCleaner::updateRHS ( Int  ntaylor,
Int  scale,
Float  loopgain,
Vector< Float coeffs,
IPosition  blc,
IPosition  trc,
IPosition  blcPsf,
IPosition  trcPsf 
) [private]

Initial setup functions.

Int casa::MultiTermMatrixCleaner::writeMatrixToDisk ( String  imagename,
Matrix< Float > &  themat 
) [private]

Helper functions.


Member Data Documentation

Definition at line 212 of file MultiTermMatrixCleaner.h.

Definition at line 134 of file MultiTermMatrixCleaner.h.

Definition at line 134 of file MultiTermMatrixCleaner.h.

Block <Matrix<Float> > vecScaleModel_p;.

A_{smn} = B_{sm} * B{sn} [nx,ny,ntaylor,ntaylor,nscales,nscales] A_{s1s2mn} = B_{s1m} * B{s2n} [nx,ny,ntaylor,ntaylor,nscales,nscales]

Definition at line 170 of file MultiTermMatrixCleaner.h.

Definition at line 150 of file MultiTermMatrixCleaner.h.

Definition at line 147 of file MultiTermMatrixCleaner.h.

Definition at line 145 of file MultiTermMatrixCleaner.h.

Definition at line 145 of file MultiTermMatrixCleaner.h.

Definition at line 145 of file MultiTermMatrixCleaner.h.

FFTserver.

Definition at line 187 of file MultiTermMatrixCleaner.h.

Definition at line 143 of file MultiTermMatrixCleaner.h.

Definition at line 123 of file MultiTermMatrixCleaner.h.

Definition at line 121 of file MultiTermMatrixCleaner.h.

Definition at line 127 of file MultiTermMatrixCleaner.h.

Definition at line 184 of file MultiTermMatrixCleaner.h.

Definition at line 124 of file MultiTermMatrixCleaner.h.

Solve [A][Coeffs] = [I_D * B] Shape of A : [ntaylor,ntaylor].

Definition at line 183 of file MultiTermMatrixCleaner.h.

a_{sk} = Solution vectors.

[nx,ny,ntaylor,nscales]

Definition at line 176 of file MultiTermMatrixCleaner.h.

R_{sk} = I_D * B_{sk} [nx,ny,ntaylor,nscales].

Definition at line 173 of file MultiTermMatrixCleaner.h.

Definition at line 125 of file MultiTermMatrixCleaner.h.

Definition at line 122 of file MultiTermMatrixCleaner.h.

Definition at line 141 of file MultiTermMatrixCleaner.h.

Definition at line 140 of file MultiTermMatrixCleaner.h.

Memory to be allocated per Matrix.

Definition at line 179 of file MultiTermMatrixCleaner.h.

Definition at line 130 of file MultiTermMatrixCleaner.h.

Definition at line 117 of file MultiTermMatrixCleaner.h.

using MatrixCleaner::makeScaleMasks;

Definition at line 115 of file MultiTermMatrixCleaner.h.

Definition at line 144 of file MultiTermMatrixCleaner.h.

Definition at line 118 of file MultiTermMatrixCleaner.h.

Definition at line 144 of file MultiTermMatrixCleaner.h.

Definition at line 119 of file MultiTermMatrixCleaner.h.

Definition at line 93 of file MultiTermMatrixCleaner.h.

Definition at line 129 of file MultiTermMatrixCleaner.h.

Definition at line 116 of file MultiTermMatrixCleaner.h.

Definition at line 133 of file MultiTermMatrixCleaner.h.

Definition at line 132 of file MultiTermMatrixCleaner.h.

Definition at line 137 of file MultiTermMatrixCleaner.h.

Definition at line 136 of file MultiTermMatrixCleaner.h.

Definition at line 126 of file MultiTermMatrixCleaner.h.

Definition at line 120 of file MultiTermMatrixCleaner.h.

Definition at line 138 of file MultiTermMatrixCleaner.h.

Definition at line 139 of file MultiTermMatrixCleaner.h.

Definition at line 134 of file MultiTermMatrixCleaner.h.

Definition at line 134 of file MultiTermMatrixCleaner.h.

Definition at line 128 of file MultiTermMatrixCleaner.h.

I_D : Residual/Dirty Images [nx,ny,ntaylor].

Definition at line 162 of file MultiTermMatrixCleaner.h.

I_M : Model Images [nx,ny,ntaylor].

Definition at line 165 of file MultiTermMatrixCleaner.h.

B_k [nx,ny,ntaylor] Block<Matrix<Float> > vecPsf_p;.

Definition at line 159 of file MultiTermMatrixCleaner.h.

Definition at line 148 of file MultiTermMatrixCleaner.h.

h(s) [nx,ny,nscales]

Definition at line 154 of file MultiTermMatrixCleaner.h.

Definition at line 155 of file MultiTermMatrixCleaner.h.

Definition at line 151 of file MultiTermMatrixCleaner.h.


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