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::VisCalSolver2 Class Reference

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

#include <VisCalSolver2.h>

Public Member Functions

 VisCalSolver2 ()
 Constructor. More...
 
 VisCalSolver2 (casacore::String solmode, casacore::Vector< casacore::Float > &rmsthresh)
 
 ~VisCalSolver2 ()
 Destructor. More...
 
bool solve (VisEquation &viseq, SolvableVisCal &svc, SDBList &sdbs)
 Do the solve. More...
 
bool solveL1R (VisEquation &viseq, SolvableVisCal &svc, SDBList &sdbs)
 L1R-capable version. More...
 

Protected Member Functions

SDBListsdbs ()
 Access to fundamental external objects: More...
 
VisEquationve ()
 
SolvableVisCalsvc ()
 
int & maxIter ()
 Access to maxIter_. More...
 
double & chiSq ()
 Access to chi2. More...
 
casacore::Vector< double > & chiSqV ()
 
double & lastChiSq ()
 
double & dChiSq ()
 
double & sumWt ()
 
casacore::Vector< double > & sumWtV ()
 
int & nWt ()
 
int & nPar ()
 Access to parameters, & grad,hess,dp. More...
 
casacore::Vector
< casacore::Complex > & 
par ()
 
casacore::Vector< bool > & parOK ()
 
casacore::Vector< float > & parErr ()
 
casacore::Vector
< casacore::DComplex > & 
grad ()
 
casacore::Vector< double > & hess ()
 
casacore::Vector
< casacore::Complex > & 
dpar ()
 
casacore::Vector
< casacore::Complex > & 
lastPar ()
 
double & lambda ()
 
void initSolve ()
 Initialize solving data. More...
 
void residualate2 ()
 Obtain trial residuals w.r.t svc's current pars. More...
 
void differentiate2 ()
 Differentiate w.r.t svc's pars. More...
 
