casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::MultiTermLatticeCleaner< T > Class Template Reference

#include <MultiTermLatticeCleaner.h>

Inheritance diagram for casa::MultiTermLatticeCleaner< T >:
casa::LatticeCleaner< T >

List of all members.

Public Member Functions

 MultiTermLatticeCleaner ()
 Create a cleaner for a specific dirty image and PSF.
 MultiTermLatticeCleaner (const MultiTermLatticeCleaner< T > &other)
 The copy constructor uses reference semantics.
MultiTermLatticeCleaner< T > & operator= (const MultiTermLatticeCleaner< T > &other)
 The assignment operator also uses reference semantics.
 ~MultiTermLatticeCleaner ()
 The destructor does nothing special.
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.
Bool setcontrol (CleanEnums::CleanType cleanType, const Int niter, const Float gain, const Quantity &aThreshold, const Bool choose)
 Set control parameters.
Bool setpsf (int order, Lattice< T > &psf)
 Input : psfs and dirty images.
Bool setresidual (int order, Lattice< T > &dirty)
 Input : psfs and dirty images.
Bool setmodel (int order, Lattice< T > &model)
 Input : model images.
Bool setmask (Lattice< T > &mask)
 Input : mask.
Int mtclean (LatticeCleanProgress *progress=0)
 Run the minor cycle.
Bool getmodel (int order, Lattice< T > &model)
 Output : Model images.
Bool getresidual (int order, Lattice< T > &residual)
 Ouput : psfs and dirty images.
Bool getinvhessian (Matrix< Double > &invhessian)
 Output : Hessian matrix.

Private Member Functions

Int numberOfTempLattices (Int nscales, Int ntaylor)
Int manageMemory (Bool allocate)
Bool findMaxAbsLattice (const TempLattice< Float > &masklat, const Lattice< Float > &lattice, Float &maxAbs, IPosition &posMaxAbs, Bool flip=False)
Int addTo (Lattice< Float > &to, const Lattice< Float > &add, Float multiplier)
Int setupFFTMask ()
Int setupUserMask ()
Int setupBlobs ()
Int computeFluxLimit (Float &fluxlimit, Float threshold)
Int computeMatrixA ()
Int computeRHS ()
Int solveMatrixEqn (Int scale)
Int computePenaltyFunction (Int scale, Float &loopgain, Bool choosespec)
Int updateSolution (IPosition globalmaxpos, Int maxscaleindex, Float loopgain)
Int checkConvergence (Bool choosespec, Float thresh, Float fluxlimit)
Int IND2 (Int taylor, Int scale)
Int IND4 (Int taylor1, Int taylor2, Int scale1, Int scale2)

Private Attributes

LogIO os
Int ntaylor_p
Int psfntaylor_p
Int nscales_p
Int nx_p
Int ny_p
Int totalIters_p
TempLattice< Float > * dirty_p
 Image mask.
TempLattice< Complex > * dirtyFT_p
TempLattice< Float > * mask_p
TempLattice< Float > * fftmask_p
Vector< FloatscaleSizes_p
Vector< FloatscaleBias_p
Vector< FloattotalScaleFlux_p
Vector< FloattotalTaylorFlux_p
Float weightScaleFactor_p
Float maxPsf_p
IPosition gip
IPosition imshape
Int nx
Int ny
Int npol_p
Int nchan
Bool donePSF_p
Bool donePSP_p
Bool doneCONV_p
PtrBlock< TempLattice< Float > * > vecScales_p
 h(s) [nx,ny,nscales]
PtrBlock< TempLattice< Complex > * > vecScalesFT_p
PtrBlock< TempLattice< Float > * > vecPsf_p
 B_k [nx,ny,ntaylor].
PtrBlock< TempLattice< Complex > * > vecPsfFT_p
PtrBlock< TempLattice< Float > * > vecDirty_p
 I_D : Residual/Dirty Images [nx,ny,ntaylor].
PtrBlock< TempLattice< Float > * > vecModel_p
 I_M : Model Images [nx,ny,ntaylor].
PtrBlock< TempLattice< Float > * > cubeA_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].
PtrBlock< LatticeIterator
< Float > * > 
itercubeA_p
PtrBlock< TempLattice< Float > * > matR_p
 R_{sk} = I_D * B_{sk} [nx,ny,ntaylor,nscales].
PtrBlock< LatticeIterator
< Float > * > 
itermatR_p
PtrBlock< TempLattice< Float > * > matCoeffs_p
 a_{sk} = Solution vectors.
