casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
casa::VisCalSolver Class Reference

VisCalSolver: Default solver for calibration using visibility data. More...

#include <VisCalSolver.h>

List of all members.

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

VisBuffersvb ()
 Access to fundamental external objects:
VisBuffGroupAccvbga ()
VisEquationve ()
SolvableVisCalsvc ()
Cube< Complex > & R ()
 Accessors to current svb's (differentiated) Residuals.
Array< Complex > & dR ()
Matrix< Bool > & Rflg ()
Array< Complex > & dSrc ()
IntmaxIter ()
 Access to maxIter_.
DoublechiSq ()
 Access to chi2.
Vector< Double > & chiSqV ()
DoublelastChiSq ()
DoubledChiSq ()
DoublesumWt ()
IntnWt ()
IntnTotalPar ()
 Access to parameters, & grad,hess,dp.
IntnCalPar ()
IntnSrcPar ()
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 ()
Doublelambda ()
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

Intprtlev ()
 Diagnostic print level.

Private Attributes

VisBuffersvb_
 VisBuffer (from outside)
VisBuffGroupAccvbga_
VisEquationve_
 VisEquation (from outside)
SolvableVisCalsvc_
 SVC (from outside)
Int nTotalPar_
 Total Number of parameters.
Int nCalPar_
Int nSrcPar_
Cube< Complex > R_
 Residual/Differentiation caches.
Array< Complex > dR_
Matrix< BoolRflg_
Array< Complex > dSrc_
 Derivative wrt Q and U.
Int maxIter_
 Maximum number of solve iterations to attempt.
Double chiSq_
 Chi2, sum wts.
Vector< DoublechiSqV_
Double lastChiSq_
Double dChiSq_
Double sumWt_
Int nWt_
Int cvrgcount_
Vector< Complex > par_
 Parameter storage (these are Complex to match the VisCal solvePar)
Vector< BoolparOK_
Vector< FloatparErr_
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< Doublehess_
Double lambda_
 LM factor.
Bool optstep_
 Step optimization toggle.
Int prtlev_
 Diagnostic print level.

Detailed Description

VisCalSolver: Default solver for calibration using visibility data.

Intended use:

Public interface

Prerequisite

Etymology

VisCal for visibility calibration (meaning solved from visibilities), Solver for solving.

Synopsis

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.

Example

Motivation

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.

VisCalSolver

Definition at line 94 of file VisCalSolver.h.


Constructor & Destructor Documentation

Constructor currently generic.

Destructor.


Member Function Documentation

void casa::VisCalSolver::accGradHess ( ) [protected]

Internal solving methods.

void casa::VisCalSolver::accGradHess2 ( ) [protected]
Double& casa::VisCalSolver::chiSq ( ) [inline, protected]

Access to chi2.

Definition at line 126 of file VisCalSolver.h.

References chiSq_.

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_.

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]

Access to maxIter_.

Definition at line 123 of file VisCalSolver.h.

References maxIter_.

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_.

Do the solve.

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_.


Member Data Documentation

Chi2, sum wts.

Definition at line 217 of file VisCalSolver.h.

Referenced by chiSq().

Definition at line 218 of file VisCalSolver.h.

Referenced by chiSqV().

Definition at line 223 of file VisCalSolver.h.

Definition at line 235 of file VisCalSolver.h.

Referenced by dSrcPar().

Definition at line 220 of file VisCalSolver.h.

Referenced by dChiSq().

Vector<Complex> casa::VisCalSolver::dpar_ [private]

Parameter update.

Definition at line 234 of file VisCalSolver.h.

Referenced by dpar().

Array<Complex> casa::VisCalSolver::dR_ [private]

Definition at line 207 of file VisCalSolver.h.

Referenced by dR().

Array<Complex> casa::VisCalSolver::dSrc_ [private]

Derivative wrt Q and U.

Definition at line 211 of file VisCalSolver.h.

Referenced by dSrc().

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().

Definition at line 240 of file VisCalSolver.h.

Referenced by hess().

LM factor.

Definition at line 243 of file VisCalSolver.h.

Referenced by lambda().

Definition at line 231 of file VisCalSolver.h.

Referenced by lastCalPar().

Definition at line 219 of file VisCalSolver.h.

Referenced by lastChiSq().

Definition at line 231 of file VisCalSolver.h.

Referenced by lastSrcPar().

Maximum number of solve iterations to attempt.

Definition at line 214 of file VisCalSolver.h.

Referenced by maxIter().

Definition at line 202 of file VisCalSolver.h.

Referenced by nCalPar().

Definition at line 203 of file VisCalSolver.h.

Referenced by nSrcPar().

Total Number of parameters.

Definition at line 201 of file VisCalSolver.h.

Referenced by nTotalPar().

Definition at line 222 of file VisCalSolver.h.

Referenced by nWt().

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().

Definition at line 229 of file VisCalSolver.h.

Referenced by parErr().

Definition at line 228 of file VisCalSolver.h.

Referenced by parOK().

Diagnostic print level.

Definition at line 249 of file VisCalSolver.h.

Cube<Complex> casa::VisCalSolver::R_ [private]

Residual/Differentiation caches.

Definition at line 206 of file VisCalSolver.h.

Referenced by R().

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().

Definition at line 221 of file VisCalSolver.h.

Referenced by sumWt().

VisBuffer (from outside)

Definition at line 188 of file VisCalSolver.h.

Referenced by svb().

SVC (from outside)

Definition at line 198 of file VisCalSolver.h.

Referenced by svc().

Definition at line 192 of file VisCalSolver.h.

Referenced by vbga().

VisEquation (from outside)

Definition at line 195 of file VisCalSolver.h.

Referenced by ve().


The documentation for this class was generated from the following file: