casa
$Rev:20696$
|
VisCalSolver: Default solver for calibration using visibility data. More...
#include <VisCalSolver.h>
Public Member Functions | |
VisCalSolver () | |
Constructor currently generic. | |
~VisCalSolver () | |
Destructor. | |
Bool | solve (VisEquation &viseq, SolvableVisCal &svc, VisBuffer &svb) |
Do the solve. | |
Bool | solve (VisEquation &viseq, SolvableVisCal &svc, VisBuffGroupAcc &vbga) |
Protected Member Functions | |
VisBuffer & | svb () |
Access to fundamental external objects: | |
VisBuffGroupAcc & | vbga () |
VisEquation & | ve () |
SolvableVisCal & | svc () |
Cube< Complex > & | R () |
Accessors to current svb's (differentiated) Residuals. | |
Array< Complex > & | dR () |
Matrix< Bool > & | Rflg () |
Array< Complex > & | dSrc () |
Int & | maxIter () |
Access to maxIter_. | |
Double & | chiSq () |
Access to chi2. | |
Vector< Double > & | chiSqV () |
Double & | lastChiSq () |
Double & | dChiSq () |
Double & | sumWt () |
Int & | nWt () |
Int & | nTotalPar () |
Access to parameters, & grad,hess,dp. | |
Int & | nCalPar () |
Int & | nSrcPar () |
Vector< Complex > & | par () |
Vector< Bool > & | parOK () |
Vector< Float > & | parErr () |
Vector< Complex > & | srcPar () |
Vector< DComplex > & | grad () |
Vector< Double > & | hess () |
Vector< Complex > & | dpar () |
Vector< Complex > & | dCalPar () |
Vector< Complex > & | dSrcPar () |
Vector< Complex > & | lastCalPar () |
Vector< Complex > & | lastSrcPar () |
Double & | lambda () |
void | initSolve () |
Initialize solving data. | |
void | residualate () |
Obtain trial residuals w.r.t svc's current pars. | |
void | residualate2 () |
void | differentiate () |
Differentiate the svb w.r.t svc's pars. | |
void | differentiate2 () |
void | chiSquare () |
Calculate residuals (incl. | |
void | chiSquare2 () |
Bool | converged () |
Check for convergence. | |
void | accGradHess () |
Internal solving methods. | |
void | accGradHess2 () |
void | revert () |
void | solveGradHess () |
void | updatePar () |
void | optStepSize () |
Optimize the step parabolically. | |
void | optStepSize2 () |
void | getErrors () |
Get and print par errors. | |
void | printPar (const Int &iter) |
Private Member Functions | |
Int & | prtlev () |
Diagnostic print level. | |
Private Attributes | |
VisBuffer * | svb_ |
VisBuffer (from outside) | |
VisBuffGroupAcc * | vbga_ |
VisEquation * | ve_ |
VisEquation (from outside) | |
SolvableVisCal * | svc_ |
SVC (from outside) | |
Int | nTotalPar_ |
Total Number of parameters. | |
Int | nCalPar_ |
Int | nSrcPar_ |
Cube< Complex > | R_ |
Residual/Differentiation caches. | |
Array< Complex > | dR_ |
Matrix< Bool > | Rflg_ |
Array< Complex > | dSrc_ |
Derivative wrt Q and U. | |
Int | maxIter_ |
Maximum number of solve iterations to attempt. | |
Double | chiSq_ |
Chi2, sum wts. | |
Vector< Double > | chiSqV_ |
Double | lastChiSq_ |
Double | dChiSq_ |
Double | sumWt_ |
Int | nWt_ |
Int | cvrgcount_ |
Vector< Complex > | par_ |
Parameter storage (these are Complex to match the VisCal solvePar) | |
Vector< Bool > | parOK_ |
Vector< Float > | parErr_ |
Vector< Complex > | srcPar_ |
Vector< Complex > | lastCalPar_ |
Vector< Complex > | lastSrcPar_ |
Vector< Complex > | dpar_ |
Parameter update. | |
Vector< Complex > | dcalpar_ |
Vector< Complex > | dsrcpar_ |
Vector< DComplex > | grad_ |
Gradient, Hessian (these are Double for precision in accumulation. | |
Vector< Double > | hess_ |
Double | lambda_ |
LM factor. | |
Bool | optstep_ |
Step optimization toggle. | |
Int | prtlev_ |
Diagnostic print level. |
VisCalSolver: Default solver for calibration using visibility data.
Public interface
VisCal for visibility calibration (meaning solved from visibilities), Solver for solving.
VisCalSolver describes an interface for solving for calibration from visibility data in a VisBuffer. It hosts the communication of visibility data with otherwise generic solving mechanims. A Levenberg-Marquardt solver is supplied here by default, but it is intended that this class be the template for interfaces to third-party solving mechanisms.
It is desirable to establish the distinct communicative boundary between generic solving mechanims and the particulars of visibility data and calibration component descriptions. This class is intended to serve this purpose, by providing access to visibility data and calibration in terms of quantities necessary for least-squares (and other) style solvers.
Definition at line 94 of file VisCalSolver.h.
Constructor currently generic.
Destructor.
void casa::VisCalSolver::accGradHess | ( | ) | [protected] |
Internal solving methods.
void casa::VisCalSolver::accGradHess2 | ( | ) | [protected] |
Double& casa::VisCalSolver::chiSq | ( | ) | [inline, protected] |
void casa::VisCalSolver::chiSquare | ( | ) | [protected] |
Calculate residuals (incl.
diff'd) and chi2
void casa::VisCalSolver::chiSquare2 | ( | ) | [protected] |
Vector<Double>& casa::VisCalSolver::chiSqV | ( | ) | [inline, protected] |
Definition at line 127 of file VisCalSolver.h.
References chiSqV_.
Bool casa::VisCalSolver::converged | ( | ) | [protected] |
Check for convergence.
Vector<Complex>& casa::VisCalSolver::dCalPar | ( | ) | [inline, protected] |
Definition at line 144 of file VisCalSolver.h.
References dsrcpar_.
Double& casa::VisCalSolver::dChiSq | ( | ) | [inline, protected] |
Definition at line 129 of file VisCalSolver.h.
References dChiSq_.
void casa::VisCalSolver::differentiate | ( | ) | [protected] |
Differentiate the svb w.r.t svc's pars.
void casa::VisCalSolver::differentiate2 | ( | ) | [protected] |
Vector<Complex>& casa::VisCalSolver::dpar | ( | ) | [inline, protected] |
Definition at line 143 of file VisCalSolver.h.
References dpar_.
Array<Complex>& casa::VisCalSolver::dR | ( | ) | [inline, protected] |
Definition at line 117 of file VisCalSolver.h.
References dR_.
Array<Complex>& casa::VisCalSolver::dSrc | ( | ) | [inline, protected] |
Definition at line 120 of file VisCalSolver.h.
References dSrc_.
Vector<Complex>& casa::VisCalSolver::dSrcPar | ( | ) | [inline, protected] |
Definition at line 145 of file VisCalSolver.h.
References dcalpar_.
void casa::VisCalSolver::getErrors | ( | ) | [protected] |
Get and print par errors.
Vector<DComplex>& casa::VisCalSolver::grad | ( | ) | [inline, protected] |
Definition at line 141 of file VisCalSolver.h.
References grad_.
Vector<Double>& casa::VisCalSolver::hess | ( | ) | [inline, protected] |
Definition at line 142 of file VisCalSolver.h.
References hess_.
void casa::VisCalSolver::initSolve | ( | ) | [protected] |
Initialize solving data.
Double& casa::VisCalSolver::lambda | ( | ) | [inline, protected] |
Definition at line 149 of file VisCalSolver.h.
References lambda_.
Vector<Complex>& casa::VisCalSolver::lastCalPar | ( | ) | [inline, protected] |
Definition at line 146 of file VisCalSolver.h.
References lastCalPar_.
Double& casa::VisCalSolver::lastChiSq | ( | ) | [inline, protected] |
Definition at line 128 of file VisCalSolver.h.
References lastChiSq_.
Vector<Complex>& casa::VisCalSolver::lastSrcPar | ( | ) | [inline, protected] |
Definition at line 147 of file VisCalSolver.h.
References lastSrcPar_.
Int& casa::VisCalSolver::maxIter | ( | ) | [inline, protected] |
Int& casa::VisCalSolver::nCalPar | ( | ) | [inline, protected] |
Definition at line 135 of file VisCalSolver.h.
References nCalPar_.
Int& casa::VisCalSolver::nSrcPar | ( | ) | [inline, protected] |
Definition at line 136 of file VisCalSolver.h.
References nSrcPar_.
Int& casa::VisCalSolver::nTotalPar | ( | ) | [inline, protected] |
Access to parameters, & grad,hess,dp.
Definition at line 134 of file VisCalSolver.h.
References nTotalPar_.
Int& casa::VisCalSolver::nWt | ( | ) | [inline, protected] |
Definition at line 131 of file VisCalSolver.h.
References nWt_.
void casa::VisCalSolver::optStepSize | ( | ) | [protected] |
Optimize the step parabolically.
void casa::VisCalSolver::optStepSize2 | ( | ) | [protected] |
Vector<Complex>& casa::VisCalSolver::par | ( | ) | [inline, protected] |
Definition at line 137 of file VisCalSolver.h.
References par_.
Vector<Float>& casa::VisCalSolver::parErr | ( | ) | [inline, protected] |
Definition at line 139 of file VisCalSolver.h.
References parErr_.
Vector<Bool>& casa::VisCalSolver::parOK | ( | ) | [inline, protected] |
Definition at line 138 of file VisCalSolver.h.
References parOK_.
void casa::VisCalSolver::printPar | ( | const Int & | iter | ) | [protected] |
Int& casa::VisCalSolver::prtlev | ( | ) | [inline, private] |
Diagnostic print level.
Definition at line 188 of file VisCalSolver.h.
Cube<Complex>& casa::VisCalSolver::R | ( | ) | [inline, protected] |
Accessors to current svb's (differentiated) Residuals.
Definition at line 116 of file VisCalSolver.h.
References R_.
void casa::VisCalSolver::residualate | ( | ) | [protected] |
Obtain trial residuals w.r.t svc's current pars.
void casa::VisCalSolver::residualate2 | ( | ) | [protected] |
void casa::VisCalSolver::revert | ( | ) | [protected] |
Matrix<Bool>& casa::VisCalSolver::Rflg | ( | ) | [inline, protected] |
Definition at line 118 of file VisCalSolver.h.
References Rflg_.
Bool casa::VisCalSolver::solve | ( | VisEquation & | viseq, |
SolvableVisCal & | svc, | ||
VisBuffer & | svb | ||
) |
Do the solve.
Bool casa::VisCalSolver::solve | ( | VisEquation & | viseq, |
SolvableVisCal & | svc, | ||
VisBuffGroupAcc & | vbga | ||
) |
void casa::VisCalSolver::solveGradHess | ( | ) | [protected] |
Vector<Complex>& casa::VisCalSolver::srcPar | ( | ) | [inline, protected] |
Definition at line 140 of file VisCalSolver.h.
References srcPar_.
Double& casa::VisCalSolver::sumWt | ( | ) | [inline, protected] |
Definition at line 130 of file VisCalSolver.h.
References sumWt_.
VisBuffer& casa::VisCalSolver::svb | ( | ) | [inline, protected] |
Access to fundamental external objects:
Definition at line 110 of file VisCalSolver.h.
References svb_.
SolvableVisCal& casa::VisCalSolver::svc | ( | ) | [inline, protected] |
Definition at line 113 of file VisCalSolver.h.
References svc_.
void casa::VisCalSolver::updatePar | ( | ) | [protected] |
VisBuffGroupAcc& casa::VisCalSolver::vbga | ( | ) | [inline, protected] |
Definition at line 111 of file VisCalSolver.h.
References vbga_.
VisEquation& casa::VisCalSolver::ve | ( | ) | [inline, protected] |
Definition at line 112 of file VisCalSolver.h.
References ve_.
Double casa::VisCalSolver::chiSq_ [private] |
Vector<Double> casa::VisCalSolver::chiSqV_ [private] |
Definition at line 218 of file VisCalSolver.h.
Referenced by chiSqV().
Int casa::VisCalSolver::cvrgcount_ [private] |
Definition at line 223 of file VisCalSolver.h.
Vector<Complex> casa::VisCalSolver::dcalpar_ [private] |
Definition at line 235 of file VisCalSolver.h.
Referenced by dSrcPar().
Double casa::VisCalSolver::dChiSq_ [private] |
Definition at line 220 of file VisCalSolver.h.
Referenced by dChiSq().
Vector<Complex> casa::VisCalSolver::dpar_ [private] |
Array<Complex> casa::VisCalSolver::dR_ [private] |
Definition at line 207 of file VisCalSolver.h.
Referenced by dR().
Array<Complex> casa::VisCalSolver::dSrc_ [private] |
Vector<Complex> casa::VisCalSolver::dsrcpar_ [private] |
Definition at line 235 of file VisCalSolver.h.
Referenced by dCalPar().
Vector<DComplex> casa::VisCalSolver::grad_ [private] |
Gradient, Hessian (these are Double for precision in accumulation.
Definition at line 239 of file VisCalSolver.h.
Referenced by grad().
Vector<Double> casa::VisCalSolver::hess_ [private] |
Definition at line 240 of file VisCalSolver.h.
Referenced by hess().
Double casa::VisCalSolver::lambda_ [private] |
Vector<Complex> casa::VisCalSolver::lastCalPar_ [private] |
Definition at line 231 of file VisCalSolver.h.
Referenced by lastCalPar().
Double casa::VisCalSolver::lastChiSq_ [private] |
Definition at line 219 of file VisCalSolver.h.
Referenced by lastChiSq().
Vector<Complex> casa::VisCalSolver::lastSrcPar_ [private] |
Definition at line 231 of file VisCalSolver.h.
Referenced by lastSrcPar().
Int casa::VisCalSolver::maxIter_ [private] |
Maximum number of solve iterations to attempt.
Definition at line 214 of file VisCalSolver.h.
Referenced by maxIter().
Int casa::VisCalSolver::nCalPar_ [private] |
Definition at line 202 of file VisCalSolver.h.
Referenced by nCalPar().
Int casa::VisCalSolver::nSrcPar_ [private] |
Definition at line 203 of file VisCalSolver.h.
Referenced by nSrcPar().
Int casa::VisCalSolver::nTotalPar_ [private] |
Total Number of parameters.
Definition at line 201 of file VisCalSolver.h.
Referenced by nTotalPar().
Int casa::VisCalSolver::nWt_ [private] |
Definition at line 222 of file VisCalSolver.h.
Referenced by nWt().
Bool casa::VisCalSolver::optstep_ [private] |
Step optimization toggle.
Definition at line 246 of file VisCalSolver.h.
Vector<Complex> casa::VisCalSolver::par_ [private] |
Parameter storage (these are Complex to match the VisCal solvePar)
Definition at line 227 of file VisCalSolver.h.
Referenced by par().
Vector<Float> casa::VisCalSolver::parErr_ [private] |
Definition at line 229 of file VisCalSolver.h.
Referenced by parErr().
Vector<Bool> casa::VisCalSolver::parOK_ [private] |
Definition at line 228 of file VisCalSolver.h.
Referenced by parOK().
Int casa::VisCalSolver::prtlev_ [private] |
Diagnostic print level.
Definition at line 249 of file VisCalSolver.h.
Cube<Complex> casa::VisCalSolver::R_ [private] |
Matrix<Bool> casa::VisCalSolver::Rflg_ [private] |
Definition at line 208 of file VisCalSolver.h.
Referenced by Rflg().
Vector<Complex> casa::VisCalSolver::srcPar_ [private] |
Definition at line 230 of file VisCalSolver.h.
Referenced by srcPar().
Double casa::VisCalSolver::sumWt_ [private] |
Definition at line 221 of file VisCalSolver.h.
Referenced by sumWt().
VisBuffer* casa::VisCalSolver::svb_ [private] |
SolvableVisCal* casa::VisCalSolver::svc_ [private] |
VisBuffGroupAcc* casa::VisCalSolver::vbga_ [private] |
Definition at line 192 of file VisCalSolver.h.
Referenced by vbga().
VisEquation* casa::VisCalSolver::ve_ [private] |