PtrBlock< LatticeIterator
< Float > * > 
itermatCoeffs_p
Double memoryMB_p
 Memory to be allocated per TempLattice.
PtrBlock< Matrix< Double > * > matA_p
 Solve [A][Coeffs] = [I_D * B] Shape of A : [ntaylor,ntaylor].
PtrBlock< Matrix< Double > * > invMatA_p
TempLattice< Complex > * cWork_p
 Scratch Lattices and iterators.
TempLattice< Float > * tWork_p
LatticeIterator< Float > * itertWork_p
LatticeExprNode len_p
Float lambda_p
Bool adbg

Detailed Description

template<class T>
class casa::MultiTermLatticeCleaner< T >

Definition at line 39 of file MultiTermLatticeCleaner.h.


Constructor & Destructor Documentation

Create a cleaner for a specific dirty image and PSF.

template<class T>
casa::MultiTermLatticeCleaner< T >::MultiTermLatticeCleaner ( const MultiTermLatticeCleaner< T > &  other)

The copy constructor uses reference semantics.

The destructor does nothing special.


Member Function Documentation

template<class T>
Int casa::MultiTermLatticeCleaner< T >::addTo ( Lattice< Float > &  to,
const Lattice< Float > &  add,
Float  multiplier 
) [private]
template<class T>
Int casa::MultiTermLatticeCleaner< T >::checkConvergence ( Bool  choosespec,
Float  thresh,
Float  fluxlimit 
) [private]
template<class T>
Int casa::MultiTermLatticeCleaner< T >::computeFluxLimit ( Float fluxlimit,
Float  threshold 
) [private]
template<class T>
Int casa::MultiTermLatticeCleaner< T >::computeMatrixA ( ) [private]
template<class T>
Int casa::MultiTermLatticeCleaner< T >::computePenaltyFunction ( Int  scale,
Float loopgain,
Bool  choosespec 
) [private]
template<class T>
Int casa::MultiTermLatticeCleaner< T >::computeRHS ( ) [private]
template<class T>
Bool casa::MultiTermLatticeCleaner< T >::findMaxAbsLattice ( const TempLattice< Float > &  masklat,
const Lattice< Float > &  lattice,
Float maxAbs,
IPosition posMaxAbs,
Bool  flip = False 
) [private]
template<class T>
Bool casa::MultiTermLatticeCleaner< T >::getinvhessian ( Matrix< Double > &  invhessian)

Output : Hessian matrix.

template<class T>
Bool casa::MultiTermLatticeCleaner< T >::getmodel ( int  order,
Lattice< T > &  model 
)

Output : Model images.

template<class T>
Bool casa::MultiTermLatticeCleaner< T >::getresidual ( int  order,
Lattice< T > &  residual 
)

Ouput : psfs and dirty images.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::IND2 ( Int  taylor,
Int  scale 
) [private]
template<class T>
Int casa::MultiTermLatticeCleaner< T >::IND4 ( Int  taylor1,
Int  taylor2,
Int  scale1,
Int  scale2 
) [private]
template<class T>
Bool casa::MultiTermLatticeCleaner< T >::initialise ( Int  nx,
Int  ny 
)

Initialize all the memory being used.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::manageMemory ( Bool  allocate) [private]
template<class T>
Int casa::MultiTermLatticeCleaner< T >::mtclean ( LatticeCleanProgress progress = 0)

Run the minor cycle.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::numberOfTempLattices ( Int  nscales,
Int  ntaylor 
) [private]
template<class T>
MultiTermLatticeCleaner<T>& casa::MultiTermLatticeCleaner< T >::operator= ( const MultiTermLatticeCleaner< T > &  other)

The assignment operator also uses reference semantics.

template<class T>
Bool casa::MultiTermLatticeCleaner< T >::setcontrol ( CleanEnums::CleanType  cleanType,
const Int  niter,
const Float  gain,
const Quantity aThreshold,
const Bool  choose 
)

Set control parameters.

Reimplemented from casa::LatticeCleaner< T >.

template<class T>
Bool casa::MultiTermLatticeCleaner< T >::setmask ( Lattice< T > &  mask)

Input : mask.

template<class T>
Bool casa::MultiTermLatticeCleaner< T >::setmodel ( int  order,
Lattice< T > &  model 
)

Input : model images.

template<class T>
Bool casa::MultiTermLatticeCleaner< T >::setntaylorterms ( const int &  nterms)

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

