29 #ifndef SYNTHESIS_CLARKCLEANMODEL_H
30 #define SYNTHESIS_CLARKCLEANMODEL_H
44 class ClarkCleanProgress;
A Vector of integers, for indexing into Array<T> objects.
casacore::uInt theMaxNumberMinorIterations
void absHistogram(casacore::Vector< casacore::Int > &hist, casacore::Float &minVal, casacore::Float &maxVal, const casacore::Array< casacore::Float > &data)
make histogram of absolute values in array
casacore::Float getMaxResidual()
casacore::Float theMaxExtPsf
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
void subtractComponent(casacore::Matrix< casacore::Float > &pixVal, const casacore::Matrix< casacore::Int > &pixPos, const casacore::Int numPix, const casacore::Vector< casacore::Float > &maxVal, const casacore::Vector< casacore::Int > &maxPos, const casacore::Matrix< casacore::Float > &psf)
void setModel(const casacore::Array< casacore::Float > &model)
Set the current model.
virtual void setMaxNumberMajorCycles(const casacore::uInt maxNumMajorCycles)
Set the maximum number of major cycles to perform.
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
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...
A Class for performing the Clark Clean Algorithm on Arrays.
casacore::Float absMaxBeyondDist(const casacore::IPosition &maxDist, const casacore::IPosition ¢re, const casacore::Array< casacore::Float > &array)
virtual void setPsfPatchSize(const casacore::IPosition &psfPatchSize)
These functions set various "knobs" that the user can tweak and are specific to the Clark clean algor...
virtual const casacore::Array< casacore::Float > & getModel() const
Return the current model.
casacore::uInt theMaxNumPix
ostream-like interface to creating log messages.
virtual void setMaxExtPsf(const casacore::Float maxExtPsf)
Set the maximum exterior psf value.
virtual void setChoose(const casacore::Bool askForChoice)
The user can be asked whether to stop after every minor cycle.
Implements the convolution equation.
casacore::Bool solve(ConvolutionEquation &eqn)
Using a Clark clean deconvolution proceedure solve for an improved estimate of the deconvolved object...
casacore::uInt theHistBins
virtual casacore::uInt getHistLength()
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
virtual casacore::Bool getChoose()
casacore::Float theSpeedup
casacore::Float theCycleSpeedup
casacore::Int cacheActivePixels(casacore::Matrix< casacore::Float > &pixVal, casacore::Matrix< casacore::Int > &pixPos, const casacore::Array< casacore::Float > &data, const casacore::Float fluxLimit)
Find all the pixels in the residual that are greater than fluxlimit, and store the values in the pixe...
virtual casacore::uInt getMaxNumberMajorCycles()
virtual casacore::uInt getMaxNumberMinorIterations()
virtual casacore::IPosition getPsfPatchSize()
casacore::Float biggestResiduals(casacore::Float &maxRes, const casacore::uInt maxNumPix, const casacore::Float fluxLimit, const casacore::Array< casacore::Float > &residual)
Determine the flux limit if we only select the maxNumPix biggest residuals.
ClarkCleanModel()
The default constructor does nothing more than initialise a zero length array to hold the deconvolved...
casacore::Float maxResidual(const casacore::Array< casacore::Float > &residual)
The maximum residual is the absolute maximum.
models with an internal & external representation as an array
casacore::uInt theInitialNumberIterations
void getMask(casacore::Array< casacore::Float > &mask) const
virtual casacore::uInt getInitialNumberIterations()
casacore::Bool itsJustStarting
Abstract base class to monitor progress in lattice operations.
virtual ClarkCleanProgress & getProgress()
bool Bool
Define the standard types used by Casacore.
ClarkCleanProgress * itsProgressPtr
virtual void setProgress(ClarkCleanProgress &ccp)
Set/get the progress display.
casacore::Float getPsfPatch(casacore::Array< casacore::Float > &psfPatch, ConvolutionEquation &eqn)
Work out the size of the Psf patch to use.
void doMinorIterations(casacore::Array< casacore::Float > &model, casacore::Matrix< casacore::Float > &pixelValue, const casacore::Matrix< casacore::Int > &pixelPos, const casacore::Int numPix, 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.
virtual void setMaxNumPix(const casacore::uInt maxNumPix)
Set the maximum number of active pixels to use in the minor iterations.
casacore::Array< casacore::Float > theMask
void setMask(const casacore::Array< casacore::Float > &mask)
casacore::Int numberIterations()
casacore::IPosition thePsfPatchSize
virtual casacore::uInt getMaxNumPix()
virtual casacore::Float getCycleSpeedup()
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 casacore::Float getSpeedup()
Base class for Iteration.
casacore::Int theMaxNumberMajorCycles
casacore::Int theIterCounter
There are too many iterations counters.
virtual casacore::Float getMaxExtPsf()
casacore::Bool singleSolve(ConvolutionEquation &eqn, casacore::Array< casacore::Float > &residual)
virtual casacore::Float threshold()
We are overwriting Iterate's threshold() method to put out speedup in it.
void maxVect(casacore::Vector< casacore::Float > &maxVal, casacore::Float &absVal, casacore::Int &offset, const casacore::Matrix< casacore::Float > &pixVal, const casacore::Int numPix)
casacore::Float itsMaxRes
virtual void setCycleSpeedup(const casacore::Float speedup)
The structure of various AIPS++ algorithms creates major cycles around the Clark Clean (or other deco...
virtual void setMaxNumberMinorIterations(const casacore::uInt maxNumMinorIterations)
Set the maximum number of minor iterations to perform for each major cycle.
virtual void setInitialNumberIterations(const casacore::uInt initialNumberIterations)
Set and get the initial number of iterations.