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


VisCal More...

#include <VisCal.h>

Inheritance diagram for casa::VisCal:
casa::SolvableVisCal casa::VisMueller casa::SolvableVisMueller casa::SolvableVisMueller casa::VisJones casa::ANoise casa::MMueller casa::SolvableVisJones casa::XMueller casa::ANoise casa::MMueller casa::SolvableVisJones casa::XMueller casa::PJones casa::SolvableVisJones

List of all members.

Public Types

enum  Type {
  Test,
  ANoise,
  M,
  KAntPos,
  K,
  B,
  G,
  J,
  D,
  X,
  C,
  P,
  E,
  T,
  F,
  A,
  ALL
}
 Allowed types of VisCal matrices - 'correct' order enum Type{UVMOD,Mf,M,K,B,G,D,C,E,P,T,EP,F};. More...
enum  ParType {
  Co,
  Re,
  CoRe
}
 Enumeration of parameter types (Complex, Real, or Both) More...

Public Member Functions

 VisCal (VisSet &vs)
 VisCal (const Int &nAnt)
virtual ~VisCal ()
virtual Type type ()=0
 Return the type of this calibration matrix (actual type of derived class).
virtual String typeName ()
 Return type name as string.
virtual String longTypeName ()
virtual VisCalEnum::MatrixType matrixType ()
 Return Matrix type.
virtual VisCalEnum::VCParType parType ()
 Return the parameter type (nominally complex)
virtual Int nPar ()=0
 Number of pars per ant/bln (Must be implemented in specializations!)
virtual Vector< BoolspwOK ()
 Report calibration availability per spw (always True for non-tabular?)
virtual Bool spwOK (Int)
virtual Bool freqDepPar ()
 Frequency-dependent Parameters? Nominally not.
const IntnChanPar () const
 Number of par channels in current spw.
virtual Bool freqDepMat ()
 Frequency-dependent Matrices? Nominally same as freqDepPar.
virtual Bool timeDepMat ()
 Matrices time-dependent per parameter set (nominally no)
Bool isApplied ()
 Is this calibration matrix to be applied?
virtual Bool isSolvable ()
 Is this solveable? (never via this interface)
virtual Doubleinterval ()
 Return the time interval over which this calibration is constant.
virtual void setApply ()
 Set the application parameters.
virtual void setApply (const Record &apply)
virtual String applyinfo ()
 Apply info/params, suitable for logging.
virtual String siminfo ()
 simulation params - for a VC, sim is apply; for a SVC this will get overriden
BoolcalWt ()
 Trigger calibration of weights.
virtual void correct (VisBuffer &vb, Bool trial=False)
 Apply calibration to data in VisBuffer (correct Data or corrupt Model) (in-place versions)
virtual void corrupt (VisBuffer &vb)
 virtual void corrupt(VisBuffer& vb);
virtual void correct (VisBuffer &vb, Cube< Complex > &Vout, Bool trial=False)
 Apply calibration to data in VisBuffer; (alternate output versions)
virtual void corrupt (VisBuffer &vb, Cube< Complex > &Mout)
 virtual void corrupt(VisBuffer& vb, Cube<Complex>& Mout);
virtual void initCalFlagCount ()
 Flag counting.
virtual Record actionRec ()
virtual void state ()
 Report the state.
virtual void currMetaNote ()
void setPrtlev (const Int &prtlev)
 Set the print level.
Int blnidx (const Int &a1, const Int &a2)
 Baseline index from antenna indices: (assumes a1<=a2 !!)
StringextraTag ()

Static Public Member Functions

static String nameOfType (Type type)

Protected Member Functions

void setApplied (const Bool &flag)
 Set applied state flag.
StringmsName ()
IntnSpw ()
 General Shape Info.
IntnAnt ()
IntnBln ()
virtual IntnElem ()=0
 The number of sets of parameters under consideration.
virtual Int nCalMat ()=0
 Number of Calibration matrices on ant/bln axis.
const VisBuffervb ()
 Access to current vb.
IntcurrSpw ()
 Current in-focus spw.
DoublelastTime ()
 Current coords.
