29 #ifndef SYNTHESIS_CLARKCLEANLATMODEL_H
30 #define SYNTHESIS_CLARKCLEANLATMODEL_H
42 template <
class T>
class Matrix;
43 template <
class T>
class Vector;
48 class ClarkCleanProgress;
49 class LatConvEquation;
150 public LinearModel< casacore::Lattice<casacore::Float> >,
314 const CCList & activePixels);
casacore::Lattice< casacore::Float > * itsModelPtr
casacore::Bool itsWarnFlag
virtual const casacore::Lattice< casacore::Float > & getModel() const
Return the current model.
A Vector of integers, for indexing into Array<T> objects.
casacore::Int getbig(casacore::Float const *pixValPtr, casacore::Int const *pixPosPtr, const casacore::Int nPix, const casacore::Float fluxLimit, const casacore::Float *const residualPtr, const casacore::Float *const maskPtr, const casacore::uInt npol, const casacore::Int nx, const casacore::Int ny)
casacore::Float itsMaxRes
virtual casacore::uInt getInitialNumberIterations()
casacore::uInt itsInitialNumberIterations
std::vector< double > Vector
casacore::uInt itsHistBins
virtual casacore::Bool getChoose()
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
virtual void setSpeedup(const casacore::Float speedup)
An exponent on the F(m,n) factor (see Clark[1980]) which influences how quickly active pixels are tre...
virtual void setMaxExtPsf(const casacore::Float maxExtPsf)
Set the maximum exterior psf value.
Implements the convolution equation.
casacore::Float itsSpeedup
casacore::IPosition itsPsfPatchSize
casacore::Bool singleSolve(LatConvEquation &eqn, casacore::Lattice< casacore::Float > &residual)
casacore::Lattice< casacore::Float > * itsResidualPtr
virtual void setCycleFactor(const casacore::Float factor)
Set the cycle factor....the larger this is the shallower is the minor cycle.
A Class for performing the Clark Clean Algorithm on Arrays.
void maxVect(casacore::Block< casacore::Float > &maxVal, casacore::Float &absVal, casacore::Int &offset, const CCList &activePixels)
const casacore::Lattice< casacore::Float > * itsSoftMaskPtr
virtual void setChoose(const casacore::Bool askForChoice)
The user can be asked whether to stop after every minor cycle.
ostream-like interface to creating log messages.
casacore::Float itsMaxExtPsf
virtual casacore::uInt getMaxNumberMinorIterations()
virtual casacore::IPosition getPsfPatchSize()
virtual ~ClarkCleanLatModel()
Destroy!
ClarkCleanLatModel()
The default constructor does nothing more than initialise a zero length array to hold the deconvolved...
virtual void setInitialNumberIterations(const casacore::uInt initialNumberIterations)
Set and get the initial number of iterations.
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
casacore::Float absMaxBeyondDist(const casacore::IPosition &maxDist, const casacore::IPosition ¢re, const casacore::Lattice< casacore::Float > &psf)
virtual const casacore::Lattice< casacore::Float > & getResidual() const
virtual void setProgress(ClarkCleanProgress &ccp)
Set/get the progress display.
casacore::Float biggestResiduals(casacore::Float &maxRes, const casacore::uInt maxNumPix, const casacore::Float fluxLimit, const casacore::Lattice< casacore::Float > &residual)
Determine the flux limit if we only select the maxNumPix biggest residuals.
casacore::Bool itsJustStarting
casacore::Int getNumberIterations()
virtual void setHistLength(const casacore::uInt histBins)
Set the size of the histogram used to determine how many pixels are "active" in a minor iteration...
casacore::Float itsCycleFactor
virtual void setMaxNumberMajorCycles(const casacore::uInt maxNumMajorCycles)
Set the maximum number of major cycles to perform.
void cacheActivePixels(CCList &activePixels, const casacore::Lattice< casacore::Float > &residual, casacore::Float fluxLimit)
casacore::Float modelFlux()
The total flux density in the model.
Abstract base class to monitor progress in lattice operations.
casacore::Float getPsfPatch(casacore::Matrix< casacore::Float > &psfPatch, LatConvEquation &eqn)
Work out the size of the Psf patch to use.
bool Bool
Define the standard types used by Casacore.
casacore::Float maxResidual(const casacore::Lattice< casacore::Float > &residual)
The maximum residual is the absolute maximum.
void doMinorIterations(CCList &activePixels, casacore::Matrix< casacore::Float > &psfPatch, casacore::Float fluxLimit, casacore::uInt &numberIterations, casacore::Float Fmn, const casacore::uInt totalIterations, casacore::Float &totalFlux)
Do all the minor iterations for one major cycle.
void absHistogram(casacore::Vector< casacore::Int > &hist, casacore::Float &minVal, casacore::Float &maxVal, const casacore::Lattice< casacore::Float > &data)
make histogram of absolute values in array
virtual casacore::Float getSpeedup()
casacore::uInt itsMaxNumberMinorIterations
casacore::Float getMaxResidual()
virtual casacore::uInt getHistLength()
virtual ClarkCleanProgress & getProgress()
virtual void setModel(const casacore::Lattice< casacore::Float > &model)
Set the current model.
casacore::Int numberIterations()
void updateModel(CCList &cleanComponents)
casacore::uInt itsMaxNumPix
void setResidual(casacore::Lattice< casacore::Float > &residual)
casacore::Int itsMaxNumberMajorCycles
virtual void setMaxNumberMinorIterations(const casacore::uInt maxNumMinorIterations)
Set the maximum number of minor iterations to perform for each major cycle.
casacore::Bool itsLocalResTL
virtual casacore::uInt getMaxNumberMajorCycles()
Base class for Iteration.
virtual casacore::uInt getMaxNumPix()
virtual void setMaxNumPix(const casacore::uInt maxNumPix)
Set the maximum number of active pixels to use in the minor iterations.
virtual void setPsfPatchSize(const casacore::IPosition &psfPatchSize)
These remaining functions set various "knobs" that the user can tweak and are specific to the Clark c...
virtual casacore::Float getMaxExtPsf()
casacore::Bool solve(LatConvEquation &eqn)
Using a Clark clean deconvolution proceedure solve for an improved estimate of the deconvolved object...
void subtractComponent(CCList &activePixels, const casacore::Block< casacore::Float > &maxVal, const casacore::Block< casacore::Int > &maxPos, const casacore::Matrix< casacore::Float > &psf)
ClarkCleanProgress * itsProgressPtr
void setMask(const casacore::Lattice< casacore::Float > &mask)
const casacore::Lattice< casacore::Float > & getMask() const
Provides a model for use in model fitting applications.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.