casa
$Rev:20696$
|
#include <MultiTermLatticeCleaner.h>
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< Float > | scaleSizes_p |
Vector< Float > | scaleBias_p |
Vector< Float > | totalScaleFlux_p |
Vector< Float > | totalTaylorFlux_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 |
Definition at line 39 of file MultiTermLatticeCleaner.h.
casa::MultiTermLatticeCleaner< T >::MultiTermLatticeCleaner | ( | ) |
Create a cleaner for a specific dirty image and PSF.
casa::MultiTermLatticeCleaner< T >::MultiTermLatticeCleaner | ( | const MultiTermLatticeCleaner< T > & | other | ) |
The copy constructor uses reference semantics.
casa::MultiTermLatticeCleaner< T >::~MultiTermLatticeCleaner | ( | ) |
The destructor does nothing special.
Int casa::MultiTermLatticeCleaner< T >::addTo | ( | Lattice< Float > & | to, |
const Lattice< Float > & | add, | ||
Float | multiplier | ||
) | [private] |
Int casa::MultiTermLatticeCleaner< T >::checkConvergence | ( | Bool | choosespec, |
Float | thresh, | ||
Float | fluxlimit | ||
) | [private] |
Int casa::MultiTermLatticeCleaner< T >::computeFluxLimit | ( | Float & | fluxlimit, |
Float | threshold | ||
) | [private] |
Int casa::MultiTermLatticeCleaner< T >::computeMatrixA | ( | ) | [private] |
Int casa::MultiTermLatticeCleaner< T >::computePenaltyFunction | ( | Int | scale, |
Float & | loopgain, | ||
Bool | choosespec | ||
) | [private] |
Int casa::MultiTermLatticeCleaner< T >::computeRHS | ( | ) | [private] |
Bool casa::MultiTermLatticeCleaner< T >::findMaxAbsLattice | ( | const TempLattice< Float > & | masklat, |
const Lattice< Float > & | lattice, | ||
Float & | maxAbs, | ||
IPosition & | posMaxAbs, | ||
Bool | flip = False |
||
) | [private] |
Bool casa::MultiTermLatticeCleaner< T >::getinvhessian | ( | Matrix< Double > & | invhessian | ) |
Output : Hessian matrix.
Bool casa::MultiTermLatticeCleaner< T >::getmodel | ( | int | order, |
Lattice< T > & | model | ||
) |
Output : Model images.
Bool casa::MultiTermLatticeCleaner< T >::getresidual | ( | int | order, |
Lattice< T > & | residual | ||
) |
Ouput : psfs and dirty images.
Int casa::MultiTermLatticeCleaner< T >::IND2 | ( | Int | taylor, |
Int | scale | ||
) | [private] |
Int casa::MultiTermLatticeCleaner< T >::IND4 | ( | Int | taylor1, |
Int | taylor2, | ||
Int | scale1, | ||
Int | scale2 | ||
) | [private] |
Bool casa::MultiTermLatticeCleaner< T >::initialise | ( | Int | nx, |
Int | ny | ||
) |
Initialize all the memory being used.
Int casa::MultiTermLatticeCleaner< T >::manageMemory | ( | Bool | allocate | ) | [private] |
Int casa::MultiTermLatticeCleaner< T >::mtclean | ( | LatticeCleanProgress * | progress = 0 | ) |
Run the minor cycle.
Int casa::MultiTermLatticeCleaner< T >::numberOfTempLattices | ( | Int | nscales, |
Int | ntaylor | ||
) | [private] |
MultiTermLatticeCleaner<T>& casa::MultiTermLatticeCleaner< T >::operator= | ( | const MultiTermLatticeCleaner< T > & | other | ) |
The assignment operator also uses reference semantics.
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 >.
Bool casa::MultiTermLatticeCleaner< T >::setmask | ( | Lattice< T > & | mask | ) |
Input : mask.
Bool casa::MultiTermLatticeCleaner< T >::setmodel | ( | int | order, |
Lattice< T > & | model | ||
) |
Input : model images.
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.
Bool casa::MultiTermLatticeCleaner< T >::setpsf | ( | int | order, |
Lattice< T > & | psf | ||
) |
Input : psfs and dirty images.
Bool casa::MultiTermLatticeCleaner< T >::setresidual | ( | int | order, |
Lattice< T > & | dirty | ||
) |
Input : psfs and dirty images.
Bool casa::MultiTermLatticeCleaner< T >::setscales | ( | const Vector< Float > & | scales | ) |
Input : scales.
Reimplemented from casa::LatticeCleaner< T >.
Int casa::MultiTermLatticeCleaner< T >::setupBlobs | ( | ) | [private] |
Int casa::MultiTermLatticeCleaner< T >::setupFFTMask | ( | ) | [private] |
Int casa::MultiTermLatticeCleaner< T >::setupUserMask | ( | ) | [private] |
Int casa::MultiTermLatticeCleaner< T >::solveMatrixEqn | ( | Int | scale | ) | [private] |
Int casa::MultiTermLatticeCleaner< T >::updateSolution | ( | IPosition | globalmaxpos, |
Int | maxscaleindex, | ||
Float | loopgain | ||
) | [private] |
Bool casa::MultiTermLatticeCleaner< T >::adbg [private] |
Definition at line 196 of file MultiTermLatticeCleaner.h.
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.
TempLattice<Complex>* casa::MultiTermLatticeCleaner< T >::cWork_p [private] |
Scratch Lattices and iterators.
Definition at line 168 of file MultiTermLatticeCleaner.h.
TempLattice<Float>* casa::MultiTermLatticeCleaner< T >::dirty_p [private] |
Image mask.
Definition at line 116 of file MultiTermLatticeCleaner.h.
TempLattice<Complex>* casa::MultiTermLatticeCleaner< T >::dirtyFT_p [private] |
Definition at line 117 of file MultiTermLatticeCleaner.h.
Bool casa::MultiTermLatticeCleaner< T >::doneCONV_p [private] |
Definition at line 130 of file MultiTermLatticeCleaner.h.
Bool casa::MultiTermLatticeCleaner< T >::donePSF_p [private] |
Definition at line 130 of file MultiTermLatticeCleaner.h.
Bool casa::MultiTermLatticeCleaner< T >::donePSP_p [private] |
Definition at line 130 of file MultiTermLatticeCleaner.h.
TempLattice<Float>* casa::MultiTermLatticeCleaner< T >::fftmask_p [private] |
Definition at line 119 of file MultiTermLatticeCleaner.h.
IPosition casa::MultiTermLatticeCleaner< T >::gip [private] |
Definition at line 128 of file MultiTermLatticeCleaner.h.
IPosition casa::MultiTermLatticeCleaner< T >::imshape [private] |
Definition at line 128 of file MultiTermLatticeCleaner.h.
PtrBlock<Matrix<Double>*> casa::MultiTermLatticeCleaner< T >::invMatA_p [private] |
Definition at line 165 of file MultiTermLatticeCleaner.h.
PtrBlock<LatticeIterator<Float>* > casa::MultiTermLatticeCleaner< T >::itercubeA_p [private] |
Definition at line 149 of file MultiTermLatticeCleaner.h.
PtrBlock<LatticeIterator<Float>* > casa::MultiTermLatticeCleaner< T >::itermatCoeffs_p [private] |
Definition at line 157 of file MultiTermLatticeCleaner.h.
PtrBlock<LatticeIterator<Float>* > casa::MultiTermLatticeCleaner< T >::itermatR_p [private] |
Definition at line 153 of file MultiTermLatticeCleaner.h.
LatticeIterator<Float>* casa::MultiTermLatticeCleaner< T >::itertWork_p [private] |
Definition at line 170 of file MultiTermLatticeCleaner.h.
Float casa::MultiTermLatticeCleaner< T >::lambda_p [private] |
Definition at line 174 of file MultiTermLatticeCleaner.h.
LatticeExprNode casa::MultiTermLatticeCleaner< T >::len_p [private] |
Definition at line 172 of file MultiTermLatticeCleaner.h.
TempLattice<Float>* casa::MultiTermLatticeCleaner< T >::mask_p [private] |
Definition at line 118 of file MultiTermLatticeCleaner.h.
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.
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.
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.
Float casa::MultiTermLatticeCleaner< T >::maxPsf_p [private] |
Definition at line 126 of file MultiTermLatticeCleaner.h.
Double casa::MultiTermLatticeCleaner< T >::memoryMB_p [private] |
Memory to be allocated per TempLattice.
Definition at line 160 of file MultiTermLatticeCleaner.h.
Int casa::MultiTermLatticeCleaner< T >::nchan [private] |
Definition at line 129 of file MultiTermLatticeCleaner.h.
Int casa::MultiTermLatticeCleaner< T >::npol_p [private] |
Definition at line 129 of file MultiTermLatticeCleaner.h.
Int casa::MultiTermLatticeCleaner< T >::nscales_p [private] |
Definition at line 110 of file MultiTermLatticeCleaner.h.
Int casa::MultiTermLatticeCleaner< T >::ntaylor_p [private] |
Definition at line 108 of file MultiTermLatticeCleaner.h.
Int casa::MultiTermLatticeCleaner< T >::nx [private] |
Definition at line 129 of file MultiTermLatticeCleaner.h.
Int casa::MultiTermLatticeCleaner< T >::nx_p [private] |
Definition at line 111 of file MultiTermLatticeCleaner.h.
Int casa::MultiTermLatticeCleaner< T >::ny [private] |
Definition at line 129 of file MultiTermLatticeCleaner.h.
Int casa::MultiTermLatticeCleaner< T >::ny_p [private] |
Definition at line 112 of file MultiTermLatticeCleaner.h.
LogIO casa::MultiTermLatticeCleaner< T >::os [private] |
Definition at line 92 of file MultiTermLatticeCleaner.h.
Int casa::MultiTermLatticeCleaner< T >::psfntaylor_p [private] |
Definition at line 109 of file MultiTermLatticeCleaner.h.
Vector<Float> casa::MultiTermLatticeCleaner< T >::scaleBias_p [private] |
Definition at line 122 of file MultiTermLatticeCleaner.h.
Vector<Float> casa::MultiTermLatticeCleaner< T >::scaleSizes_p [private] |
Definition at line 121 of file MultiTermLatticeCleaner.h.
Int casa::MultiTermLatticeCleaner< T >::totalIters_p [private] |
Definition at line 113 of file MultiTermLatticeCleaner.h.
Vector<Float> casa::MultiTermLatticeCleaner< T >::totalScaleFlux_p [private] |
Definition at line 123 of file MultiTermLatticeCleaner.h.
Vector<Float> casa::MultiTermLatticeCleaner< T >::totalTaylorFlux_p [private] |
Definition at line 124 of file MultiTermLatticeCleaner.h.
TempLattice<Float>* casa::MultiTermLatticeCleaner< T >::tWork_p [private] |
Definition at line 169 of file MultiTermLatticeCleaner.h.
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.
PtrBlock<TempLattice<Float>* > casa::MultiTermLatticeCleaner< T >::vecModel_p [private] |
I_M : Model Images [nx,ny,ntaylor].
Definition at line 144 of file MultiTermLatticeCleaner.h.
PtrBlock<TempLattice<Float>* > casa::MultiTermLatticeCleaner< T >::vecPsf_p [private] |
B_k [nx,ny,ntaylor].
Definition at line 137 of file MultiTermLatticeCleaner.h.
PtrBlock<TempLattice<Complex>* > casa::MultiTermLatticeCleaner< T >::vecPsfFT_p [private] |
Definition at line 138 of file MultiTermLatticeCleaner.h.
PtrBlock<TempLattice<Float>* > casa::MultiTermLatticeCleaner< T >::vecScales_p [private] |
h(s) [nx,ny,nscales]
Definition at line 133 of file MultiTermLatticeCleaner.h.
PtrBlock<TempLattice<Complex>* > casa::MultiTermLatticeCleaner< T >::vecScalesFT_p [private] |
Definition at line 134 of file MultiTermLatticeCleaner.h.
Float casa::MultiTermLatticeCleaner< T >::weightScaleFactor_p [private] |
Definition at line 125 of file MultiTermLatticeCleaner.h.