DoublecurrTime ()
IntcurrScan ()
IntcurrObs ()
IntcurrField ()
Vector< Double > & currFreq ()
DoublerefTime ()
DoublerefFreq ()
IntnChanPar ()
 Current spectral shapes.
IntnChanMat ()
IntstartChan ()
Vector< Int > & nChanParList ()
Vector< Int > & nChanMatList ()
Vector< Int > & startChanList ()
VisVectorV ()
 Access to matrix renderings of Visibilities.
virtual Cube< Complex > & currCPar ()
 Access to current solution parameters and matrices.
virtual Cube< Float > & currRPar ()
virtual Cube< Bool > & currParOK ()
void invalidateP ()
 Validation of calibration parameters.
void validateP ()
Bool PValid ()
virtual void invalidateCalMat ()=0
 Invalidate cal matrices generically.
Matrix< Float > & currWtScale ()
 Access to weight-scaling factors.
virtual void countInFlag (const VisBuffer &vb)
 Flag counting.
virtual void countOutFlag (const VisBuffer &vb)
virtual void applyCal (VisBuffer &vb, Cube< Complex > &Vout, Bool trial=False)=0
 Row-by-row apply to a Cube<Complex> (generic)
virtual void syncCal (const VisBuffer &vb, const Bool &doInv=False)
 Synchronize "gains" with a VisBuffer or another VisCal.
virtual void syncCal (VisCal &vc)
void syncMeta (const VisBuffer &vb)
 Set internal meta data from a VisBuffer or another VisCal.
void syncMeta (VisCal &vc)
void syncMeta (const Int &spw, const Double &time, const Int &field, const Vector< Double > &freq, const Int &nchan)
void setCalChannelization (const Int &nChanDat)
 Set the calibration matrix channelization.
void checkCurrCal ()
 Test for need of new calibration.
virtual void syncCal (const Bool &doInv=False)
 Synchronize "gains" with current meta-data.
virtual void syncPar ()
 Sync parameters for current meta data.
virtual void calcPar ()
 Calculate Mueller parameters by some means.
virtual void syncCalMat (const Bool &doInv=False)=0
 Sync matrices generically for current meta data.
Intprtlev ()
 Return print (cout) level.
void setCurrField (const Int &ifld)
 set current field index vector to given field id

Private Member Functions

 VisCal ()
 Defalt ctor is private.
void initVisCal ()
 Initialize pointers, etc.
void deleteVisCal ()
 Delete pointers.

Private Attributes

String msName_
 Associated MS name.
Int nSpw_
 Number of Spectral windows.
Int nAnt_
 Number of antennas.
Int nBln_
 Number of baselines.
const VisBuffervb_
 Pointer to the current vb.
Int currSpw_
 Current synchronized spw.
Vector< DoublecurrTime_
 Current indices.
Vector< IntcurrScan_
Vector< IntcurrObs_
Vector< IntcurrField_
Vector< DoublecurrFreq_
Vector< DoublelastTime_
Double refTime_
Double refFreq_
Vector< IntnChanPar_
 Channel counts.
Vector< IntnChanMat_
Vector< IntstartChan_
Double interval_
 Solution timescale (context-dependent)
Bool applied_
 Application flag.
Int focusChan_
 In-focus channel for single-chan solves on multi-chan data.
PtrBlock< VisVector * > V_
 VisVector wrapper (per Spw)
PtrBlock< Cube< Complex > * > currCPar_
 Current parameters.
PtrBlock< Cube< Float > * > currRPar_
PtrBlock< Cube< Bool > * > currParOK_
Vector< BoolPValid_
 Paremeter validity.
Bool calWt_
 Trigger calibration of weights.
PtrBlock< Matrix< Float > * > currWtScale_
 Weight scale factors.
Int64 ndataIn_
 Flag counting.
Int64 nflagIn_
Int64 nflagOut_
Int prtlev_
 Print level.
String extratag_

Friends

class SolvableVisJones

Detailed Description


VisCal

 

Definition at line 51 of file VisCal.h.


Member Enumeration Documentation

Enumeration of parameter types (Complex, Real, or Both)

Enumerator:
Co 
Re 
CoRe 

Definition at line 62 of file VisCal.h.

