casa
5.7.0-16
|
A simple deconvolver that masks by memory of previous peaks. More...
#include <MatrixNACleaner.h>
Public Member Functions | |
MatrixNACleaner () | |
Create a cleaner : default constructor. More... | |
MatrixNACleaner (const casacore::Matrix< casacore::Float > &psf, const casacore::Matrix< casacore::Float > &dirty, const casacore::Int memtype=2, const casacore::Float numSigma=5.0) | |
Create a cleaner for a specific dirty image and PSF. More... | |
MatrixNACleaner (const MatrixNACleaner &other) | |
The copy constructor uses reference semantics. More... | |
MatrixNACleaner & | operator= (const MatrixNACleaner &other) |
The assignment operator also uses reference semantics. More... | |
~MatrixNACleaner () | |
The destructor does nothing special. More... | |
void | setDirty (const casacore::Matrix< casacore::Float > &dirty) |
Set the dirty image without calculating convolutions. More... | |
void | setPsf (const casacore::Matrix< casacore::Float > &psf) |
change the psf don't forget to redo the setscales or run makePsfScales, followed by makeDirtyScales More... | |
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 at every iteration) aThreshold - absolute threshold to stop iterations More... | |
casacore::Int | iteration () const |
return how many iterations we did do More... | |
casacore::Float | totalFlux () const |
Total flux accumulated so far. More... | |
casacore::Int | clean (casacore::Matrix< casacore::Float > &model) |
Clean an image. More... | |
void | setMask (casacore::Matrix< casacore::Float > &mask) |
Set the mask mask - input mask lattice. More... | |
void | setPixFlag (const casacore::Matrix< casacore::Bool > &bitpix) |
void | unsetMask () |
remove the mask; useful when keeping object and sending a new dirty image to clean one can set another mask then More... | |
void | getMask (casacore::Matrix< casacore::Float > &mask) |
casacore::Matrix< casacore::Float > | getResidual () |
Look at what WE think the residuals look like. More... | |
casacore::Float | threshold () const |
Method to return threshold. More... | |
casacore::Float | maxResidual () |
Protected Member Functions | |
casacore::Bool | validatePsf (const casacore::Matrix< casacore::Float > &psf) |
Helper function to optimize adding static void addTo(casacore::Matrix<casacore::Float>& to, const casacore::Matrix<casacore::Float> & add); More... | |
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. More... | |
Static Protected Member Functions | |
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. More... | |
Protected Attributes | |
casacore::Float | itsGain |
casacore::Int | itsMaxNiter |
casacore::Quantum < casacore::Double > | itsThreshold |
Private Member Functions | |
casacore::Float | amnesiac (const casacore::Float &val) |
casacore::Float | weak (const casacore::Float &v) |
casacore::Float | medium (const casacore::Float &v) |
casacore::Float | strong (const casacore::Float &v) |
Private Attributes | |
std::shared_ptr < casacore::Matrix < casacore::Float > > | itsMask |
std::shared_ptr < casacore::Matrix < casacore::Float > > | itsDirty |
std::shared_ptr < casacore::Matrix < casacore::Float > > | itsPsf |
std::shared_ptr < casacore::Matrix < casacore::Float > > | itsResidual |
std::shared_ptr < casacore::Matrix < casacore::Bool > > | itsBitPix |
casacore::Float | itsMaximumResidual |
casacore::Int | itsIteration |
casacore::Int | itsStartingIter |
casacore::Float | itsTotalFlux |
casacore::Int | itsSupport |
casacore::IPosition | psfShape_p |
casacore::IPosition | itsPositionPeakPsf |
casacore::Float | itsRms |
casacore::Int | typeOfMemory_p |
casacore::Float | numSigma_p |
std::function< casacore::Float(const casacore::Float &)> | f_p |
A simple deconvolver that masks by memory of previous peaks.
Evolution of a simple cleaner
A class for doing multi-dimensional cleaning
Public interface
The MatrixNACleaner Uses the matrix class and cleaner is for deconvolver by CLEAN NA stands for Non Amnesiac...i.e remember where past peaks were to search in these region preferentially...i.e no need to mask
This class will perform various types of Clean deconvolution on Lattices.
Definition at line 92 of file MatrixNACleaner.h.
casa::MatrixNACleaner::MatrixNACleaner | ( | ) |
Create a cleaner : default constructor.
casa::MatrixNACleaner::MatrixNACleaner | ( | const casacore::Matrix< casacore::Float > & | psf, |
const casacore::Matrix< casacore::Float > & | dirty, | ||
const casacore::Int | memtype = 2 , |
||
const casacore::Float | numSigma = 5.0 |
||
) |
Create a cleaner for a specific dirty image and PSF.
casa::MatrixNACleaner::MatrixNACleaner | ( | const MatrixNACleaner & | other | ) |
The copy constructor uses reference semantics.
casa::MatrixNACleaner::~MatrixNACleaner | ( | ) |
The destructor does nothing special.
|
private |
casacore::Int casa::MatrixNACleaner::clean | ( | casacore::Matrix< casacore::Float > & | model | ) |
Clean an image.
|
protected |
Find the Peak of the lattice, applying a mask.
void casa::MatrixNACleaner::getMask | ( | casacore::Matrix< casacore::Float > & | mask | ) |
|
inline |
Look at what WE think the residuals look like.
Definition at line 168 of file MatrixNACleaner.h.
References itsResidual.
|
inline |
return how many iterations we did do
Definition at line 138 of file MatrixNACleaner.h.
References itsIteration.
|
staticprotected |
Helper function to reduce the box sizes until the have the same size keeping the centers intact.
|
inline |
Definition at line 174 of file MatrixNACleaner.h.
References itsMaximumResidual.
|
private |
MatrixNACleaner& casa::MatrixNACleaner::operator= | ( | const MatrixNACleaner & | other | ) |
The assignment operator also uses reference semantics.
void casa::MatrixNACleaner::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 at every iteration) aThreshold - absolute threshold to stop iterations
void casa::MatrixNACleaner::setDirty | ( | const casacore::Matrix< casacore::Float > & | dirty | ) |
Set the dirty image without calculating convolutions.
can be done by calling makeDirtyScales or setscales if one want to redo the psfscales too.
void casa::MatrixNACleaner::setMask | ( | casacore::Matrix< casacore::Float > & | mask | ) |
Set the mask mask - input mask lattice.
void casa::MatrixNACleaner::setPixFlag | ( | const casacore::Matrix< casacore::Bool > & | bitpix | ) |
void casa::MatrixNACleaner::setPsf | ( | const casacore::Matrix< casacore::Float > & | psf | ) |
change the psf don't forget to redo the setscales or run makePsfScales, followed by makeDirtyScales
|
private |
casacore::Float casa::MatrixNACleaner::threshold | ( | ) | const |
Method to return threshold.
|
inline |
Total flux accumulated so far.
Definition at line 143 of file MatrixNACleaner.h.
References itsTotalFlux.
void casa::MatrixNACleaner::unsetMask | ( | ) |
remove the mask; useful when keeping object and sending a new dirty image to clean one can set another mask then
|
protected |
Helper function to optimize adding
static void addTo(casacore::Matrix<casacore::Float>& to, const casacore::Matrix<casacore::Float> & add);
Make sure that the peak of the Psf is within the image
|
private |
|
private |
Definition at line 227 of file MatrixNACleaner.h.
|
private |
Definition at line 210 of file MatrixNACleaner.h.
|
private |
Definition at line 207 of file MatrixNACleaner.h.
|
protected |
Definition at line 193 of file MatrixNACleaner.h.
|
private |
Definition at line 218 of file MatrixNACleaner.h.
Referenced by iteration().
|
private |
Definition at line 206 of file MatrixNACleaner.h.
|
private |
Definition at line 217 of file MatrixNACleaner.h.
Referenced by maxResidual().
|
protected |
Definition at line 194 of file MatrixNACleaner.h.
|
private |
Definition at line 223 of file MatrixNACleaner.h.
|
private |
Definition at line 208 of file MatrixNACleaner.h.
|
private |
Definition at line 209 of file MatrixNACleaner.h.
Referenced by getResidual().
|
private |
Definition at line 224 of file MatrixNACleaner.h.
|
private |
Definition at line 219 of file MatrixNACleaner.h.
|
private |
Definition at line 221 of file MatrixNACleaner.h.
|
protected |
Definition at line 195 of file MatrixNACleaner.h.
|
private |
Definition at line 220 of file MatrixNACleaner.h.
Referenced by totalFlux().
|
private |
Definition at line 226 of file MatrixNACleaner.h.
|
private |
Definition at line 222 of file MatrixNACleaner.h.
|
private |
Definition at line 225 of file MatrixNACleaner.h.