28 #ifndef SYNTHESIS_INCCEMEMMODEL_H
29 #define SYNTHESIS_INCCEMEMMODEL_H
47 class LatConvEquation;
casacore::Lattice< casacore::Float > * itsPrior_ptr
virtual casacore::Bool testConvergence()=0
each entropy type can have its distinct convergence criteria
IncCEMemModel()
protected generic constrcutor: DON'T USE IT!
virtual void entropyType(casacore::String &)=0
report the entropy type for a logging message
casacore::Bool itsUseFluxConstraint
constrain flux or not?
casacore::Float getAlpha() const
set and get alpha, beta, and Q
casacore::Float getThreshold()
casacore::Float itsMaxNormGrad
void setPrior(casacore::Lattice< casacore::Float > &prior)
GradientType
Enumerate the different Gradient subscript types.
void setMask(casacore::Lattice< casacore::Float > &mask)
performs MEM algorithm incrementally
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
void calculateStep()
Helper functions for oneIteration:
casacore::Lattice< casacore::Float > * itsStep_ptr
Our OWN internal temp images; delete these upon destruction.
casacore::Float getGain()
virtual ~IncCEMemModel()
destructor
casacore::Double itsGradDotStep1
casacore::Bool itsInitializeModel
Controlling parameters.
Class to monitor progress in MEM deconvolution.
casacore::Bool applyMask(casacore::Lattice< casacore::Float > &lat)
apply mask to a lattice; returns true if mask is available, false if not
casacore::Bool checkImages(const casacore::Lattice< casacore::Float > *one, const casacore::Lattice< casacore::Float > *other)
check that the lattices and the underlying tile sizes are consistent
void entropyType(casacore::String &str)
casacore::Bool solve(ResidualEquation< casacore::Lattice< casacore::Float > > &eqn)
This needs to be "ResidualEquation", using LatConvEquation as polymorphism is broken.
casacore::Bool ok()
check that all is well in Denmark: ensure all images are the same size, ensure we have an entropy...
virtual casacore::Float formEntropy()=0
calculate the entropy for the whole image
casacore::Float itsEntropy
numerical value of entropy
Interface class containing functions returning "Domain" type.
casacore::Float itsQ
N points per beam.
casacore::uInt itsFirstIteration
void setTolerance(casacore::Float x)
casacore::Lattice< casacore::Float > * itsMask_ptr
void setThreshold(const casacore::Float x)
The convergence can also be in terms of the maximum residual (ie, for use in stopping in a major cycl...
casacore::Float itsDefaultLevel
CEMemProgress * itsProgressPtr
void setBeta(casacore::Float beta)
ostream-like interface to creating log messages.
void setAlpha(casacore::Float alpha)
casacore::Float itsGain
gain for adding step image
casacore::Float itsModelFlux
casacore::Int numberIterations()
return the number of iterations completed
casacore::Float itsLength
casacore::Double itsGradDotStep0
void setGain(casacore::Float x)
void setEntropy(IncEntropy &myEntropy)
Set and get various state images and classes.
ResidualEquation< casacore::Lattice< casacore::Float > > * itsResidualEquation_ptr
form of the Residual method
casacore::Float itsAFit
sqrt(chi^2/ Npixels)
casacore::Float itsNormGrad
casacore::Float itsDeltaFlux
casacore::Float itsCurrentPeakResidual
casacore::Float itsFit
sqrt(chi^2/target_chi^2)
void setMaxNormGrad(casacore::Float x)
casacore::Bool testConvergence()
virtual void formGDGStep(casacore::Matrix< double > &)=0
calculate the Gradient dot Gradient matrix, calculate Step
void oneIteration()
Perform One Iteration.
void formEntropy()
Helper functions that interface with Entropy routines Access to the entropy should be through this in...
virtual casacore::Double formGDS()=0
calculate Gradient dot Step
Emptiness measure for incremental MEM.
casacore::Float getTolerance()
Set various controlling parameters (The most popular controlling parameters are set in the constructo...
virtual Lattice< T > * clone() const =0
Make a copy of the derived object (reference semantics).
casacore::Bool itsDoImagePlane
is this an image plane problem (like Single Dish or Optical?)
casacore::Float itsTargetFlux
void letEntropyDie()
Set entropy pointer to zero: called by Entropy's destructor.
virtual void formGDG(casacore::Matrix< double > &)=0
calculate the Gradient dot Gradient matrix
virtual CEMemProgress & getProgress()
casacore::Float formFlux()
Calculate the flux, itsModMin, and itsModMax.
casacore::Float itsModelMax
maximum pixel value in model
casacore::Lattice< casacore::Float > & getModel() const
set or get the Model image
casacore::Bool initStuff()
initialize itsStep and itsResidual and other stuff
casacore::Float getMaxNormGrad()
casacore::Float getBeta() const
casacore::Lattice< casacore::Float > * itsDeltaModel_ptr
casacore::Float itsThresholdSpeedup
casacore::Float itsNumberPixels
bool Bool
Define the standard types used by Casacore.
casacore::uInt itsNumberIterations
Thermodynamic or Information entropy for incremental MEM.
void initializeAlphaBeta()
initialize Alpha-Beta (called by changeAlphaBeta)
IncEntropy * itsEntropy_ptr
---------—Private Member casacore::Data------------------— functional form of the entropy ...
casacore::Float itsAlpha
State variables.
void setThresholdSpeedup(const casacore::Float iter)
Thresh doubles in iter iterations.
void setModel(const casacore::Lattice< casacore::Float > &model)
Set the current model.
casacore::Float itsTolerance
tolerance for convergence
void changeAlphaBeta()
controls how to change Alpha and Beta
casacore::Bool itsChoose
Accesories.
void getEntropy(IncEntropy &myEntropy)
virtual casacore::Float relaxMin()=0
are there any constraints on how the Image minimum gets relaxed?
casacore::Lattice< casacore::Float > & getMask() const
set or get the Mask image
casacore::Lattice< casacore::Float > * itsModel_ptr
Images:
casacore::Lattice< casacore::Float > * itsResidual_ptr
casacore::Float itsModelMin
minimum pixel value n model
Base class for incremental entropies used by incremental MEM algorithm.
virtual void setProgress(CEMemProgress &ccp)
Set/get the progress display.
casacore::Float itsFlux
note that itsModelFlux + itsDeltaFlux = itsFlux
void state()
solve the convolution equation returns true if converged
String: the storage and methods of handling collections of characters.
casacore::Bool checkImage(const casacore::Lattice< casacore::Float > *)
Generic utility functions.
casacore::uInt itsIteration
void takeStep(casacore::Float wt1, casacore::Float wt2)
take one step: clipped addition of wt1*itsModel + wt2*itsStep
casacore::Float itsRequiredModelMin
Model is constrained to be >= itsNewMin.
casacore::Matrix< casacore::Double > itsGDG
matrix of gradient dot products
void setInitialNumberIterations(casacore::Int x)
casacore::Int getInitialNumberIterations()
casacore::Float itsTargetChisq
casacore::Lattice< casacore::Float > & getPrior() const
set or get the Prior image
casacore::Bool testConvergenceThreshold()
Determine if the peak residual is less than the getThreshold()
void setQ(casacore::Float x)
void updateAlphaBeta()
update Alpha-Beta (called by changeAlphaBeta)
Provides a model for use in model fitting applications.
casacore::Float itsThreshold0