DP3
Public Types | Public Member Functions | List of all members
dp3::base::GainCalAlgorithm Class Reference

DPPP step class to apply a calibration correction to the data. More...

#include <GainCalAlgorithm.h>

Public Types

enum  Mode { DEFAULT , PHASEONLY , AMPLITUDEONLY , FULLJONES }
 
enum  Status { CONVERGED = 1 , NOTCONVERGED = 2 , STALLED = 3 , FAILED = 4 }
 

Public Member Functions

 GainCalAlgorithm (unsigned int solInt, unsigned int nChan, Mode mode, bool scalar, double tolerance, unsigned int maxAntennas, bool detectStalling, unsigned int debugLevel)
 mode can be "diagonal", "fulljones", "phaseonly", "scalarphase" More...
 
void clearStationFlagged ()
 Clear antFlagged. More...
 
Status doStep (unsigned int iter, aocommon::RecursiveFor &recursive_for)
 
casacore::Array< std::complex< double > > & getMVis ()
 Returns a reference to the model visibility matrix. More...
 
casacore::Matrix< std::complex< double > > getSolution (bool setNaNs)
 
casacore::Vector< bool > & getStationFlagged ()
 
casacore::Array< std::complex< double > > & getVis ()
 Returns a reference to the visibility matrix. More...
 
double getWeight ()
 
void incrementWeight (float weight)
 Increments the weight (only relevant for TEC-fitting) More...
 
void init (bool initSolutions)
 
unsigned int nCr ()
 Number of correlations (1 or 4) More...
 
unsigned int numCorrelations ()
 Number of correlations in the solution (1,2 or 4) More...
 
void resetVis ()
 Sets visibility matrices to zero. More...
 

Detailed Description

DPPP step class to apply a calibration correction to the data.

Member Enumeration Documentation

◆ Mode

Enumerator
DEFAULT 
PHASEONLY 
AMPLITUDEONLY 
FULLJONES 

◆ Status

Enumerator
CONVERGED 
NOTCONVERGED 
STALLED 
FAILED 

Constructor & Destructor Documentation

◆ GainCalAlgorithm()

dp3::base::GainCalAlgorithm::GainCalAlgorithm ( unsigned int  solInt,
unsigned int  nChan,
Mode  mode,
bool  scalar,
double  tolerance,
unsigned int  maxAntennas,
bool  detectStalling,
unsigned int  debugLevel 
)

mode can be "diagonal", "fulljones", "phaseonly", "scalarphase"

Member Function Documentation

◆ clearStationFlagged()

void dp3::base::GainCalAlgorithm::clearStationFlagged ( )

Clear antFlagged.

◆ doStep()

Status dp3::base::GainCalAlgorithm::doStep ( unsigned int  iter,
aocommon::RecursiveFor &  recursive_for 
)

Perform an iteration of gaincal. Returns CONVERGED, NOTCONVERGED or STALLED

◆ getMVis()

casacore::Array<std::complex<double> >& dp3::base::GainCalAlgorithm::getMVis ( )
inline

Returns a reference to the model visibility matrix.

◆ getSolution()

casacore::Matrix<std::complex<double> > dp3::base::GainCalAlgorithm::getSolution ( bool  setNaNs)

Returns the solution. The return matrix has a length of maxAntennas, which is zero for antennas for which no solution was computed. The mapping is stored in the antenna map

◆ getStationFlagged()

casacore::Vector<bool>& dp3::base::GainCalAlgorithm::getStationFlagged ( )
inline

◆ getVis()

casacore::Array<std::complex<double> >& dp3::base::GainCalAlgorithm::getVis ( )
inline

Returns a reference to the visibility matrix.

◆ getWeight()

double dp3::base::GainCalAlgorithm::getWeight ( )
inline

◆ incrementWeight()

void dp3::base::GainCalAlgorithm::incrementWeight ( float  weight)

Increments the weight (only relevant for TEC-fitting)

◆ init()

void dp3::base::GainCalAlgorithm::init ( bool  initSolutions)

Initializes a new run of gaincal, resizes all internal vectors If initSolutions is false, you are responsible for setting them before running the solver. You could set the solutions to those of the previous time step.

◆ nCr()

unsigned int dp3::base::GainCalAlgorithm::nCr ( )
inline

Number of correlations (1 or 4)

◆ numCorrelations()

unsigned int dp3::base::GainCalAlgorithm::numCorrelations ( )
inline

Number of correlations in the solution (1,2 or 4)

◆ resetVis()

void dp3::base::GainCalAlgorithm::resetVis ( )

Sets visibility matrices to zero.


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