29 #ifndef SYNTHESIS_MATRIXNACLEANER_H
30 #define SYNTHESIS_MATRIXNACLEANER_H
41 template <
class T>
class Matrix;
206 std::shared_ptr<casacore::Matrix<casacore::Float> >
itsMask;
207 std::shared_ptr<casacore::Matrix<casacore::Float> >
itsDirty;
208 std::shared_ptr<casacore::Matrix<casacore::Float> >
itsPsf;
210 std::shared_ptr<casacore::Matrix<casacore::Bool> >
itsBitPix;
227 std::function<casacore::Float(const casacore::Float&)>
f_p;
A Vector of integers, for indexing into Array<T> objects.
static void makeBoxesSameSize(casacore::IPosition &blc1, casacore::IPosition &trc1, casacore::IPosition &blc2, casacore::IPosition &trc2)
Helper function to reduce the box sizes until the have the same size keeping the centers intact...
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
casacore::Int iteration() const
return how many iterations we did do
casacore::Float medium(const casacore::Float &v)
std::shared_ptr< casacore::Matrix< casacore::Float > > itsPsf
casacore::Float itsMaximumResidual
void setDirty(const casacore::Matrix< casacore::Float > &dirty)
Set the dirty image without calculating convolutions.
std::function< casacore::Float(const casacore::Float &)> f_p
casacore::Int itsStartingIter
MatrixNACleaner()
Create a cleaner : default constructor.
casacore::Int typeOfMemory_p
casacore::Quantum< casacore::Double > itsThreshold
casacore::Float weak(const casacore::Float &v)
casacore::Bool findMaxAbsMask(const casacore::Matrix< casacore::Float > &lattice, casacore::Matrix< casacore::Float > &mask, casacore::Float &maxAbs, casacore::IPosition &posMax, const casacore::Int support=5)
Find the Peak of the lattice, applying a mask.
std::shared_ptr< casacore::Matrix< casacore::Float > > itsMask
casacore::Int itsIteration
std::shared_ptr< casacore::Matrix< casacore::Float > > itsResidual
void setPsf(const casacore::Matrix< casacore::Float > &psf)
change the psf don't forget to redo the setscales or run makePsfScales, followed by makeDirtyScales ...
void setMask(casacore::Matrix< casacore::Float > &mask)
Set the mask mask - input mask lattice.
casacore::Float itsTotalFlux
casacore::Bool validatePsf(const casacore::Matrix< casacore::Float > &psf)
Helper function to optimize adding static void addTo(casacore::Matrix<casacore::Float>& to...
~MatrixNACleaner()
The destructor does nothing special.
bool Bool
Define the standard types used by Casacore.
casacore::Float numSigma_p
std::shared_ptr< casacore::Matrix< casacore::Bool > > itsBitPix
void unsetMask()
remove the mask; useful when keeping object and sending a new dirty image to clean one can set anothe...
casacore::IPosition itsPositionPeakPsf
A simple deconvolver that masks by memory of previous peaks.
casacore::Float threshold() const
Method to return threshold.
void getMask(casacore::Matrix< casacore::Float > &mask)
casacore::IPosition psfShape_p
void setPixFlag(const casacore::Matrix< casacore::Bool > &bitpix)
casacore::Matrix< casacore::Float > getResidual()
Look at what WE think the residuals look like.
casacore::Int itsMaxNiter
void setcontrol(const casacore::Int niter, const casacore::Float gain, const casacore::Quantity &aThresho, const casacore::Int masksupport=3, const casacore::Int memType=2, const casacore::Float numsigma=5.0)
niter - number of iterations gain - loop gain used in cleaning (a fraction of the maximum subtracted ...
casacore::Float amnesiac(const casacore::Float &val)
casacore::Float strong(const casacore::Float &v)
casacore::Float totalFlux() const
Total flux accumulated so far.
casacore::Int clean(casacore::Matrix< casacore::Float > &model)
Clean an image.
casacore::Float maxResidual()
std::shared_ptr< casacore::Matrix< casacore::Float > > itsDirty
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
MatrixNACleaner & operator=(const MatrixNACleaner &other)
The assignment operator also uses reference semantics.