Allowed types of VisCal matrices - 'correct' order enum Type{UVMOD,Mf,M,K,B,G,D,C,E,P,T,EP,F};.

Enumerator:
Test 
ANoise 
M 
KAntPos 
K 
B 
G 
J 
D 
X 
C 
P 
E 
T 
F 
A 
ALL 

Definition at line 59 of file VisCal.h.


Constructor & Destructor Documentation

casa::VisCal::VisCal ( const Int nAnt)
virtual casa::VisCal::~VisCal ( ) [virtual]
casa::VisCal::VisCal ( ) [private]

Defalt ctor is private.


Member Function Documentation

virtual Record casa::VisCal::actionRec ( ) [virtual]

Reimplemented in casa::SolvableVisCal.

virtual void casa::VisCal::applyCal ( VisBuffer vb,
Cube< Complex > &  Vout,
Bool  trial = False 
) [protected, pure virtual]

Row-by-row apply to a Cube<Complex> (generic)

Implemented in casa::VisJones, casa::VisMueller, casa::AMueller, and casa::EVLASwPow.

virtual String casa::VisCal::applyinfo ( ) [virtual]

Apply info/params, suitable for logging.

Reimplemented in casa::TOpac, and casa::SolvableVisCal.

Referenced by siminfo().

Int casa::VisCal::blnidx ( const Int a1,
const Int a2 
) [inline]

Baseline index from antenna indices: (assumes a1<=a2 !!)

Definition at line 171 of file VisCal.h.

References nAnt().

virtual void casa::VisCal::calcPar ( ) [protected, virtual]
Bool& casa::VisCal::calWt ( ) [inline]

Trigger calibration of weights.

Definition at line 145 of file VisCal.h.

References calWt_.

void casa::VisCal::checkCurrCal ( ) [protected]

Test for need of new calibration.

virtual void casa::VisCal::correct ( VisBuffer vb,
Bool  trial = False 
) [virtual]

Apply calibration to data in VisBuffer (correct Data or corrupt Model) (in-place versions)

virtual void casa::VisCal::correct ( VisBuffer vb,
Cube< Complex > &  Vout,
Bool  trial = False 
) [virtual]

Apply calibration to data in VisBuffer; (alternate output versions)

virtual void casa::VisCal::corrupt ( VisBuffer vb) [virtual]

virtual void corrupt(VisBuffer& vb);

Reimplemented in casa::AMueller.

virtual void casa::VisCal::corrupt ( VisBuffer vb,
Cube< Complex > &  Mout 
) [virtual]
virtual void casa::VisCal::countInFlag ( const VisBuffer vb) [protected, virtual]

Flag counting.

virtual void casa::VisCal::countOutFlag ( const VisBuffer vb) [protected, virtual]
virtual Cube<Complex>& casa::VisCal::currCPar ( ) [inline, protected, virtual]

Access to current solution parameters and matrices.

Definition at line 223 of file VisCal.h.

References currCPar_, and currSpw().

Int& casa::VisCal::currField ( ) [inline, protected]

Definition at line 205 of file VisCal.h.

References currField_, and currSpw().

Vector<Double>& casa::VisCal::currFreq ( ) [inline, protected]

Definition at line 206 of file VisCal.h.

References currFreq_.

virtual void casa::VisCal::currMetaNote ( ) [virtual]

Reimplemented in casa::SolvableVisCal.

Int& casa::VisCal::currObs ( ) [inline, protected]

Definition at line 204 of file VisCal.h.

References currObs_, and currSpw().

virtual Cube<Bool>& casa::VisCal::currParOK ( ) [inline, protected, virtual]

Definition at line 225 of file VisCal.h.

References currParOK_, and currSpw().

virtual Cube<Float>& casa::VisCal::currRPar ( ) [inline, protected, virtual]

Definition at line 224 of file VisCal.h.

References currRPar_, and currSpw().

Int& casa::VisCal::currScan ( ) [inline, protected]

Definition at line 203 of file VisCal.h.

References currScan_, and currSpw().

Int& casa::VisCal::currSpw ( ) [inline, protected]
Double& casa::VisCal::currTime ( ) [inline, protected]

