casa
5.7.0-16
|
#include <MultiTermMatrixCleaner.h>
Public Member Functions | |
MultiTermMatrixCleaner () | |
Create a cleaner. More... | |
~MultiTermMatrixCleaner () | |
The copy constructor uses reference semantics MultiTermMatrixCleaner(const MultiTermMatrixCleaner & other);. More... | |
casacore::Bool | setntaylorterms (const int &nterms) |
casacore::Input : number of Taylor terms Reshapes PtrBlocks to hold the correct number of PSFs and Residual images More... | |
casacore::Bool | setscales (const casacore::Vector< casacore::Float > &scales) |
casacore::Input : scales More... | |
casacore::Bool | initialise (casacore::Int nx, casacore::Int ny) |
Initialize all the memory being used. More... | |
casacore::Int | computeHessianPeak () |
Calculate Hessian elements and check for invertibility Does not have to be called externally, but can be. More... | |
casacore::Bool | setpsf (int order, casacore::Matrix< casacore::Float > &psf) |
casacore::Input : psfs and dirty images More... | |
casacore::Bool | setresidual (int order, casacore::Matrix< casacore::Float > &dirty) |
casacore::Input : psfs and dirty images More... | |
casacore::Bool | setmodel (int order, casacore::Matrix< casacore::Float > &model) |
casacore::Input : model images More... | |
casacore::Bool | setmask (casacore::Matrix< casacore::Float > &mask) |
casacore::Input : mask More... | |
casacore::Int | mtclean (casacore::Int maxniter, casacore::Float stopfraction, casacore::Float inputgain, casacore::Float userthreshold) |
Run the minor cycle. More... | |
casacore::Bool | getmodel (int order, casacore::Matrix< casacore::Float > &model) |
Output : Model images. More... | |
casacore::Bool | getresidual (int order, casacore::Matrix< casacore::Float > &residual) |
Output : psfs and dirty images. More... | |
casacore::Bool | computeprincipalsolution () |
Compute principal solution - in-place on the residual images in vecDirty. More... | |
casacore::Bool | getinvhessian (casacore::Matrix< casacore::Double > &invhessian) |
Output : Hessian matrix. More... | |
casacore::Float | getpeakresidual () |
Output : Peak residual computed from matR_p (residual convolved with PSF). More... | |
Public Member Functions inherited from casa::MatrixCleaner | |
MatrixCleaner () | |
Create a cleaner : default constructor. More... | |
MatrixCleaner (const casacore::Matrix< casacore::Float > &psf, const casacore::Matrix< casacore::Float > &dirty) | |
Create a cleaner for a specific dirty image and PSF. More... | |
MatrixCleaner (const MatrixCleaner &other) | |
The copy constructor uses reference semantics. More... | |
MatrixCleaner & | operator= (const MatrixCleaner &other) |
The assignment operator also uses reference semantics. More... | |
~MatrixCleaner () | |
The destructor does nothing special. More... | |
void | defineScales (const casacore::Vector< casacore::Float > &scales) |
just define the scales...nothing else is done the user will need to call setPsf+makePsfScales+setDirty+makeDirtyScales to be in a good state to clean. More... | |
void | setDirty (const casacore::Matrix< casacore::Float > &dirty) |
Set the dirty image without calculating convolutions. More... | |
void | makeDirtyScales () |
Calculate the convolutions for the dirt Obviously the. More... | |
void | update (const casacore::Matrix< casacore::Float > &dirty) |
Update the dirty image only (equiv of setDirty + makeDirtyScales) 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 | makePsfScales () |
calculate the convolutions of the psf More... | |
casacore::Bool | setscales (const casacore::Int nscales, const casacore::Float scaleInc=1.0) |
Set a number of scale sizes. More... | |
casacore::Bool | setscales (const casacore::Vector< casacore::Float > &scales) |
Set a specific set of scales. More... | |
casacore::Bool | setcontrol (casacore::CleanEnums::CleanType cleanType, const casacore::Int niter, const casacore::Float gain, const casacore::Quantity &aThreshold, const casacore::Quantity &fThreshold) |
Set up control parameters cleanType - type of the cleaning algorithm to use (HOGBOM, MULTISCALE) 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 fThreshold - fractional threshold (i.e. More... | |
casacore::Bool | setcontrol (casacore::CleanEnums::CleanType cleanType, const casacore::Int niter, const casacore::Float gain, const casacore::Quantity &threshold) |
This version of the method disables stopping on fractional threshold. More... | |
casacore::Int | iteration () const |
return how many iterations we did do More... | |
casacore::Int | numberIterations () const |
void | startingIteration (const casacore::Int starting=0) |
what iteration number to start on More... | |
casacore::Float | totalFlux () const |
Total flux accumulated so far. More... | |
casacore::Int | clean (casacore::Matrix< casacore::Float > &model, casacore::Bool doPlotProgress=false) |
Clean an image. More... | |
void | setMask (casacore::Matrix< casacore::Float > &mask, const casacore::Float &maskThreshold=0.9) |
Set the mask mask - input mask lattice maskThreshold - if positive, the value is treated as a threshold value to determine whether a pixel is good (mask value is greater than the threshold) or has to be masked (mask value is below the threshold). More... | |
casacore::Bool | makeScaleMasks () |
Call the function below if the psf is changed..no need to setMask again. More... | |
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 | ignoreCenterBox (casacore::Bool huh) |
Tell the algorithm to NOT clean just the inner quarter (This is useful when multiscale clean is being used inside a major cycle for MF or WF algorithms) if true, the full image deconvolution will be attempted. More... | |
void | setSmallScaleBias (const casacore::Float x=0.5) |
Consider the case of a point source: the flux on all scales is the same, and the first scale will be chosen. More... | |
void | stopAtLargeScaleNegative () |
During early iterations of a cycled casacore::MS Clean in mosaicing, it common to come across an ocsilatory pattern going between positive and negative in the large scale. More... | |
void | stopPointMode (casacore::Int nStopPointMode) |
Some algorithms require that the cycles be terminated when the image is dominated by point sources; if we get nStopPointMode of the smallest scale components in a row, we terminate the cycles. More... | |
casacore::Bool | queryStopPointMode () const |
After completion of cycle, querry this to find out if we stopped because of stopPointMode. More... | |
void | speedup (const casacore::Float Ndouble) |
speedup() will speed the clean iteration by raising the threshold. More... | |
casacore::Matrix< casacore::Float > | residual () |
Look at what WE think the residuals look like Assumes the first scale is zero-sized. More... | |
casacore::Matrix< casacore::Float > | residual (const casacore::Matrix< casacore::Float > &model) |
slightly better approximation of the residual: it convolves the given model with the psf and remove it from the dirty image put in setdirty More... | |
casacore::Float | threshold () const |
Method to return threshold, including any speedup factors. More... | |
casacore::Float | strengthOptimum () const |
Method to return the strength optimum achieved at the last clean iteration The output of this method makes sense only if it is called after clean. More... | |
Definition at line 36 of file MultiTermMatrixCleaner.h.
casa::MultiTermMatrixCleaner::MultiTermMatrixCleaner | ( | ) |
Create a cleaner.
casa::MultiTermMatrixCleaner::~MultiTermMatrixCleaner | ( | ) |
The copy constructor uses reference semantics MultiTermMatrixCleaner(const MultiTermMatrixCleaner & other);.
The assignment operator also uses reference semantics MultiTermMatrixCleaner & operator=(const MultiTermMatrixCleaner & other);
The destructor resizes arrays to empty before destruction.
|
private |
|
private |
|
private |
|
private |
|
private |
casacore::Int casa::MultiTermMatrixCleaner::computeHessianPeak | ( | ) |
Calculate Hessian elements and check for invertibility Does not have to be called externally, but can be.
Either way, it executes only once.
casacore::Bool casa::MultiTermMatrixCleaner::computeprincipalsolution | ( | ) |
Compute principal solution - in-place on the residual images in vecDirty.
|
private |
casacore::Bool casa::MultiTermMatrixCleaner::getinvhessian | ( | casacore::Matrix< casacore::Double > & | invhessian | ) |
Output : Hessian matrix.
casacore::Bool casa::MultiTermMatrixCleaner::getmodel | ( | int | order, |
casacore::Matrix< casacore::Float > & | model | ||
) |
Output : Model images.
|
inline |
Output : Peak residual computed from matR_p (residual convolved with PSF).
Definition at line 93 of file MultiTermMatrixCleaner.h.
References rmaxval_p.
casacore::Bool casa::MultiTermMatrixCleaner::getresidual | ( | int | order, |
casacore::Matrix< casacore::Float > & | residual | ||
) |
Output : psfs and dirty images.
|
private |
|
private |
casacore::Bool casa::MultiTermMatrixCleaner::initialise | ( | casacore::Int | nx, |
casacore::Int | ny | ||
) |
Initialize all the memory being used.
casacore::Int casa::MultiTermMatrixCleaner::mtclean | ( | casacore::Int | maxniter, |
casacore::Float | stopfraction, | ||
casacore::Float | inputgain, | ||
casacore::Float | userthreshold | ||
) |
Run the minor cycle.
casacore::Bool casa::MultiTermMatrixCleaner::setmask | ( | casacore::Matrix< casacore::Float > & | mask | ) |
casacore::Input : mask
casacore::Bool casa::MultiTermMatrixCleaner::setmodel | ( | int | order, |
casacore::Matrix< casacore::Float > & | model | ||
) |
casacore::Input : model images
casacore::Bool casa::MultiTermMatrixCleaner::setntaylorterms | ( | const int & | nterms | ) |
casacore::Input : number of Taylor terms Reshapes PtrBlocks to hold the correct number of PSFs and Residual images
casacore::Bool casa::MultiTermMatrixCleaner::setpsf | ( | int | order, |
casacore::Matrix< casacore::Float > & | psf | ||
) |
casacore::Input : psfs and dirty images
casacore::Bool casa::MultiTermMatrixCleaner::setresidual | ( | int | order, |
casacore::Matrix< casacore::Float > & | dirty | ||
) |
casacore::Input : psfs and dirty images
casacore::Bool casa::MultiTermMatrixCleaner::setscales | ( | const casacore::Vector< casacore::Float > & | scales | ) |
casacore::Input : scales
|
private |
|
private |
Setup per major cycle.
|
private |
Solver functions : minor-cycle iterations.
Need to be efficient.
|
private |
|
private |
|
private |
Initial setup functions.
|
private |
Helper functions.
|
private |
Definition at line 217 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 139 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 139 of file MultiTermMatrixCleaner.h.
|
private |
casacore::Block <casacore::Matrix<casacore::Float> > vecScaleModel_p;
A_{smn} = B_{sm} * B{sn} [nx,ny,ntaylor,ntaylor,nscales,nscales] A_{s1s2mn} = B_{s1m} * B{s2n} [nx,ny,ntaylor,ntaylor,nscales,nscales]
Definition at line 175 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 155 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 152 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 150 of file MultiTermMatrixCleaner.h.
|
private |
casacore::Int nx,ny;
Definition at line 150 of file MultiTermMatrixCleaner.h.
|
private |
FFTserver.
Definition at line 192 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 148 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 127 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 125 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 131 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 189 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 128 of file MultiTermMatrixCleaner.h.
|
private |
Solve [A][Coeffs] = [I_D * B] Shape of A : [ntaylor,ntaylor].
Definition at line 188 of file MultiTermMatrixCleaner.h.
|
private |
a_{sk} = Solution vectors.
[nx,ny,ntaylor,nscales]
Definition at line 181 of file MultiTermMatrixCleaner.h.
|
private |
R_{sk} = I_D * B_{sk} [nx,ny,ntaylor,nscales].
Definition at line 178 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 129 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 126 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 146 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 145 of file MultiTermMatrixCleaner.h.
|
private |
casacore::Memory to be allocated per Matrix
Definition at line 184 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 134 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 121 of file MultiTermMatrixCleaner.h.
|
private |
using MatrixCleaner::makeScaleMasks;
Definition at line 119 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 122 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 123 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 97 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 133 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 120 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 138 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 137 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 135 of file MultiTermMatrixCleaner.h.
Referenced by getpeakresidual().
|
private |
Definition at line 142 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 141 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 130 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 124 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 143 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 144 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 139 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 139 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 132 of file MultiTermMatrixCleaner.h.
|
private |
I_D : Residual/Dirty Images [nx,ny,ntaylor].
Definition at line 167 of file MultiTermMatrixCleaner.h.
|
private |
I_M : Model Images [nx,ny,ntaylor].
Definition at line 170 of file MultiTermMatrixCleaner.h.
|
private |
B_k [nx,ny,ntaylor] casacore::Block<casacore::Matrix<casacore::Float> > vecPsf_p;.
Definition at line 164 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 153 of file MultiTermMatrixCleaner.h.
|
private |
h(s) [nx,ny,nscales]
Definition at line 159 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 160 of file MultiTermMatrixCleaner.h.
|
private |
Definition at line 156 of file MultiTermMatrixCleaner.h.