casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
casa::VisCalSolver Class Reference

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

#include <VisCalSolver.h>

Public Member Functions

 VisCalSolver ()
 Constructor currently generic. More...
 
 ~VisCalSolver ()
 Destructor. More...
 
casacore::Bool solve (VisEquation &viseq, SolvableVisCal &svc, VisBuffer &svb)
 Do the solve. More...
 
casacore::Bool solve (VisEquation &viseq, SolvableVisCal &svc, VisBuffGroupAcc &vbga)
 

Protected Member Functions

VisBuffersvb ()
 Access to fundamental external objects: More...
 
VisBuffGroupAccvbga ()
 
VisEquationve ()
 
SolvableVisCalsvc ()
 
casacore::Cube
< casacore::Complex > & 
R ()
 Accessors to current svb's (differentiated) Residuals. More...
 
casacore::Array
< casacore::Complex > & 
dR ()
 
casacore::Matrix
< casacore::Bool > & 
Rflg ()
 
casacore::Array
< casacore::Complex > & 
dSrc ()
 
casacore::IntmaxIter ()
 Access to maxIter_. More...
 
casacore::DoublechiSq ()
 Access to chi2. More...
 
casacore::Vector
< casacore::Double > & 
chiSqV ()
 
casacore::DoublelastChiSq ()
 
casacore::DoubledChiSq ()
 
casacore::DoublesumWt ()
 
casacore::IntnWt ()
 
casacore::IntnTotalPar ()
 Access to parameters, & grad,hess,dp. More...
 
casacore::IntnCalPar ()
 
casacore::IntnSrcPar ()
 
casacore::Vector
< casacore::Complex > & 
par ()
 
casacore::Vector
< casacore::Bool > & 
parOK ()
 
casacore::Vector
< casacore::Float > & 
parErr ()
 
casacore::Vector
< casacore::Complex > & 
srcPar ()
 
casacore::Vector
< casacore::DComplex > & 
grad ()
 
casacore::Vector
< casacore::Double > & 
hess ()
 
casacore::Vector
< casacore::Complex > & 
dpar ()
 
casacore::Vector
< casacore::Complex > & 
dCalPar ()
 
casacore::Vector
< casacore::Complex > & 
dSrcPar ()
 
casacore::Vector
< casacore::Complex > & 
lastCalPar ()
 
casacore::Vector
< casacore::Complex > & 
lastSrcPar ()
 
casacore::Doublelambda ()
 
void initSolve ()
 Initialize solving data. More...
 
void residualate ()
 Obtain trial residuals w.r.t svc's current pars. More...
 
void residualate2 ()
 
void differentiate ()
 Differentiate the svb w.r.t svc's pars. More...
 
void differentiate2 ()
 