Definition at line 202 of file VisCal.h.

References currSpw(), and currTime_.

Matrix<Float>& casa::VisCal::currWtScale ( ) [inline, protected]

Access to weight-scaling factors.

Definition at line 236 of file VisCal.h.

References currSpw(), and currWtScale_.

void casa::VisCal::deleteVisCal ( ) [private]

Delete pointers.

Definition at line 174 of file VisCal.h.

References extratag_.

virtual Bool casa::VisCal::freqDepMat ( ) [inline, virtual]

Frequency-dependent Matrices? Nominally same as freqDepPar.

Reimplemented in casa::AMueller, and casa::KJones.

Definition at line 119 of file VisCal.h.

References freqDepPar().

virtual Bool casa::VisCal::freqDepPar ( ) [inline, virtual]
virtual void casa::VisCal::initCalFlagCount ( ) [virtual]

Flag counting.

void casa::VisCal::initVisCal ( ) [private]

Initialize pointers, etc.

virtual Double& casa::VisCal::interval ( ) [inline, virtual]

Return the time interval over which this calibration is constant.

Definition at line 131 of file VisCal.h.

References interval_.

virtual void casa::VisCal::invalidateCalMat ( ) [protected, pure virtual]

Invalidate cal matrices generically.

Implemented in casa::VisJones, and casa::VisMueller.

void casa::VisCal::invalidateP ( ) [inline, protected]

Validation of calibration parameters.

Definition at line 228 of file VisCal.h.

References currSpw(), casa::False, and PValid_.

Is this calibration matrix to be applied?

Definition at line 125 of file VisCal.h.

References applied_.

virtual Bool casa::VisCal::isSolvable ( ) [inline, virtual]

Is this solveable? (never via this interface)

Reimplemented in casa::ANoise, and casa::SolvableVisCal.

Definition at line 128 of file VisCal.h.

References casa::False.

Double& casa::VisCal::lastTime ( ) [inline, protected]

Current coords.

Definition at line 201 of file VisCal.h.

References currSpw(), and lastTime_.

virtual String casa::VisCal::longTypeName ( ) [inline, virtual]
virtual VisCalEnum::MatrixType casa::VisCal::matrixType ( ) [inline, virtual]

Return Matrix type.

Reimplemented in casa::VisJones, and casa::VisMueller.

Definition at line 98 of file VisCal.h.

References casa::VisCalEnum::GLOBAL.

String& casa::VisCal::msName ( ) [inline, protected]

Definition at line 181 of file VisCal.h.

References msName_.

static String casa::VisCal::nameOfType ( Type  type) [inline, static]

Definition at line 64 of file VisCal.h.

References A, B, C, D, E, F, J, K, M, P, T, and X.

Int& casa::VisCal::nAnt ( ) [inline, protected]
Int& casa::VisCal::nBln ( ) [inline, protected]
virtual Int casa::VisCal::nCalMat ( ) [protected, pure virtual]

Number of Calibration matrices on ant/bln axis.

Implemented in casa::SolvableVisJones, casa::SolvableVisMueller, casa::VisJones, and casa::VisMueller.

Int& casa::VisCal::nChanMat ( ) [inline, protected]

Definition at line 213 of file VisCal.h.

References currSpw_, and nChanMat_.

Vector<Int>& casa::VisCal::nChanMatList ( ) [inline, protected]

Definition at line 216 of file VisCal.h.

References nChanMat_.

const Int& casa::VisCal::nChanPar ( ) const [inline]

Number of par channels in current spw.

Definition at line 116 of file VisCal.h.

References currSpw_, and nChanPar_.

Referenced by casa::AMueller::freqDepMat().

Int& casa::VisCal::nChanPar ( ) [inline, protected]

Current spectral shapes.

Definition at line 212 of file VisCal.h.

References currSpw_, and nChanPar_.

Vector<Int>& casa::VisCal::nChanParList ( ) [inline, protected]

Definition at line 215 of file VisCal.h.

References nChanPar_.

virtual Int& casa::VisCal::nElem ( ) [protected, pure virtual]

The number of sets of parameters under consideration.

Implemented in casa::VisJones, and casa::VisMueller.