template<class T>
Bool casa::MultiTermLatticeCleaner< T >::setpsf ( int  order,
Lattice< T > &  psf 
)

Input : psfs and dirty images.

template<class T>
Bool casa::MultiTermLatticeCleaner< T >::setresidual ( int  order,
Lattice< T > &  dirty 
)

Input : psfs and dirty images.

template<class T>
Bool casa::MultiTermLatticeCleaner< T >::setscales ( const Vector< Float > &  scales)

Input : scales.

Reimplemented from casa::LatticeCleaner< T >.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::setupBlobs ( ) [private]
template<class T>
Int casa::MultiTermLatticeCleaner< T >::setupFFTMask ( ) [private]
template<class T>
Int casa::MultiTermLatticeCleaner< T >::setupUserMask ( ) [private]
template<class T>
Int casa::MultiTermLatticeCleaner< T >::solveMatrixEqn ( Int  scale) [private]
template<class T>
Int casa::MultiTermLatticeCleaner< T >::updateSolution ( IPosition  globalmaxpos,
Int  maxscaleindex,
Float  loopgain 
) [private]

Member Data Documentation

template<class T>
Bool casa::MultiTermLatticeCleaner< T >::adbg [private]

Definition at line 196 of file MultiTermLatticeCleaner.h.

template<class T>
PtrBlock<TempLattice<Float>* > casa::MultiTermLatticeCleaner< T >::cubeA_p [private]

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 148 of file MultiTermLatticeCleaner.h.

template<class T>
TempLattice<Complex>* casa::MultiTermLatticeCleaner< T >::cWork_p [private]

Scratch Lattices and iterators.

Definition at line 168 of file MultiTermLatticeCleaner.h.

template<class T>
TempLattice<Float>* casa::MultiTermLatticeCleaner< T >::dirty_p [private]

Image mask.

Definition at line 116 of file MultiTermLatticeCleaner.h.

template<class T>
TempLattice<Complex>* casa::MultiTermLatticeCleaner< T >::dirtyFT_p [private]

Definition at line 117 of file MultiTermLatticeCleaner.h.

template<class T>
Bool casa::MultiTermLatticeCleaner< T >::doneCONV_p [private]

Definition at line 130 of file MultiTermLatticeCleaner.h.

template<class T>
Bool casa::MultiTermLatticeCleaner< T >::donePSF_p [private]

Definition at line 130 of file MultiTermLatticeCleaner.h.

template<class T>
Bool casa::MultiTermLatticeCleaner< T >::donePSP_p [private]

Definition at line 130 of file MultiTermLatticeCleaner.h.

template<class T>
TempLattice<Float>* casa::MultiTermLatticeCleaner< T >::fftmask_p [private]

Definition at line 119 of file MultiTermLatticeCleaner.h.

template<class T>
IPosition casa::MultiTermLatticeCleaner< T >::gip [private]

Definition at line 128 of file MultiTermLatticeCleaner.h.

template<class T>
IPosition casa::MultiTermLatticeCleaner< T >::imshape [private]

Definition at line 128 of file MultiTermLatticeCleaner.h.

template<class T>
PtrBlock<Matrix<Double>*> casa::MultiTermLatticeCleaner< T >::invMatA_p [private]

Definition at line 165 of file MultiTermLatticeCleaner.h.

Definition at line 149 of file MultiTermLatticeCleaner.h.

Definition at line 157 of file MultiTermLatticeCleaner.h.

Definition at line 153 of file MultiTermLatticeCleaner.h.

template<class T>
LatticeIterator<Float>* casa::MultiTermLatticeCleaner< T >::itertWork_p [private]

Definition at line 170 of file MultiTermLatticeCleaner.h.

template<class T>
Float casa::MultiTermLatticeCleaner< T >::lambda_p [private]

Definition at line 174 of file MultiTermLatticeCleaner.h.

template<class T>
LatticeExprNode casa::MultiTermLatticeCleaner< T >::len_p [private]

Definition at line 172 of file MultiTermLatticeCleaner.h.

template<class T>
TempLattice<Float>* casa::MultiTermLatticeCleaner< T >::mask_p [private]

Definition at line 118 of file MultiTermLatticeCleaner.h.

template<class T>
PtrBlock<Matrix<Double>*> casa::MultiTermLatticeCleaner< T >::matA_p [private]

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

Definition at line 164 of file MultiTermLatticeCleaner.h.

