casacore
|
#include <MultiTermLatticeCleaner.h>
Public Member Functions | |
MultiTermLatticeCleaner () | |
Create a cleaner for a specific dirty image and PSF. More... | |
MultiTermLatticeCleaner (const MultiTermLatticeCleaner< T > &other) | |
The copy constructor uses reference semantics. More... | |
MultiTermLatticeCleaner< T > & | operator= (const MultiTermLatticeCleaner< T > &other) |
The assignment operator also uses reference semantics. More... | |
~MultiTermLatticeCleaner () | |
The destructor does nothing special. More... | |
Bool | setntaylorterms (const int &nterms) |
Input : number of Taylor terms Reshapes PtrBlocks to hold the correct number of PSFs and Residual images. More... | |
Bool | setscales (const Vector< Float > &scales) |
Input : scales. More... | |
Bool | initialise (Int nx, Int ny) |
Initialize all the memory being used. More... | |
Bool | setcontrol (CleanEnums::CleanType cleanType, const Int niter, const Float gain, const Quantity &aThreshold, const Bool choose) |
Set control parameters. More... | |
Bool | setcontrol (CleanEnums::CleanType cleanType, const Int niter, const Float gain, const Quantity &aThreshold, const Quantity &, const Bool choose=True) |
Bool | setpsf (int order, Lattice< T > &psf) |
Input : psfs and dirty images. More... | |
Bool | setresidual (int order, Lattice< T > &dirty) |
Input : psfs and dirty images. More... | |
Bool | setmodel (int order, Lattice< T > &model) |
Input : model images. More... | |
Bool | setmask (Lattice< T > &mask) |
Input : mask. More... | |
Int | mtclean (LatticeCleanProgress *progress=0) |
Run the minor cycle. More... | |
Bool | getmodel (int order, Lattice< T > &model) |
Output : Model images. More... | |
Bool | getresidual (int order, Lattice< T > &residual) |
Ouput : psfs and dirty images. More... | |
Bool | getinvhessian (Matrix< Double > &invhessian) |
Output : Hessian matrix. More... | |
Public Member Functions inherited from casacore::LatticeCleaner< T > | |
LatticeCleaner () | |
Create a cleaner : default constructor. More... | |
LatticeCleaner (const Lattice< T > &psf, const Lattice< T > &dirty) | |
Create a cleaner for a specific dirty image and PSF. More... | |
LatticeCleaner (const LatticeCleaner< T > &other) | |
The copy constructor uses reference semantics. More... | |
LatticeCleaner< T > & | operator= (const LatticeCleaner< T > &other) |
The assignment operator also uses reference semantics. More... | |
~LatticeCleaner () | |
The destructor does nothing special. More... | |
void | update (const Lattice< T > &dirty) |
Update the dirty image only. More... | |
Bool | setscales (const Int nscales, const Float scaleInc=1.0) |
Set a number of scale sizes. More... | |
Bool | setscales (const Vector< Float > &scales) |
Set a specific set of scales. More... | |
Bool | setcontrol (CleanEnums::CleanType cleanType, const Int niter, const Float gain, const Quantity &aThreshold, const Quantity &fThreshold, const Bool choose=True) |
Set up control parameters cleanType - type of the cleaning algorithm to use (HOGBOM, MULTISCALE) niter - number of iterations gain - loop gain used in cleaning (a fraction of the maximum subtracted at every iteration) aThreshold - absolute threshold to stop iterations fThreshold - fractional threshold (i.e. More... | |
Bool | setcontrol (CleanEnums::CleanType cleanType, const Int niter, const Float gain, const Quantity &threshold, const Bool choose=True) |
This version of the method disables stopping on fractional threshold. More... | |
Int | iteration () const |
return how many iterations we did do More... | |
Int | numberIterations () const |
void | startingIteration (const Int starting=0) |
what iteration number to start on More... | |
Int | clean (Lattice< T > &model, LatticeCleanProgress *progress=0) |
Clean an image. More... | |
void | setMask (Lattice< T > &mask, const T &maskThreshold=T(0.9)) |
Set the mask mask - input mask lattice maskThreshold - if positive, the value is treated as a threshold value to determine whether a pixel is good (mask value is greater than the threshold) or has to be masked (mask value is below the threshold). More... | |
void | ignoreCenterBox (Bool huh) |
Tell the algorithm to NOT clean just the inner quarter (This is useful when multiscale clean is being used inside a major cycle for MF or WF algorithms) if True, the full image deconvolution will be attempted. More... | |
void | setSmallScaleBias (const Float x=0.5) |
Consider the case of a point source: the flux on all scales is the same, and the first scale will be chosen. More... | |
void | stopAtLargeScaleNegative () |
During early iterations of a cycled MS Clean in mosaicing, it common to come across an ocsilatory pattern going between positive and negative in the large scale. More... | |
void | stopPointMode (Int nStopPointMode) |
Some algorithms require that the cycles be terminated when the image is dominated by point sources; if we get nStopPointMode of the smallest scale components in a row, we terminate the cycles. More... | |
Bool | queryStopPointMode () const |
After completion of cycle, querry this to find out if we stopped because of stopPointMode. More... | |
void | speedup (const Float Ndouble) |
speedup() will speed the clean iteration by raising the threshold. More... | |
Lattice< T > * | residual () |
Look at what WE think the residuals look like Assumes the first scale is zero-sized. More... | |
Float | threshold () const |
Method to return threshold, including any speedup factors. More... | |
T | strengthOptimum () const |
Method to return the strength optimum achieved at the last clean iteration The output of this method makes sense only if it is called after clean. More... | |
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) |
Additional Inherited Members | |
Static Public Member Functions inherited from casacore::LatticeCleaner< T > | |
static void | addTo (Lattice< T > &to, const Lattice< T > &add) |
Helper function to optimize adding. More... | |
Protected Member Functions inherited from casacore::LatticeCleaner< T > | |
Bool | validatePsf (const Lattice< T > &psf) |
Make sure that the peak of the Psf is within the image. More... | |
void | makeScale (Lattice< T > &scale, const Float &scaleSize) |
Make an lattice of the specified scale. More... | |
Float | spheroidal (Float nu) |
Make Spheroidal function for scale images. More... | |
Bool | findMaxAbsMaskLattice (const Lattice< T > &lattice, const Lattice< T > &mask, T &maxAbs, IPosition &posMax) |
Find the Peak of the lattice, applying a mask. More... | |
Static Protected Member Functions inherited from casacore::LatticeCleaner< T > | |
static Bool | findMaxAbsLattice (const Lattice< T > &lattice, T &maxAbs, IPosition &posMax) |
Find the Peak of the Lattice. More... | |
static void | makeBoxesSameSize (IPosition &blc1, IPosition &trc1, IPosition &blc2, IPosition &trc2) |
Helper function to reduce the box sizes until the have the same size keeping the centers intact More... | |
Protected Attributes inherited from casacore::LatticeCleaner< T > | |
CleanEnums::CleanType | itsCleanType |
Float | itsGain |
Int | itsMaxNiter |
Quantum< Double > | itsThreshold |
TempLattice< T > * | itsMask |
IPosition | itsPositionPeakPsf |
Definition at line 41 of file MultiTermLatticeCleaner.h.
casacore::MultiTermLatticeCleaner< T >::MultiTermLatticeCleaner | ( | ) |
Create a cleaner for a specific dirty image and PSF.
casacore::MultiTermLatticeCleaner< T >::MultiTermLatticeCleaner | ( | const MultiTermLatticeCleaner< T > & | other | ) |
The copy constructor uses reference semantics.
casacore::MultiTermLatticeCleaner< T >::~MultiTermLatticeCleaner | ( | ) |
The destructor does nothing special.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Bool casacore::MultiTermLatticeCleaner< T >::getinvhessian | ( | Matrix< Double > & | invhessian | ) |
Output : Hessian matrix.
Bool casacore::MultiTermLatticeCleaner< T >::getmodel | ( | int | order, |
Lattice< T > & | model | ||
) |
Output : Model images.
Bool casacore::MultiTermLatticeCleaner< T >::getresidual | ( | int | order, |
Lattice< T > & | residual | ||
) |
Ouput : psfs and dirty images.
|
private |
|
private |
Bool casacore::MultiTermLatticeCleaner< T >::initialise | ( | Int | nx, |
Int | ny | ||
) |
Initialize all the memory being used.
|
private |
Int casacore::MultiTermLatticeCleaner< T >::mtclean | ( | LatticeCleanProgress * | progress = 0 | ) |
Run the minor cycle.
|
private |
MultiTermLatticeCleaner<T>& casacore::MultiTermLatticeCleaner< T >::operator= | ( | const MultiTermLatticeCleaner< T > & | other | ) |
The assignment operator also uses reference semantics.
Bool casacore::MultiTermLatticeCleaner< T >::setcontrol | ( | CleanEnums::CleanType | cleanType, |
const Int | niter, | ||
const Float | gain, | ||
const Quantity & | aThreshold, | ||
const Bool | choose | ||
) |
Set control parameters.
Referenced by casacore::MultiTermLatticeCleaner< T >::setcontrol().
|
inline |
Definition at line 71 of file MultiTermLatticeCleaner.h.
References casacore::MultiTermLatticeCleaner< T >::setcontrol().
Bool casacore::MultiTermLatticeCleaner< T >::setmask | ( | Lattice< T > & | mask | ) |
Input : mask.
Bool casacore::MultiTermLatticeCleaner< T >::setmodel | ( | int | order, |
Lattice< T > & | model | ||
) |
Input : model images.
Bool casacore::MultiTermLatticeCleaner< T >::setntaylorterms | ( | const int & | nterms | ) |
Input : number of Taylor terms Reshapes PtrBlocks to hold the correct number of PSFs and Residual images.
Bool casacore::MultiTermLatticeCleaner< T >::setpsf | ( | int | order, |
Lattice< T > & | psf | ||
) |
Input : psfs and dirty images.
Bool casacore::MultiTermLatticeCleaner< T >::setresidual | ( | int | order, |
Lattice< T > & | dirty | ||
) |
Input : psfs and dirty images.
Bool casacore::MultiTermLatticeCleaner< T >::setscales | ( | const Vector< Float > & | scales | ) |
Input : scales.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 206 of file MultiTermLatticeCleaner.h.
|
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 158 of file MultiTermLatticeCleaner.h.
|
private |
Scratch Lattices and iterators.
Definition at line 178 of file MultiTermLatticeCleaner.h.
|
private |
Image mask.
Definition at line 126 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 127 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 140 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 140 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 140 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 129 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 138 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 138 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 175 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 159 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 167 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 163 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 180 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 184 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 182 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 128 of file MultiTermLatticeCleaner.h.
|
private |
Solve [A][Coeffs] = [I_D * B] Shape of A : [ntaylor,ntaylor].
Definition at line 174 of file MultiTermLatticeCleaner.h.
|
private |
a_{sk} = Solution vectors.
[nx,ny,ntaylor,nscales]
Definition at line 166 of file MultiTermLatticeCleaner.h.
|
private |
R_{sk} = I_D * B_{sk} [nx,ny,ntaylor,nscales].
Definition at line 162 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 136 of file MultiTermLatticeCleaner.h.
|
private |
Memory to be allocated per TempLattice.
Definition at line 170 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 139 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 139 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 120 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 118 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 139 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 121 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 139 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 122 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 102 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 119 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 132 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 131 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 123 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 133 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 134 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 179 of file MultiTermLatticeCleaner.h.
|
private |
I_D : Residual/Dirty Images [nx,ny,ntaylor].
Definition at line 151 of file MultiTermLatticeCleaner.h.
|
private |
I_M : Model Images [nx,ny,ntaylor].
Definition at line 154 of file MultiTermLatticeCleaner.h.
|
private |
B_k [nx,ny,ntaylor].
Definition at line 147 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 148 of file MultiTermLatticeCleaner.h.
|
private |
h(s) [nx,ny,nscales]
Definition at line 143 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 144 of file MultiTermLatticeCleaner.h.
|
private |
Definition at line 135 of file MultiTermLatticeCleaner.h.