virtual Int casa::VisCal::nPar ( ) [pure virtual]
Int& casa::VisCal::nSpw ( ) [inline, protected]

General Shape Info.

Definition at line 184 of file VisCal.h.

References nSpw_.

Referenced by spwOK().

virtual VisCalEnum::VCParType casa::VisCal::parType ( ) [inline, virtual]

Return the parameter type (nominally complex)

Reimplemented in casa::TOpac, casa::LJJones, casa::EPJones, casa::EVLASwPow, casa::StandardTsys, casa::EGainCurve, and casa::KJones.

Definition at line 101 of file VisCal.h.

References casa::VisCalEnum::COMPLEX.

Int& casa::VisCal::prtlev ( ) [inline, protected]

Return print (cout) level.

Definition at line 279 of file VisCal.h.

References prtlev_.

Referenced by setPrtlev().

Bool casa::VisCal::PValid ( ) [inline, protected]

Definition at line 230 of file VisCal.h.

References currSpw(), and PValid_.

Double& casa::VisCal::refFreq ( ) [inline, protected]

Definition at line 209 of file VisCal.h.

References refFreq_.

Double& casa::VisCal::refTime ( ) [inline, protected]

Definition at line 208 of file VisCal.h.

References refTime_.

void casa::VisCal::setApplied ( const Bool flag) [inline, protected]

Set applied state flag.

Definition at line 179 of file VisCal.h.

References applied_.

virtual void casa::VisCal::setApply ( ) [virtual]

Set the application parameters.

Reimplemented in casa::SolvableVisCal, and casa::AMueller.

virtual void casa::VisCal::setApply ( const Record apply) [virtual]
void casa::VisCal::setCalChannelization ( const Int nChanDat) [protected]

Set the calibration matrix channelization.

void casa::VisCal::setCurrField ( const Int ifld) [protected]

set current field index vector to given field id

void casa::VisCal::setPrtlev ( const Int prtlev) [inline]

Set the print level.

Definition at line 168 of file VisCal.h.

References prtlev(), and prtlev_.

virtual String casa::VisCal::siminfo ( ) [inline, virtual]

simulation params - for a VC, sim is apply; for a SVC this will get overriden

Reimplemented in casa::SolvableVisCal.

Definition at line 142 of file VisCal.h.

References applyinfo().

virtual Vector<Bool> casa::VisCal::spwOK ( ) [inline, virtual]

Report calibration availability per spw (always True for non-tabular?)

Reimplemented in casa::EGainCurve.

Definition at line 109 of file VisCal.h.

References nSpw(), and casa::True.

virtual Bool casa::VisCal::spwOK ( Int  ) [inline, virtual]

Reimplemented in casa::SolvableVisCal.

Definition at line 110 of file VisCal.h.

References casa::True.

Int& casa::VisCal::startChan ( ) [inline, protected]

Definition at line 214 of file VisCal.h.

References currSpw_, and startChan_.

Vector<Int>& casa::VisCal::startChanList ( ) [inline, protected]

Definition at line 217 of file VisCal.h.

References startChan_.

virtual void casa::VisCal::state ( ) [virtual]
virtual void casa::VisCal::syncCal ( const VisBuffer vb,
const Bool doInv = False 
) [protected, virtual]

Synchronize "gains" with a VisBuffer or another VisCal.

virtual void casa::VisCal::syncCal ( VisCal vc) [protected, virtual]
virtual void casa::VisCal::syncCal ( const Bool doInv = False) [protected, virtual]

Synchronize "gains" with current meta-data.

virtual void casa::VisCal::syncCalMat ( const Bool doInv = False) [protected, pure virtual]

Sync matrices generically for current meta data.

Implemented in casa::VisJones, casa::VisMueller, and casa::AMueller.

void casa::VisCal::syncMeta ( const VisBuffer vb) [protected]

Set internal meta data from a VisBuffer or another VisCal.

void casa::VisCal::syncMeta ( VisCal vc) [protected]
void casa::VisCal::syncMeta ( const Int spw,
const Double time,
const Int field,
const Vector< Double > &  freq,
const Int nchan 
) [protected]
virtual void casa::VisCal::syncPar ( ) [protected, virtual]

