Class LeapData

Inheritance Relationships

Derived Type

Class Documentation

class LeapData

container of constants and phase rotation variables for calibrating a single beam. Can be mutated to calibrate for multiple directions.

Subclassed by ska::cuda::HostLeapData

Public Functions

LeapData(const ska::LeapDataset &ds, std::optional<unsigned int> refAnt = std::nullopt, double minimumBaselineThreshold = 0.0, bool computeInverse = true, bool useCache = true)

Construct a new LeapData object. SetDirection() and SetTecScreen() must be called after construction.

Parameters:
  • ms – measurement set to read observations from

  • refAnt – the reference antenna index, default is the last index

  • minimumBaselineThreshold – baseline lengths less that the minimum in meters are flagged

  • computeInverse – whether to compute inverse using cpu inversion

  • useCache – whether to load Ad matrix from cache

LeapData(const ska::LeapDataset &ds, const SphericalDirection &direction, const TecScreen &tecScreen, std::optional<unsigned int> refAnt = std::nullopt, double minimumBaselineThreshold = 0.0, bool computeInverse = true, bool useCache = true)

Construct a new LeapData object.

Parameters:
  • ms – measurement set to read observations from

  • direction – the direction of the calibrator in ICRS radians

  • tecScreen – the feedback TEC screen of the calibrator direction

  • refAnt – the reference antenna index, default is the last index

  • minimumBaselineThreshold – baseline lengths less that the minimum in meters are flagged

  • useCache – whether to load Ad matrix from cache

const Constants &GetConstants() const
const Eigen::MatrixXd &GetA() const

Matrix of baseline pairs of shape [baselines, stations].

const Eigen::VectorXi &GetI() const

Vector of indexes of the stations that are not flagged in A of shape [baselines].

const Eigen::MatrixXd &GetAd() const

The pseudoinverse of A with shape [stations, baselines].

inline virtual void SetAd(Eigen::MatrixXd &&Ad)
const Eigen::MatrixXd &GetA1() const

Matrix of baselines using the reference antenna of shape [stations+1, stations] where the last row represents the reference antenna.

const Eigen::VectorXi &GetI1() const

Vector of indexes of the stations that are not flagged in A1 of shape [stations].

Returns:

const Eigen::VectorXi&

const Eigen::MatrixXd &GetAd1() const
inline virtual void SetAd1(Eigen::MatrixXd &&ad1)
inline const SphericalDirection &GetDirection() const

Get the direction of the calibrator in ICRS radians.

Returns:

const SphericalDirection&

void SetDirection(const SphericalDirection &direction)

Set the direction of the calibrator in ICRS radians.

Parameters:

direction

inline const TecScreen &GetTecScreen() const

Get the TEC screen of the calibrator direction.

Returns:

const SphericalDirection&

void SetTecScreen(const TecScreen &direction)

Set the TEC screen of the calibrator direction.

Parameters:

direction

inline const Eigen::Matrix3d &GetDD() const
void ComputeInverse()

Computes the A and A1 inverse matrices.

void ValidateInverse() const

Output logs on the validity of inverse matrices.

Eigen::Matrix3d GenerateDDMatrix(const SphericalDirection &direction) const

Utility method to generate a direction matrix using the configured zenith direction.

Parameters:

direction

Returns:

Eigen::Matrix3d

inline const Eigen::VectorXcd &GetAvgData() const
inline Eigen::VectorXcd &GetAvgData()
bool operator==(const LeapData &rhs) const
inline bool operator!=(const LeapData &rhs) const

Protected Attributes

Constants m_constants
double m_minimumBaselineThreshold
bool m_useCache
Eigen::MatrixXd m_A
Eigen::VectorXi m_I
Eigen::MatrixXd m_A1
Eigen::VectorXi m_I1
Eigen::MatrixXd m_Ad

The pseudo-inverse of m_A, late intitialized.

Eigen::MatrixXd m_Ad1
std::vector<ska::MVuvw> m_UVW
SphericalDirection m_direction
TecScreen m_tecScreen
Eigen::Matrix3d m_dd
Eigen::VectorXcd m_avgData

Friends

friend class ska::cuda::DeviceLeapData
friend class ska::cuda::ConstantBuffer