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