Sync parameters for current meta data.

virtual Bool casa::VisCal::timeDepMat ( ) [inline, virtual]

Matrices time-dependent per parameter set (nominally no)

Reimplemented in casa::KAntPosJones, and casa::ANoise.

Definition at line 122 of file VisCal.h.

References casa::False.

virtual Type casa::VisCal::type ( ) [pure virtual]
virtual String casa::VisCal::typeName ( ) [inline, virtual]
VisVector& casa::VisCal::V ( ) [inline, protected]

Access to matrix renderings of Visibilities.

Definition at line 220 of file VisCal.h.

References currSpw(), and V_.

void casa::VisCal::validateP ( ) [inline, protected]

Definition at line 229 of file VisCal.h.

References currSpw(), PValid_, and casa::True.

const VisBuffer& casa::VisCal::vb ( ) [inline, protected]

Access to current vb.

Definition at line 195 of file VisCal.h.

References vb_.


Friends And Related Function Documentation

friend class SolvableVisJones [friend]

Reimplemented in casa::VisJones.

Definition at line 53 of file VisCal.h.


Member Data Documentation

Application flag.

Definition at line 331 of file VisCal.h.

Referenced by isApplied(), and setApplied().

Trigger calibration of weights.

Definition at line 348 of file VisCal.h.

Referenced by calWt().

PtrBlock<Cube<Complex>*> casa::VisCal::currCPar_ [private]

Current parameters.

Definition at line 340 of file VisCal.h.

Referenced by currCPar().

Definition at line 317 of file VisCal.h.

Referenced by currField().

Definition at line 318 of file VisCal.h.

Referenced by currFreq().

Definition at line 316 of file VisCal.h.

Referenced by currObs().

Definition at line 342 of file VisCal.h.

Referenced by currParOK().

Definition at line 341 of file VisCal.h.

Referenced by currRPar().

Definition at line 315 of file VisCal.h.

Referenced by currScan().

Current synchronized spw.

Definition at line 311 of file VisCal.h.

Referenced by currSpw(), nChanMat(), nChanPar(), and startChan().

Current indices.

Definition at line 314 of file VisCal.h.

Referenced by currTime().

Weight scale factors.

Definition at line 351 of file VisCal.h.

Referenced by currWtScale().

Definition at line 359 of file VisCal.h.

Referenced by extraTag().

In-focus channel for single-chan solves on multi-chan data.

Reimplemented in casa::SolvableVisCal.

Definition at line 334 of file VisCal.h.

Solution timescale (context-dependent)

Definition at line 328 of file VisCal.h.

Referenced by interval().

Definition at line 319 of file VisCal.h.

Referenced by lastTime().

Associated MS name.

Definition at line 296 of file VisCal.h.

Referenced by msName().

Number of antennas.

Definition at line 302 of file VisCal.h.

Referenced by nAnt().

Number of baselines.

Definition at line 305 of file VisCal.h.

Referenced by nBln().

Definition at line 324 of file VisCal.h.

Referenced by nChanMat(), and nChanMatList().

Channel counts.

Definition at line 324 of file VisCal.h.

Referenced by nChanPar(), and nChanParList().

Flag counting.

Definition at line 354 of file VisCal.h.

Definition at line 354 of file VisCal.h.

Definition at line 354 of file VisCal.h.

Number of Spectral windows.

Definition at line 299 of file VisCal.h.

Referenced by nSpw().

Print level.

Definition at line 357 of file VisCal.h.

Referenced by prtlev(), and setPrtlev().

Paremeter validity.

Definition at line 345 of file VisCal.h.

Referenced by invalidateP(), PValid(), and validateP().

Definition at line 321 of file VisCal.h.

Referenced by refFreq().

Definition at line 320 of file VisCal.h.

Referenced by refTime().

Definition at line 325 of file VisCal.h.

Referenced by startChan(), and startChanList().

VisVector wrapper (per Spw)

Definition at line 337 of file VisCal.h.

Referenced by V().

const VisBuffer* casa::VisCal::vb_ [private]

Pointer to the current vb.

Definition at line 308 of file VisCal.h.

Referenced by vb().


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