template<class T>
PtrBlock<TempLattice<Float>* > casa::MultiTermLatticeCleaner< T >::matCoeffs_p [private]

a_{sk} = Solution vectors.

[nx,ny,ntaylor,nscales]

Definition at line 156 of file MultiTermLatticeCleaner.h.

template<class T>
PtrBlock<TempLattice<Float>* > casa::MultiTermLatticeCleaner< T >::matR_p [private]

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

Definition at line 152 of file MultiTermLatticeCleaner.h.

template<class T>
Float casa::MultiTermLatticeCleaner< T >::maxPsf_p [private]

Definition at line 126 of file MultiTermLatticeCleaner.h.

template<class T>
Double casa::MultiTermLatticeCleaner< T >::memoryMB_p [private]

Memory to be allocated per TempLattice.

Definition at line 160 of file MultiTermLatticeCleaner.h.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::nchan [private]

Definition at line 129 of file MultiTermLatticeCleaner.h.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::npol_p [private]

Definition at line 129 of file MultiTermLatticeCleaner.h.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::nscales_p [private]

Definition at line 110 of file MultiTermLatticeCleaner.h.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::ntaylor_p [private]

Definition at line 108 of file MultiTermLatticeCleaner.h.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::nx [private]

Definition at line 129 of file MultiTermLatticeCleaner.h.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::nx_p [private]

Definition at line 111 of file MultiTermLatticeCleaner.h.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::ny [private]

Definition at line 129 of file MultiTermLatticeCleaner.h.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::ny_p [private]

Definition at line 112 of file MultiTermLatticeCleaner.h.

template<class T>
LogIO casa::MultiTermLatticeCleaner< T >::os [private]

Definition at line 92 of file MultiTermLatticeCleaner.h.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::psfntaylor_p [private]

Definition at line 109 of file MultiTermLatticeCleaner.h.

template<class T>
Vector<Float> casa::MultiTermLatticeCleaner< T >::scaleBias_p [private]

Definition at line 122 of file MultiTermLatticeCleaner.h.

template<class T>
Vector<Float> casa::MultiTermLatticeCleaner< T >::scaleSizes_p [private]

Definition at line 121 of file MultiTermLatticeCleaner.h.

template<class T>
Int casa::MultiTermLatticeCleaner< T >::totalIters_p [private]

Definition at line 113 of file MultiTermLatticeCleaner.h.

template<class T>
Vector<Float> casa::MultiTermLatticeCleaner< T >::totalScaleFlux_p [private]

Definition at line 123 of file MultiTermLatticeCleaner.h.

template<class T>
Vector<Float> casa::MultiTermLatticeCleaner< T >::totalTaylorFlux_p [private]

Definition at line 124 of file MultiTermLatticeCleaner.h.

template<class T>
TempLattice<Float>* casa::MultiTermLatticeCleaner< T >::tWork_p [private]

Definition at line 169 of file MultiTermLatticeCleaner.h.

template<class T>
PtrBlock<TempLattice<Float>* > casa::MultiTermLatticeCleaner< T >::vecDirty_p [private]

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

Definition at line 141 of file MultiTermLatticeCleaner.h.

template<class T>
PtrBlock<TempLattice<Float>* > casa::MultiTermLatticeCleaner< T >::vecModel_p [private]

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

Definition at line 144 of file MultiTermLatticeCleaner.h.

template<class T>
PtrBlock<TempLattice<Float>* > casa::MultiTermLatticeCleaner< T >::vecPsf_p [private]

B_k [nx,ny,ntaylor].

Definition at line 137 of file MultiTermLatticeCleaner.h.

template<class T>
PtrBlock<TempLattice<Complex>* > casa::MultiTermLatticeCleaner< T >::vecPsfFT_p [private]

Definition at line 138 of file MultiTermLatticeCleaner.h.

template<class T>
PtrBlock<TempLattice<Float>* > casa::MultiTermLatticeCleaner< T >::vecScales_p [private]

h(s) [nx,ny,nscales]

Definition at line 133 of file MultiTermLatticeCleaner.h.

template<class T>
PtrBlock<TempLattice<Complex>* > casa::MultiTermLatticeCleaner< T >::vecScalesFT_p [private]

Definition at line 134 of file MultiTermLatticeCleaner.h.

template<class T>
Float casa::MultiTermLatticeCleaner< T >::weightScaleFactor_p [private]

Definition at line 125 of file MultiTermLatticeCleaner.h.


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