casa
$Rev:20696$
|
#include <MultiTermMatrixCleaner.h>
Public Member Functions | |
MultiTermMatrixCleaner () | |
Create a cleaner. | |
~MultiTermMatrixCleaner () | |
The copy constructor uses reference semantics MultiTermMatrixCleaner(const MultiTermMatrixCleaner & other);. | |
Bool | setntaylorterms (const int &nterms) |
Input : number of Taylor terms Reshapes PtrBlocks to hold the correct number of PSFs and Residual images. | |
Bool | setscales (const Vector< Float > &scales) |
Input : scales. | |
Bool | initialise (Int nx, Int ny) |
Initialize all the memory being used. | |
Int | computeHessianPeak () |
Calculate Hessian elements and check for invertibility Does not have to be called externally, but can be. | |
Bool | setpsf (int order, Matrix< Float > &psf) |
Input : psfs and dirty images. | |
Bool | setresidual (int order, Matrix< Float > &dirty) |
Input : psfs and dirty images. | |
Bool | setmodel (int order, Matrix< Float > &model) |
Input : model images. | |
Bool | setmask (Matrix< Float > &mask) |
Input : mask. | |
Int | mtclean (Int maxniter, Float stopfraction, Float inputgain, Float userthreshold) |
Run the minor cycle. | |
Bool | getmodel (int order, Matrix< Float > &model) |
Output : Model images. | |
Bool | getresidual (int order, Matrix< Float > &residual) |
Output : psfs and dirty images. | |
Bool | computeprincipalsolution () |
Compute principal solution - in-place on the residual images in vecDirty. | |
Bool | getinvhessian (Matrix< Double > &invhessian) |
Output : Hessian matrix. | |
Private Member Functions | |
Int | verifyScaleSizes () |
Initial setup functions. | |
Int | allocateMemory () |
Int | setupScaleFunctions () |
Int | setupUserMask () |
Setup per major cycle. | |
Int | computeFluxLimit (Float &fluxlimit, Float threshold) |
Int | computeRHS () |
Int | solveMatrixEqn (Int ntaylor, Int scale, IPosition blc, IPosition trc) |
Solver functions : minor-cycle iterations. | |
Int | chooseComponent (Int ntaylor, Int scale, Int criterion, IPosition blc, IPosition trc) |
Int | updateModelAndRHS (Float loopgain) |
Int | updateRHS (Int ntaylor, Int scale, Float loopgain, Vector< Float > coeffs, IPosition blc, IPosition trc, IPosition blcPsf, IPosition trcPsf) |
Int | checkConvergence (Int updatetype, Float &fluxlimit, Float &loopgain) |
Bool | buildImagePatches () |
Int | writeMatrixToDisk (String imagename, Matrix< Float > &themat) |
Helper functions. | |
Int | IND2 (Int taylor, Int scale) |
Int | IND4 (Int taylor1, Int taylor2, Int scale1, Int scale2) |
Private Attributes | |
LogIO | os |
Int | ntaylor_p |
using MatrixCleaner::makeScaleMasks; | |
Int | psfntaylor_p |
Int | nscales_p |
Int | nx_p |
Int | ny_p |
Int | totalIters_p |
Float | globalmaxval_p |
Int | maxscaleindex_p |
IPosition | globalmaxpos_p |
Int | itercount_p |
Int | maxniter_p |
Float | stopfraction_p |
Float | inputgain_p |
Float | userthreshold_p |
Float | prev_max_p |
Float | min_max_p |
IPosition | psfsupport_p |
IPosition | psfpeak_p |
IPosition | blc_p |
IPosition | trc_p |
IPosition | blcPsf_p |
IPosition | trcPsf_p |
Vector< Float > | scaleSizes_p |
Vector< Float > | scaleBias_p |
Vector< Float > | totalScaleFlux_p |
Vector< Float > | totalTaylorFlux_p |
Vector< Float > | maxScaleVal_p |
Vector< IPosition > | maxScalePos_p |
IPosition | gip |
Int | nx |
Int | ny |
Bool | donePSF_p |
Bool | donePSP_p |
Bool | doneCONV_p |
Matrix< Complex > | dirtyFT_p |
Block< Matrix< Float > > | vecScaleMasks_p |
Matrix< Complex > | cWork_p |
Block< Matrix< Float > > | vecWork_p |
Block< Matrix< Float > > | vecScales_p |
h(s) [nx,ny,nscales] | |
Block< Matrix< Complex > > | vecScalesFT_p |
Block< Matrix< Complex > > | vecPsfFT_p |
B_k [nx,ny,ntaylor] Block<Matrix<Float> > vecPsf_p;. | |
Block< Matrix< Float > > | vecDirty_p |
I_D : Residual/Dirty Images [nx,ny,ntaylor]. | |
Block< Matrix< Float > > | vecModel_p |
I_M : Model Images [nx,ny,ntaylor]. | |
Block< Matrix< Float > > | cubeA_p |
Block <Matrix<Float> > vecScaleModel_p;. | |
Block< Matrix< Float > > | matR_p |
R_{sk} = I_D * B_{sk} [nx,ny,ntaylor,nscales]. | |
Block< Matrix< Float > > | matCoeffs_p |
a_{sk} = Solution vectors. | |
Double | memoryMB_p |
Memory to be allocated per Matrix. | |
Block< Matrix< Double > > | matA_p |
Solve [A][Coeffs] = [I_D * B] Shape of A : [ntaylor,ntaylor]. | |
Block< Matrix< Double > > | invMatA_p |
FFTServer< Float, Complex > | fftcomplex |
FFTserver. | |
Bool | adbg |
Definition at line 36 of file MultiTermMatrixCleaner.h.
Create a cleaner.
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.
Int casa::MultiTermMatrixCleaner::allocateMemory | ( | ) | [private] |
Bool casa::MultiTermMatrixCleaner::buildImagePatches | ( | ) | [private] |
Int casa::MultiTermMatrixCleaner::checkConvergence | ( | Int | updatetype, |
Float & | fluxlimit, | ||
Float & | loopgain | ||
) | [private] |
Int casa::MultiTermMatrixCleaner::chooseComponent | ( | Int | ntaylor, |
Int | scale, | ||
Int | criterion, | ||
IPosition | blc, | ||
IPosition | trc | ||
) | [private] |
Int casa::MultiTermMatrixCleaner::computeFluxLimit | ( | Float & | fluxlimit, |
Float | threshold | ||
) | [private] |
Calculate Hessian elements and check for invertibility Does not have to be called externally, but can be.
Either way, it executes only once.
Compute principal solution - in-place on the residual images in vecDirty.
Int casa::MultiTermMatrixCleaner::computeRHS | ( | ) | [private] |
Bool casa::MultiTermMatrixCleaner::getinvhessian | ( | Matrix< Double > & | invhessian | ) |
Output : Hessian matrix.
Bool casa::MultiTermMatrixCleaner::getmodel | ( | int | order, |
Matrix< Float > & | model | ||
) |
Output : Model images.
Bool casa::MultiTermMatrixCleaner::getresidual | ( | int | order, |
Matrix< Float > & | residual | ||
) |
Output : psfs and dirty images.
Int casa::MultiTermMatrixCleaner::IND2 | ( | Int | taylor, |
Int | scale | ||
) | [private] |
Int casa::MultiTermMatrixCleaner::IND4 | ( | Int | taylor1, |
Int | taylor2, | ||
Int | scale1, | ||
Int | scale2 | ||
) | [private] |
Bool casa::MultiTermMatrixCleaner::initialise | ( | Int | nx, |
Int | ny | ||
) |
Initialize all the memory being used.
Int casa::MultiTermMatrixCleaner::mtclean | ( | Int | maxniter, |
Float | stopfraction, | ||
Float | inputgain, | ||
Float | userthreshold | ||
) |
Run the minor cycle.
Bool casa::MultiTermMatrixCleaner::setmask | ( | Matrix< Float > & | mask | ) |
Input : mask.
Bool casa::MultiTermMatrixCleaner::setmodel | ( | int | order, |
Matrix< Float > & | model | ||
) |
Input : model images.
Bool casa::MultiTermMatrixCleaner::setntaylorterms | ( | const int & | nterms | ) |
Input : number of Taylor terms Reshapes PtrBlocks to hold the correct number of PSFs and Residual images.
Bool casa::MultiTermMatrixCleaner::setpsf | ( | int | order, |
Matrix< Float > & | psf | ||
) |
Input : psfs and dirty images.
Bool casa::MultiTermMatrixCleaner::setresidual | ( | int | order, |
Matrix< Float > & | dirty | ||
) |
Input : psfs and dirty images.
Bool casa::MultiTermMatrixCleaner::setscales | ( | const Vector< Float > & | scales | ) |
Input : scales.
Reimplemented from casa::MatrixCleaner.
Int casa::MultiTermMatrixCleaner::setupScaleFunctions | ( | ) | [private] |
Int casa::MultiTermMatrixCleaner::setupUserMask | ( | ) | [private] |
Setup per major cycle.
Int casa::MultiTermMatrixCleaner::solveMatrixEqn | ( | Int | ntaylor, |
Int | scale, | ||
IPosition | blc, | ||
IPosition | trc | ||
) | [private] |
Solver functions : minor-cycle iterations.
Need to be efficient.
Int casa::MultiTermMatrixCleaner::updateModelAndRHS | ( | Float | loopgain | ) | [private] |
Int casa::MultiTermMatrixCleaner::updateRHS | ( | Int | ntaylor, |
Int | scale, | ||
Float | loopgain, | ||
Vector< Float > | coeffs, | ||
IPosition | blc, | ||
IPosition | trc, | ||
IPosition | blcPsf, | ||
IPosition | trcPsf | ||
) | [private] |
Int casa::MultiTermMatrixCleaner::verifyScaleSizes | ( | ) | [private] |
Initial setup functions.
Int casa::MultiTermMatrixCleaner::writeMatrixToDisk | ( | String | imagename, |
Matrix< Float > & | themat | ||
) | [private] |
Helper functions.
Bool casa::MultiTermMatrixCleaner::adbg [private] |
Definition at line 212 of file MultiTermMatrixCleaner.h.
IPosition casa::MultiTermMatrixCleaner::blc_p [private] |
Definition at line 134 of file MultiTermMatrixCleaner.h.
Definition at line 134 of file MultiTermMatrixCleaner.h.
Block<Matrix<Float> > casa::MultiTermMatrixCleaner::cubeA_p [private] |
Block <Matrix<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 170 of file MultiTermMatrixCleaner.h.
Matrix<Complex> casa::MultiTermMatrixCleaner::cWork_p [private] |
Definition at line 150 of file MultiTermMatrixCleaner.h.
Matrix<Complex> casa::MultiTermMatrixCleaner::dirtyFT_p [private] |
Definition at line 147 of file MultiTermMatrixCleaner.h.
Bool casa::MultiTermMatrixCleaner::doneCONV_p [private] |
Definition at line 145 of file MultiTermMatrixCleaner.h.
Bool casa::MultiTermMatrixCleaner::donePSF_p [private] |
Definition at line 145 of file MultiTermMatrixCleaner.h.
Bool casa::MultiTermMatrixCleaner::donePSP_p [private] |
Definition at line 145 of file MultiTermMatrixCleaner.h.
FFTServer<Float,Complex> casa::MultiTermMatrixCleaner::fftcomplex [private] |
FFTserver.
Definition at line 187 of file MultiTermMatrixCleaner.h.
IPosition casa::MultiTermMatrixCleaner::gip [private] |
Definition at line 143 of file MultiTermMatrixCleaner.h.
Definition at line 123 of file MultiTermMatrixCleaner.h.
Definition at line 121 of file MultiTermMatrixCleaner.h.
Definition at line 127 of file MultiTermMatrixCleaner.h.
Block<Matrix<Double> > casa::MultiTermMatrixCleaner::invMatA_p [private] |
Definition at line 184 of file MultiTermMatrixCleaner.h.
Int casa::MultiTermMatrixCleaner::itercount_p [private] |
Definition at line 124 of file MultiTermMatrixCleaner.h.
Block<Matrix<Double> > casa::MultiTermMatrixCleaner::matA_p [private] |
Solve [A][Coeffs] = [I_D * B] Shape of A : [ntaylor,ntaylor].
Definition at line 183 of file MultiTermMatrixCleaner.h.
Block<Matrix<Float> > casa::MultiTermMatrixCleaner::matCoeffs_p [private] |
a_{sk} = Solution vectors.
[nx,ny,ntaylor,nscales]
Definition at line 176 of file MultiTermMatrixCleaner.h.
Block<Matrix<Float> > casa::MultiTermMatrixCleaner::matR_p [private] |
R_{sk} = I_D * B_{sk} [nx,ny,ntaylor,nscales].
Definition at line 173 of file MultiTermMatrixCleaner.h.
Int casa::MultiTermMatrixCleaner::maxniter_p [private] |
Definition at line 125 of file MultiTermMatrixCleaner.h.
Definition at line 122 of file MultiTermMatrixCleaner.h.
Definition at line 141 of file MultiTermMatrixCleaner.h.
Definition at line 140 of file MultiTermMatrixCleaner.h.
Memory to be allocated per Matrix.
Definition at line 179 of file MultiTermMatrixCleaner.h.
Float casa::MultiTermMatrixCleaner::min_max_p [private] |
Definition at line 130 of file MultiTermMatrixCleaner.h.
Int casa::MultiTermMatrixCleaner::nscales_p [private] |
Definition at line 117 of file MultiTermMatrixCleaner.h.
Int casa::MultiTermMatrixCleaner::ntaylor_p [private] |
using MatrixCleaner::makeScaleMasks;
Definition at line 115 of file MultiTermMatrixCleaner.h.
Int casa::MultiTermMatrixCleaner::nx [private] |
Definition at line 144 of file MultiTermMatrixCleaner.h.
Int casa::MultiTermMatrixCleaner::nx_p [private] |
Definition at line 118 of file MultiTermMatrixCleaner.h.
Int casa::MultiTermMatrixCleaner::ny [private] |
Definition at line 144 of file MultiTermMatrixCleaner.h.
Int casa::MultiTermMatrixCleaner::ny_p [private] |
Definition at line 119 of file MultiTermMatrixCleaner.h.
LogIO casa::MultiTermMatrixCleaner::os [private] |
Definition at line 93 of file MultiTermMatrixCleaner.h.
Definition at line 129 of file MultiTermMatrixCleaner.h.
Definition at line 116 of file MultiTermMatrixCleaner.h.
Definition at line 133 of file MultiTermMatrixCleaner.h.
Definition at line 132 of file MultiTermMatrixCleaner.h.
Vector<Float> casa::MultiTermMatrixCleaner::scaleBias_p [private] |
Definition at line 137 of file MultiTermMatrixCleaner.h.
Definition at line 136 of file MultiTermMatrixCleaner.h.
Definition at line 126 of file MultiTermMatrixCleaner.h.
Definition at line 120 of file MultiTermMatrixCleaner.h.
Definition at line 138 of file MultiTermMatrixCleaner.h.
Definition at line 139 of file MultiTermMatrixCleaner.h.
IPosition casa::MultiTermMatrixCleaner::trc_p [private] |
Definition at line 134 of file MultiTermMatrixCleaner.h.
Definition at line 134 of file MultiTermMatrixCleaner.h.
Definition at line 128 of file MultiTermMatrixCleaner.h.
Block<Matrix<Float> > casa::MultiTermMatrixCleaner::vecDirty_p [private] |
I_D : Residual/Dirty Images [nx,ny,ntaylor].
Definition at line 162 of file MultiTermMatrixCleaner.h.
Block<Matrix<Float> > casa::MultiTermMatrixCleaner::vecModel_p [private] |
I_M : Model Images [nx,ny,ntaylor].
Definition at line 165 of file MultiTermMatrixCleaner.h.
Block<Matrix<Complex> > casa::MultiTermMatrixCleaner::vecPsfFT_p [private] |
B_k [nx,ny,ntaylor] Block<Matrix<Float> > vecPsf_p;.
Definition at line 159 of file MultiTermMatrixCleaner.h.
Block<Matrix<Float> > casa::MultiTermMatrixCleaner::vecScaleMasks_p [private] |
Definition at line 148 of file MultiTermMatrixCleaner.h.
Block<Matrix<Float> > casa::MultiTermMatrixCleaner::vecScales_p [private] |
h(s) [nx,ny,nscales]
Definition at line 154 of file MultiTermMatrixCleaner.h.
Block<Matrix<Complex> > casa::MultiTermMatrixCleaner::vecScalesFT_p [private] |
Definition at line 155 of file MultiTermMatrixCleaner.h.
Block<Matrix<Float> > casa::MultiTermMatrixCleaner::vecWork_p [private] |
Definition at line 151 of file MultiTermMatrixCleaner.h.