void chiSquare2 ()
 Calculate residuals (incl. More...
 
void RMSThresh (casacore::Int RejIter)
 Apply RMS threshold to current residuals. More...
 
bool converged ()
 Check for convergence. More...
 
void accGradHess2 ()
 Internal solving methods. More...
 
void revert ()
 
void solveGradHess ()
 
void updatePar ()
 
void optStepSize2 ()
 Optimize the step parabolically. More...
 
void getErrors ()
 Get and print par errors. More...
 
void printPar (const int &iter)
 

Private Member Functions

int & prtlev ()
 Diagnostic print level. More...
 

Private Attributes

SDBListSDBs_
 VisBuffer (from outside) More...
 
VisEquationve_
 VisEquation (from outside) More...
 
SolvableVisCalsvc_
 SVC (from outside) More...
 
int nPar_
 Total Number of parameters. More...
 
int maxIter_
 Maximum number of solve iterations to attempt. More...
 
double chiSq_
 Chi2, sum wts. More...
 
casacore::Vector< double > chiSqV_
 
double lastChiSq_
 
double dChiSq_
 
double sumWt_
 
casacore::Vector< double > sumWtV_
 
int nWt_
 
int cvrgcount_
 
casacore::Vector
< casacore::Complex > 
par_
 Parameter storage (these are casacore::Complex to match the VisCal solvePar) More...
 
casacore::Vector< bool > parOK_
 
casacore::Vector< float > parErr_
 
casacore::Vector
< casacore::Complex > 
lastPar_
 
casacore::Vector
< casacore::Complex > 
dpar_
 Parameter update. More...
 
casacore::Vector
< casacore::DComplex > 
grad_
 Gradient, Hessian (these are double for precision in accumulation. More...
 
casacore::Vector< double > hess_
 
double lambda_
 LM factor. More...
 
bool optstep_
 Step optimization toggle. More...
 
bool doL1_
 Control L1 solution. More...
 
casacore::Vector< casacore::FloatL1clamp_
 
bool doRMSThresh_
 Control iterative rejection. More...
 
casacore::Vector< casacore::FloatRMSThresh_
 
int nRMSThresh_
 
int prtlev_
 Diagnostic print level. More...
 

Detailed Description

VisCalSolver2: 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

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

VisCalSolver2

Definition at line 93 of file VisCalSolver2.h.

Constructor & Destructor Documentation

casa::VisCalSolver2::VisCalSolver2 ( )

Constructor.

casa::VisCalSolver2::VisCalSolver2 ( casacore::String  solmode,
casacore::Vector< casacore::Float > &  rmsthresh 
)
casa::VisCalSolver2::~VisCalSolver2 ( )

Destructor.

Member Function Documentation

void casa::VisCalSolver2::accGradHess2 ( )
protected

Internal solving methods.

double& casa::VisCalSolver2::chiSq ( )
inlineprotected

Access to chi2.

Definition at line 121 of file VisCalSolver2.h.

References chiSq_.

void casa::VisCalSolver2::chiSquare2 ( )
protected

Calculate residuals (incl.

diff'd) and chi2

casacore::Vector<double>& casa::VisCalSolver2::chiSqV ( )
inlineprotected

Definition at line 122 of file VisCalSolver2.h.

References chiSqV_.

bool casa::VisCalSolver2::converged ( )
protected

Check for convergence.

double& casa::VisCalSolver2::dChiSq ( )
inlineprotected

Definition at line 124 of file VisCalSolver2.h.

References dChiSq_.

void casa::VisCalSolver2::differentiate2 ( )
protected

Differentiate w.r.t svc's pars.

casacore::Vector<casacore::Complex>& casa::VisCalSolver2::dpar ( )
inlineprotected

Definition at line 136 of file VisCalSolver2.h.

References dpar_.

void casa::VisCalSolver2::getErrors ( )
protected

Get and print par errors.

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

Definition at line 134 of file VisCalSolver2.h.

References grad_.

casacore::Vector<double>& casa::VisCalSolver2::hess ( )
inlineprotected

Definition at line 135 of file VisCalSolver2.h.

References hess_.

void casa::VisCalSolver2::initSolve ( )
protected

Initialize solving data.

double& casa::VisCalSolver2::lambda ( )
inlineprotected

Definition at line 139 of file VisCalSolver2.h.

References lambda_.

double& casa::VisCalSolver2::lastChiSq ( )
inlineprotected

Definition at line 123 of file VisCalSolver2.h.

References lastChiSq_.

casacore::Vector<casacore::Complex>& casa::VisCalSolver2::lastPar ( )
inlineprotected

Definition at line 137 of file VisCalSolver2.h.

References lastPar_.

int& casa::VisCalSolver2::maxIter ( )
inlineprotected

Access to maxIter_.

Definition at line 118 of file VisCalSolver2.h.

References maxIter_.

int& casa::VisCalSolver2::nPar ( )
inlineprotected

Access to parameters, & grad,hess,dp.

Definition at line 130 of file VisCalSolver2.h.

References nPar_.

int& casa::VisCalSolver2::nWt ( )
inlineprotected

Definition at line 127 of file VisCalSolver2.h.

References nWt_.

void casa::VisCalSolver2::optStepSize2 ( )
protected

Optimize the step parabolically.

casacore::Vector<casacore::Complex>& casa::VisCalSolver2::par ( )
inlineprotected

Definition at line 131 of file VisCalSolver2.h.

References par_.

casacore::Vector<float>& casa::VisCalSolver2::parErr ( )
inlineprotected

Definition at line 133 of file VisCalSolver2.h.

References parErr_.

casacore::Vector<bool>& casa::VisCalSolver2::parOK ( )
inlineprotected

Definition at line 132 of file VisCalSolver2.h.

References parOK_.

void casa::VisCalSolver2::printPar ( const int &  iter)
protected
int& casa::VisCalSolver2::prtlev ( )
inlineprivate

Diagnostic print level.

Definition at line 176 of file VisCalSolver2.h.

void casa::VisCalSolver2::residualate2 ( )
protected

Obtain trial residuals w.r.t svc's current pars.

void casa::VisCalSolver2::revert ( )
protected
void casa::VisCalSolver2::RMSThresh ( casacore::Int  RejIter)
protected

Apply RMS threshold to current residuals.

SDBList& casa::VisCalSolver2::sdbs ( )
inlineprotected

Access to fundamental external objects:

Definition at line 113 of file VisCalSolver2.h.

References SDBs_.

bool casa::VisCalSolver2::solve ( VisEquation viseq,
SolvableVisCal svc,
SDBList sdbs 
)

Do the solve.

void casa::VisCalSolver2::solveGradHess ( )
protected
bool casa::VisCalSolver2::solveL1R ( VisEquation viseq,
SolvableVisCal svc,
SDBList sdbs 
)

L1R-capable version.

double& casa::VisCalSolver2::sumWt ( )
inlineprotected

Definition at line 125 of file VisCalSolver2.h.

References sumWt_.

casacore::Vector<double>& casa::VisCalSolver2::sumWtV ( )
inlineprotected

Definition at line 126 of file VisCalSolver2.h.

References sumWtV_.

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

Definition at line 115 of file VisCalSolver2.h.

References svc_.

void casa::VisCalSolver2::updatePar ( )
protected
VisEquation& casa::VisCalSolver2::ve ( )
inlineprotected

Definition at line 114 of file VisCalSolver2.h.

References ve_.

Member Data Documentation

double casa::VisCalSolver2::chiSq_
private

Chi2, sum wts.

Definition at line 194 of file VisCalSolver2.h.

Referenced by chiSq().

casacore::Vector<double> casa::VisCalSolver2::chiSqV_
private

Definition at line 195 of file VisCalSolver2.h.

Referenced by chiSqV().

int casa::VisCalSolver2::cvrgcount_
private

Definition at line 201 of file VisCalSolver2.h.

double casa::VisCalSolver2::dChiSq_
private

Definition at line 197 of file VisCalSolver2.h.

Referenced by dChiSq().

bool casa::VisCalSolver2::doL1_
private

Control L1 solution.

Definition at line 225 of file VisCalSolver2.h.

bool casa::VisCalSolver2::doRMSThresh_
private

Control iterative rejection.

Definition at line 229 of file VisCalSolver2.h.

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

Parameter update.

Definition at line 211 of file VisCalSolver2.h.

Referenced by dpar().

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

Gradient, Hessian (these are double for precision in accumulation.

Definition at line 215 of file VisCalSolver2.h.

Referenced by grad().

casacore::Vector<double> casa::VisCalSolver2::hess_
private

Definition at line 216 of file VisCalSolver2.h.

Referenced by hess().

casacore::Vector<casacore::Float> casa::VisCalSolver2::L1clamp_
private

Definition at line 226 of file VisCalSolver2.h.

double casa::VisCalSolver2::lambda_
private

LM factor.

Definition at line 219 of file VisCalSolver2.h.

Referenced by lambda().

double casa::VisCalSolver2::lastChiSq_
private

Definition at line 196 of file VisCalSolver2.h.

Referenced by lastChiSq().

casacore::Vector<casacore::Complex> casa::VisCalSolver2::lastPar_
private

Definition at line 208 of file VisCalSolver2.h.

Referenced by lastPar().

int casa::VisCalSolver2::maxIter_
private

Maximum number of solve iterations to attempt.

Definition at line 191 of file VisCalSolver2.h.

Referenced by maxIter().

int casa::VisCalSolver2::nPar_
private

Total Number of parameters.

Definition at line 188 of file VisCalSolver2.h.

Referenced by nPar().

int casa::VisCalSolver2::nRMSThresh_
private

Definition at line 231 of file VisCalSolver2.h.

int casa::VisCalSolver2::nWt_
private

Definition at line 200 of file VisCalSolver2.h.

Referenced by nWt().

bool casa::VisCalSolver2::optstep_
private

Step optimization toggle.

Definition at line 222 of file VisCalSolver2.h.

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

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

Definition at line 205 of file VisCalSolver2.h.

Referenced by par().

casacore::Vector<float> casa::VisCalSolver2::parErr_
private

Definition at line 207 of file VisCalSolver2.h.

Referenced by parErr().

casacore::Vector<bool> casa::VisCalSolver2::parOK_
private

Definition at line 206 of file VisCalSolver2.h.

Referenced by parOK().

int casa::VisCalSolver2::prtlev_
private

Diagnostic print level.

Definition at line 234 of file VisCalSolver2.h.

casacore::Vector<casacore::Float> casa::VisCalSolver2::RMSThresh_
private

Definition at line 230 of file VisCalSolver2.h.

SDBList* casa::VisCalSolver2::SDBs_
private

VisBuffer (from outside)

Definition at line 176 of file VisCalSolver2.h.

Referenced by sdbs().

double casa::VisCalSolver2::sumWt_
private

Definition at line 198 of file VisCalSolver2.h.

Referenced by sumWt().

casacore::Vector<double> casa::VisCalSolver2::sumWtV_
private

Definition at line 199 of file VisCalSolver2.h.

Referenced by sumWtV().

SolvableVisCal* casa::VisCalSolver2::svc_
private

SVC (from outside)

Definition at line 185 of file VisCalSolver2.h.

Referenced by svc().

VisEquation* casa::VisCalSolver2::ve_
private

VisEquation (from outside)

Definition at line 182 of file VisCalSolver2.h.

Referenced by ve().


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