Go to the documentation of this file.
29 #ifndef LATTICES_LATTICECLEANER_H
30 #define LATTICES_LATTICECLEANER_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/Quanta/Quantum.h>
35 #include <casacore/lattices/Lattices/TempLattice.h>
36 #include <casacore/casa/Arrays/IPosition.h>
37 #include <casacore/casa/Arrays/Vector.h>
38 #include <casacore/casa/Containers/Block.h>
43 class LatticeCleanProgress;
44 template <
class T>
class TempLattice;
335 #ifndef CASACORE_NO_AUTO_TEMPLATES
336 #include <casacore/lattices/LatticeMath/LatticeCleaner.tcc>
337 #endif //# CASACORE_NO_AUTO_TEMPLATES
Int numberIterations() const
CleanEnums::CleanType itsCleanType
TempLattice< T > * itsDirty
~LatticeCleaner()
The destructor does nothing special.
A drop-in replacement for Block<T*>.
Bool itsStopAtLargeScaleNegative
PtrBlock< TempLattice< T > * > itsDirtyConvScales
Bool itsDoSpeedup
Threshold speedup factors:
PtrBlock< TempLattice< T > * > itsScaleMasks
T strengthOptimum() const
Method to return the strength optimum achieved at the last clean iteration The output of this method ...
TempLattice< Complex > * itsXfr
Bool queryStopPointMode() const
After completion of cycle, querry this to find out if we stopped because of stopPointMode.
void ignoreCenterBox(Bool huh)
Tell the algorithm to NOT clean just the inner quarter (This is useful when multiscale clean is being...
Vector< Float > itsScaleSizes
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
Quantum< Double > itsThreshold
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 ...
void stopPointMode(Int nStopPointMode)
Some algorithms require that the cycles be terminated when the image is dominated by point sources; i...
LatticeCleaner(const Lattice< T > &psf, const Lattice< T > &dirty)
Create a cleaner for a specific dirty image and PSF.
PtrBlock< TempLattice< Complex > * > itsScaleXfrs
Int index(const Int scale, const Int otherscale)
Calculate index into PsfConvScales.
Lattice< T > * residual()
Look at what WE think the residuals look like Assumes the first scale is zero-sized.
T itsMaskThreshold
threshold for masks.
TempLattice< T > * itsMask
Vector< Float > itsTotalFluxScale
Float spheroidal(Float nu)
Make Spheroidal function for scale images.
void makeScale(Lattice< T > &scale, const Float &scaleSize)
Make an lattice of the specified scale.
IPosition itsPositionPeakPsf
Quantum< Double > itsFracThreshold
Bool validatePsf(const Lattice< T > &psf)
Make sure that the peak of the Psf is within the image.
Bool setscales(const Vector< Float > &scales)
Set a specific set of scales.
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,...
this file contains all the compiler specific defines
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.
static void addTo(Lattice< T > &to, const Lattice< T > &add)
Helper function to optimize adding.
Bool itsChoose
Let the user choose whether to stop.
static Bool findMaxAbsLattice(const Lattice< T > &lattice, T &maxAbs, IPosition &posMax)
Find the Peak of the Lattice.
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
Bool setscales(const Int nscales, const Float scaleInc=1.0)
Set a number of scale sizes.
PtrBlock< TempLattice< T > * > itsScales
Int iteration() const
return how many iterations we did do
bool Bool
Define the standard types used by Casacore.
void update(const Lattice< T > &dirty)
Update the dirty image only.
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 thresho...
LatticeCleaner()
Create a cleaner : default constructor.
A class for doing multi-dimensional cleaning.
void stopAtLargeScaleNegative()
During early iterations of a cycled MS Clean in mosaicing, it common to come across an ocsilatory pat...
void speedup(const Float Ndouble)
speedup() will speed the clean iteration by raising the threshold.
LatticeCleaner< T > & operator=(const LatticeCleaner< T > &other)
The assignment operator also uses reference semantics.
Int clean(Lattice< T > &model, LatticeCleanProgress *progress=0)
Clean an image.
void startingIteration(const Int starting=0)
what iteration number to start on
Bool findMaxAbsMaskLattice(const Lattice< T > &lattice, const Lattice< T > &mask, T &maxAbs, IPosition &posMax)
Find the Peak of the lattice, applying a mask.
Double itsMemoryMB
Memory to be allocated per TempLattice.
LatticeCleaner(const LatticeCleaner< T > &other)
The copy constructor uses reference semantics.
Float threshold() const
Method to return threshold, including any speedup factors.
PtrBlock< TempLattice< T > * > itsPsfConvScales