29 #ifndef LATTICES_LATTICECLEANER_H
30 #define LATTICES_LATTICECLEANER_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
A Vector of integers, for indexing into Array<T> objects.
Bool itsDoSpeedup
Threshold speedup factors:
Double itsMemoryMB
Memory to be allocated per TempLattice.
A Lattice that can be used for temporary storage.
void update(const Lattice< T > &dirty)
Update the dirty image only.
CleanEnums::CleanType itsCleanType
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
Int clean(Lattice< T > &model, LatticeCleanProgress *progress=0)
Clean an image.
TempLattice< Complex > * itsXfr
Bool itsStopAtLargeScaleNegative
Float threshold() const
Method to return threshold, including any speedup factors.
PtrBlock< TempLattice< T > * > itsDirtyConvScales
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
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
TempLattice< T > * itsDirty
A class for doing multi-dimensional cleaning.
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 ...
Int numberIterations() const
Quantum< Double > itsThreshold
Int iteration() const
return how many iterations we did do
A templated, abstract base class for array-like objects.
void stopPointMode(Int nStopPointMode)
Some algorithms require that the cycles be terminated when the image is dominated by point sources; i...
IPosition itsPositionPeakPsf
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.
Bool itsChoose
Let the user choose whether to stop.
T strengthOptimum() const
Method to return the strength optimum achieved at the last clean iteration The output of this method ...
Vector< Float > itsTotalFluxScale
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...
PtrBlock< TempLattice< Complex > * > itsScaleXfrs
bool Bool
Define the standard types used by Casacore.
Abstract base class to monitor progress in lattice operations.
Bool validatePsf(const Lattice< T > &psf)
Make sure that the peak of the Psf is within the image.
A drop-in replacement for Block<T*>.
void makeScale(Lattice< T > &scale, const Float &scaleSize)
Make an lattice of the specified scale.
static Bool findMaxAbsLattice(const Lattice< T > &lattice, T &maxAbs, IPosition &posMax)
Find the Peak of the Lattice.
void add(casacore::Int spectralWindow, casacore::Int firstChannel, casacore::Int nChannels, casacore::Int increment=1)
Int index(const Int scale, const Int otherscale)
Calculate index into PsfConvScales.
Bool setscales(const Int nscales, const Float scaleInc=1.0)
Set a number of scale sizes.
Float spheroidal(Float nu)
Make Spheroidal function for scale images.
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...
void speedup(const Float Ndouble)
speedup() will speed the clean iteration by raising the threshold.
Quantum< Double > itsFracThreshold
Bool findMaxAbsMaskLattice(const Lattice< T > &lattice, const Lattice< T > &mask, T &maxAbs, IPosition &posMax)
Find the Peak of the lattice, applying a mask.
void stopAtLargeScaleNegative()
During early iterations of a cycled MS Clean in mosaicing, it common to come across an ocsilatory pat...
void startingIteration(const Int starting=0)
what iteration number to start on
static void addTo(Lattice< T > &to, const Lattice< T > &add)
Helper function to optimize adding.
Bool queryStopPointMode() const
After completion of cycle, querry this to find out if we stopped because of stopPointMode.
~LatticeCleaner()
The destructor does nothing special.
PtrBlock< TempLattice< T > * > itsPsfConvScales
PtrBlock< TempLattice< T > * > itsScales
LatticeCleaner()
Create a cleaner : default constructor.
PtrBlock< TempLattice< T > * > itsScaleMasks
LatticeCleaner< T > & operator=(const LatticeCleaner< T > &other)
The assignment operator also uses reference semantics.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.