void chiSquare ()
 Calculate residuals (incl. More...
 
void chiSquare2 ()
 
casacore::Bool converged ()
 Check for convergence. More...
 
void accGradHess ()
 Internal solving methods. More...
 
void accGradHess2 ()
 
void revert ()
 
void solveGradHess ()
 
void updatePar ()
 
void optStepSize ()
 Optimize the step parabolically. More...
 
void optStepSize2 ()
 
void getErrors ()
 Get and print par errors. More...
 
void printPar (const casacore::Int &iter)
 

Private Member Functions

casacore::Intprtlev ()
 Diagnostic print level. More...
 

Private Attributes

VisBuffersvb_
 VisBuffer (from outside) More...
 
VisBuffGroupAccvbga_
 
VisEquationve_
 VisEquation (from outside) More...
 
SolvableVisCalsvc_
 SVC (from outside) More...
 
casacore::Int nTotalPar_
 Total Number of parameters. More...
 
casacore::Int nCalPar_
 
casacore::Int nSrcPar_
 
casacore::Cube< casacore::Complex > R_
 Residual/Differentiation caches. More...
 
casacore::Array
< casacore::Complex > 
dR_
 
casacore::Matrix< casacore::BoolRflg_
 
casacore::Array
< casacore::Complex > 
dSrc_
 Derivative wrt Q and U. More...
 
casacore::Int maxIter_
 Maximum number of solve iterations to attempt. More...
 
casacore::Double chiSq_
 Chi2, sum wts. More...
 
casacore::Vector
< casacore::Double
chiSqV_
 
casacore::Double lastChiSq_
 
casacore::Double dChiSq_
 
casacore::Double sumWt_
 
casacore::Int nWt_
 
casacore::Int cvrgcount_
 
casacore::Vector
< casacore::Complex > 
par_
 Parameter storage (these are casacore::Complex to match the VisCal solvePar) More...
 
casacore::Vector< casacore::BoolparOK_
 
casacore::Vector< casacore::FloatparErr_
 
casacore::Vector
< casacore::Complex > 
srcPar_
 
casacore::Vector
< casacore::Complex > 
lastCalPar_
 
casacore::Vector
< casacore::Complex > 
lastSrcPar_
 
casacore::Vector
< casacore::Complex > 
dpar_
 Parameter update. More...
 
casacore::Vector
< casacore::Complex > 
dcalpar_
 
casacore::Vector
< casacore::Complex > 
dsrcpar_
 
casacore::Vector
< casacore::DComplex > 
grad_
 Gradient, Hessian (these are casacore::Double for precision in accumulation. More...
 
casacore::Vector
< casacore::Double
hess_
 
casacore::Double lambda_
 LM factor. More...
 
casacore::Bool optstep_
 Step optimization toggle. More...
 
casacore::Int prtlev_
 Diagnostic print level. More...
 

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

casa::VisCalSolver::VisCalSolver ( )

Constructor currently generic.

casa::VisCalSolver::~VisCalSolver ( )

Destructor.

Member Function Documentation

void casa::VisCalSolver::accGradHess ( )
protected

Internal solving methods.

void casa::VisCalSolver::accGradHess2 ( )
protected
casacore::Double& casa::VisCalSolver::chiSq ( )
inlineprotected

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
casacore::Vector<casacore::Double>& casa::VisCalSolver::chiSqV ( )
inlineprotected

Definition at line 127 of file VisCalSolver.h.

References chiSqV_.

casacore::Bool casa::VisCalSolver::converged ( )
protected

Check for convergence.

casacore::Vector<casacore::Complex>& casa::VisCalSolver::dCalPar ( )
inlineprotected

Definition at line 144 of file VisCalSolver.h.

References dsrcpar_.

casacore::Double& casa::VisCalSolver::dChiSq ( )
inlineprotected

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
casacore::Vector<casacore::Complex>& casa::VisCalSolver::dpar ( )
inlineprotected

Definition at line 143 of file VisCalSolver.h.

References dpar_.

casacore::Array<casacore::Complex>& casa::VisCalSolver::dR ( )
inlineprotected

Definition at line 117 of file VisCalSolver.h.

References dR_.

casacore::Array<casacore::Complex>& casa::VisCalSolver::dSrc ( )
inlineprotected

Definition at line 120 of file VisCalSolver.h.

References dSrc_.

casacore::Vector<casacore::Complex>& casa::VisCalSolver::dSrcPar ( )
inlineprotected

Definition at line 145 of file VisCalSolver.h.

References dcalpar_.

void casa::VisCalSolver::getErrors ( )
protected

Get and print par errors.

casacore::Vector<casacore::DComplex>& casa::VisCalSolver::grad ( )
inlineprotected

Definition at line 141 of file VisCalSolver.h.

References grad_.

casacore::Vector<casacore::Double>& casa::VisCalSolver::hess ( )
inlineprotected

Definition at line 142 of file VisCalSolver.h.

References hess_.

void casa::VisCalSolver::initSolve ( )
protected

Initialize solving data.

casacore::Double& casa::VisCalSolver::lambda ( )
inlineprotected

Definition at line 149 of file VisCalSolver.h.

References lambda_.

casacore::Vector<casacore::Complex>& casa::VisCalSolver::lastCalPar ( )
inlineprotected

Definition at line 146 of file VisCalSolver.h.

References lastCalPar_.

casacore::Double& casa::VisCalSolver::lastChiSq ( )
inlineprotected

Definition at line 128 of file VisCalSolver.h.

References lastChiSq_.

casacore::Vector<casacore::Complex>& casa::VisCalSolver::lastSrcPar ( )
inlineprotected

Definition at line 147 of file VisCalSolver.h.

References lastSrcPar_.

casacore::Int& casa::VisCalSolver::maxIter ( )
inlineprotected

Access to maxIter_.

Definition at line 123 of file VisCalSolver.h.

References maxIter_.

casacore::Int& casa::VisCalSolver::nCalPar ( )
inlineprotected

Definition at line 135 of file VisCalSolver.h.

References nCalPar_.

casacore::Int& casa::VisCalSolver::nSrcPar ( )
inlineprotected

Definition at line 136 of file VisCalSolver.h.

References nSrcPar_.

casacore::Int& casa::VisCalSolver::nTotalPar ( )
inlineprotected

Access to parameters, & grad,hess,dp.

Definition at line 134 of file VisCalSolver.h.

References nTotalPar_.

casacore::Int& casa::VisCalSolver::nWt ( )
inlineprotected

Definition at line 131 of file VisCalSolver.h.

References nWt_.

void casa::VisCalSolver::optStepSize ( )
protected

Optimize the step parabolically.

void casa::VisCalSolver::optStepSize2 ( )
protected
casacore::Vector<casacore::Complex>& casa::VisCalSolver::par ( )
inlineprotected

Definition at line 137 of file VisCalSolver.h.

References par_.

casacore::Vector<casacore::Float>& casa::VisCalSolver::parErr ( )
inlineprotected

Definition at line 139 of file VisCalSolver.h.

References parErr_.

casacore::Vector<casacore::Bool>& casa::VisCalSolver::parOK ( )
inlineprotected

Definition at line 138 of file VisCalSolver.h.

References parOK_.

void casa::VisCalSolver::printPar ( const casacore::Int iter)
protected
casacore::Int& casa::VisCalSolver::prtlev ( )
inlineprivate

Diagnostic print level.

Definition at line 188 of file VisCalSolver.h.

casacore::Cube<casacore::Complex>& casa::VisCalSolver::R ( )
inlineprotected

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
casacore::Matrix<casacore::Bool>& casa::VisCalSolver::Rflg ( )
inlineprotected

Definition at line 118 of file VisCalSolver.h.

References Rflg_.

casacore::Bool casa::VisCalSolver::solve ( VisEquation viseq,
SolvableVisCal svc,
VisBuffer svb 
)

Do the solve.

casacore::Bool casa::VisCalSolver::solve ( VisEquation viseq,
SolvableVisCal svc,
VisBuffGroupAcc vbga 
)
void casa::VisCalSolver::solveGradHess ( )
protected
casacore::Vector<casacore::Complex>& casa::VisCalSolver::srcPar ( )
inlineprotected

Definition at line 140 of file VisCalSolver.h.

References srcPar_.

casacore::Double& casa::VisCalSolver::sumWt ( )
inlineprotected

Definition at line 130 of file VisCalSolver.h.

References sumWt_.

VisBuffer& casa::VisCalSolver::svb ( )
inlineprotected

Access to fundamental external objects:

Definition at line 110 of file VisCalSolver.h.

References svb_.

SolvableVisCal& casa::VisCalSolver::svc ( )
inlineprotected

Definition at line 113 of file VisCalSolver.h.

References svc_.

void casa::VisCalSolver::updatePar ( )
protected
VisBuffGroupAcc& casa::VisCalSolver::vbga ( )
inlineprotected

Definition at line 111 of file VisCalSolver.h.

References vbga_.

VisEquation& casa::VisCalSolver::ve ( )
inlineprotected

Definition at line 112 of file VisCalSolver.h.

References ve_.

Member Data Documentation

casacore::Double casa::VisCalSolver::chiSq_
private

Chi2, sum wts.

Definition at line 217 of file VisCalSolver.h.

Referenced by chiSq().

casacore::Vector<casacore::Double> casa::VisCalSolver::chiSqV_
private

Definition at line 218 of file VisCalSolver.h.

Referenced by chiSqV().

casacore::Int casa::VisCalSolver::cvrgcount_
private

Definition at line 223 of file VisCalSolver.h.

casacore::Vector<casacore::Complex> casa::VisCalSolver::dcalpar_
private

Definition at line 235 of file VisCalSolver.h.

Referenced by dSrcPar().

casacore::Double casa::VisCalSolver::dChiSq_
private

Definition at line 220 of file VisCalSolver.h.

Referenced by dChiSq().

casacore::Vector<casacore::Complex> casa::VisCalSolver::dpar_
private

Parameter update.

Definition at line 234 of file VisCalSolver.h.

Referenced by dpar().

casacore::Array<casacore::Complex> casa::VisCalSolver::dR_
private

Definition at line 207 of file VisCalSolver.h.

Referenced by dR().

casacore::Array<casacore::Complex> casa::VisCalSolver::dSrc_
private

Derivative wrt Q and U.

Definition at line 211 of file VisCalSolver.h.

Referenced by dSrc().

casacore::Vector<casacore::Complex> casa::VisCalSolver::dsrcpar_
private

Definition at line 235 of file VisCalSolver.h.

Referenced by dCalPar().

casacore::Vector<casacore::DComplex> casa::VisCalSolver::grad_
private

Gradient, Hessian (these are casacore::Double for precision in accumulation.

Definition at line 239 of file VisCalSolver.h.

Referenced by grad().

casacore::Vector<casacore::Double> casa::VisCalSolver::hess_
private

Definition at line 240 of file VisCalSolver.h.

Referenced by hess().

casacore::Double casa::VisCalSolver::lambda_
private

LM factor.

Definition at line 243 of file VisCalSolver.h.

Referenced by lambda().

casacore::Vector<casacore::Complex> casa::VisCalSolver::lastCalPar_
private

Definition at line 231 of file VisCalSolver.h.

Referenced by lastCalPar().

casacore::Double casa::VisCalSolver::lastChiSq_
private

Definition at line 219 of file VisCalSolver.h.

Referenced by lastChiSq().

casacore::Vector<casacore::Complex> casa::VisCalSolver::lastSrcPar_
private

Definition at line 231 of file VisCalSolver.h.

Referenced by lastSrcPar().

casacore::Int casa::VisCalSolver::maxIter_
private

Maximum number of solve iterations to attempt.

Definition at line 214 of file VisCalSolver.h.

Referenced by maxIter().

casacore::Int casa::VisCalSolver::nCalPar_
private

Definition at line 202 of file VisCalSolver.h.

Referenced by nCalPar().

casacore::Int casa::VisCalSolver::nSrcPar_
private

Definition at line 203 of file VisCalSolver.h.

Referenced by nSrcPar().

casacore::Int casa::VisCalSolver::nTotalPar_
private

Total Number of parameters.

Definition at line 201 of file VisCalSolver.h.

Referenced by nTotalPar().

casacore::Int casa::VisCalSolver::nWt_
private

Definition at line 222 of file VisCalSolver.h.

Referenced by nWt().

casacore::Bool casa::VisCalSolver::optstep_
private

Step optimization toggle.

Definition at line 246 of file VisCalSolver.h.

casacore::Vector<casacore::Complex> casa::VisCalSolver::par_
private

Parameter storage (these are casacore::Complex to match the VisCal solvePar)

Definition at line 227 of file VisCalSolver.h.

Referenced by par().

casacore::Vector<casacore::Float> casa::VisCalSolver::parErr_
private

Definition at line 229 of file VisCalSolver.h.

Referenced by parErr().

casacore::Vector<casacore::Bool> casa::VisCalSolver::parOK_
private

Definition at line 228 of file VisCalSolver.h.

Referenced by parOK().

casacore::Int casa::VisCalSolver::prtlev_
private

Diagnostic print level.

Definition at line 249 of file VisCalSolver.h.

casacore::Cube<casacore::Complex> casa::VisCalSolver::R_
private

Residual/Differentiation caches.

Definition at line 206 of file VisCalSolver.h.

Referenced by R().

casacore::Matrix<casacore::Bool> casa::VisCalSolver::Rflg_
private

Definition at line 208 of file VisCalSolver.h.

Referenced by Rflg().

casacore::Vector<casacore::Complex> casa::VisCalSolver::srcPar_
private

Definition at line 230 of file VisCalSolver.h.

Referenced by srcPar().

casacore::Double casa::VisCalSolver::sumWt_
private

Definition at line 221 of file VisCalSolver.h.

Referenced by sumWt().

VisBuffer* casa::VisCalSolver::svb_
private

VisBuffer (from outside)

Definition at line 188 of file VisCalSolver.h.

Referenced by svb().

SolvableVisCal* casa::VisCalSolver::svc_
private

SVC (from outside)

Definition at line 198 of file VisCalSolver.h.

Referenced by svc().

VisBuffGroupAcc* casa::VisCalSolver::vbga_
private

Definition at line 192 of file VisCalSolver.h.

Referenced by vbga().

VisEquation* casa::VisCalSolver::ve_
private

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: