30 #ifndef LATTICES_MULTITERMLATTICECLEANER_H
31 #define LATTICES_MULTITERMLATTICECLEANER_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/lattices/LatticeMath/LatticeCleaner.h>
35 #include <casacore/lattices/Lattices/LatticeIterator.h>
36 #include <casacore/lattices/LEL/LatticeExpr.h>
37 #include <casacore/lattices/LEL/LatticeExprNode.h>
75 {
return setcontrol (cleanType, niter, gain, aThreshold, choose); }
211 #ifndef CASACORE_NO_AUTO_TEMPLATES
212 #include <casacore/lattices/LatticeMath/MultiTermLatticeCleaner.tcc>
A class for doing multi-dimensional cleaning.
Float threshold() const
Method to return threshold, including any speedup factors.
Lattice< T > * residual()
Look at what WE think the residuals look like Assumes the first scale is zero-sized.
Vector< Float > totalTaylorFlux_p
~MultiTermLatticeCleaner()
The destructor does nothing special.
MultiTermLatticeCleaner(const MultiTermLatticeCleaner< T > &other)
The copy constructor uses reference semantics.
Vector< Float > scaleBias_p
PtrBlock< TempLattice< Complex > * > vecPsfFT_p
Int IND2(Int taylor, Int scale)
MultiTermLatticeCleaner()
Create a cleaner for a specific dirty image and PSF.
TempLattice< Float > * tWork_p
Bool findMaxAbsLattice(const TempLattice< Float > &masklat, const Lattice< Float > &lattice, Float &maxAbs, IPosition &posMaxAbs, Bool flip=False)
TempLattice< Float > * dirty_p
Image mask.
Bool setscales(const Vector< Float > &scales)
Input : scales.
PtrBlock< Matrix< Double > * > matA_p
Solve [A][Coeffs] = [I_D * B] Shape of A : [ntaylor,ntaylor].
Int mtclean(LatticeCleanProgress *progress=0)
Run the minor cycle.
PtrBlock< TempLattice< Float > * > vecModel_p
I_M : Model Images [nx,ny,ntaylor].
PtrBlock< LatticeIterator< Float > * > itercubeA_p
TempLattice< Complex > * cWork_p
Scratch Lattices and iterators.
Bool getmodel(int order, Lattice< T > &model)
Output : Model images.
PtrBlock< TempLattice< Float > * > vecScales_p
h(s) [nx,ny,nscales]
TempLattice< Complex > * dirtyFT_p
Int addTo(Lattice< Float > &to, const Lattice< Float > &add, Float multiplier)
Bool setcontrol(CleanEnums::CleanType cleanType, const Int niter, const Float gain, const Quantity &aThreshold, const Quantity &, const Bool choose=True)
PtrBlock< TempLattice< Float > * > cubeA_p
A_{smn} = B_{sm} * B{sn} [nx,ny,ntaylor,ntaylor,nscales,nscales] A_{s1s2mn} = B_{s1m} * B{s2n} [nx,...
PtrBlock< TempLattice< Float > * > matR_p
R_{sk} = I_D * B_{sk} [nx,ny,ntaylor,nscales].
Bool setmask(Lattice< T > &mask)
Input : mask.
Bool setpsf(int order, Lattice< T > &psf)
Input : psfs and dirty images.
Vector< Float > totalScaleFlux_p
Int numberOfTempLattices(Int nscales, Int ntaylor)
PtrBlock< TempLattice< Float > * > vecDirty_p
I_D : Residual/Dirty Images [nx,ny,ntaylor].
LatticeIterator< Float > * itertWork_p
MultiTermLatticeCleaner< T > & operator=(const MultiTermLatticeCleaner< T > &other)
The assignment operator also uses reference semantics.
PtrBlock< TempLattice< Complex > * > vecScalesFT_p
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 setntaylorterms(const int &nterms)
Input : number of Taylor terms Reshapes PtrBlocks to hold the correct number of PSFs and Residual ima...
Bool setresidual(int order, Lattice< T > &dirty)
Input : psfs and dirty images.
Bool getresidual(int order, Lattice< T > &residual)
Ouput : psfs and dirty images.
Int computePenaltyFunction(Int scale, Float &loopgain, Bool choosespec)
Double memoryMB_p
Memory to be allocated per TempLattice.
PtrBlock< LatticeIterator< Float > * > itermatCoeffs_p
PtrBlock< TempLattice< Float > * > vecPsf_p
B_k [nx,ny,ntaylor].
TempLattice< Float > * mask_p
Int IND4(Int taylor1, Int taylor2, Int scale1, Int scale2)
Vector< Float > scaleSizes_p
Int updateSolution(IPosition globalmaxpos, Int maxscaleindex, Float loopgain)
Bool getinvhessian(Matrix< Double > &invhessian)
Output : Hessian matrix.
Int manageMemory(Bool allocate)
Int solveMatrixEqn(Int scale)
Int computeFluxLimit(Float &fluxlimit, Float threshold)
Float weightScaleFactor_p
PtrBlock< TempLattice< Float > * > matCoeffs_p
a_{sk} = Solution vectors.
PtrBlock< LatticeIterator< Float > * > itermatR_p
Bool setmodel(int order, Lattice< T > &model)
Input : model images.
Int checkConvergence(Bool choosespec, Float thresh, Float fluxlimit)
PtrBlock< Matrix< Double > * > invMatA_p
TempLattice< Float > * fftmask_p
A drop-in replacement for Block<T*>.
this file contains all the compiler specific defines
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
bool Bool
Define the standard types used by Casacore.