Class MeasurementSet

Class Documentation

class icrar::MeasurementSet

Provides an abstraction layer around a casacore MeasurementSet that provides all data required for leap calibration. This class additionally stores runtime user specificed variables and cached variabled calculated from the underlying measurement set.

Public Functions

MeasurementSet(const std::string &filepath, boost::optional<int> overrideNStations, bool readAutocorrelations)
boost::optional<std::string> GetFilepath() const
const casacore::MeasurementSet *GetMS() const

Gets a non-null pointer to a casacore::MeasurementSet.

Return

const casacore::MeasurementSet*

const casacore::MSMainColumns *GetMSMainColumns() const

Gets a non-null pointer to a casacore::MSMainColumns.

Return

const casacore::MSMainColumns*

const casacore::MSColumns *GetMSColumns() const

Gets a non-null pointer to a casacore::MSColumns.

Return

const casacore::MSColumns*

uint32_t GetTotalAntennas() const

Gets the total number of antennas including flagged antennas.

uint32_t GetNumStations() const

Gets the number of stations excluding flagged stations.

Return

uint32_t

uint32_t GetNumBaselines() const

Get the number of baselines in the measurement set using the current autocorrelations setting and including stations not recording rows.

Note

TODO: baselines should always be n*(n-1) / 2 and without autocorrelations

Return

uint32_t

uint32_t GetNumPols() const

Get the number of polarizations in the measurement set.

Return

uint32_t

uint32_t GetNumChannels() const

Gets the number of channels in the measurement set.

Return

uint32_t

uint32_t GetNumRows() const

Gets the number of rows in the measurement set (non-flagged baselines * timesteps).

Return

uint32_t

uint32_t GetNumTimesteps() const

Gets the total number of timesteps in the measurement set.

Return

uint32_t

std::vector<double> GetEpochs() const

Get the Epochs object.

Return

std::vector<double>

Eigen::VectorXb GetFlaggedBaselines() const

Gets a vector of size nBaselines with a true value at the index of flagged baselines. Checks for flagged data on the first channel and polarization.

Return

Eigen::VectorXb

uint32_t GetNumFlaggedBaselines() const

Get the number of baselines that are flagged by the measurement set.

Return

uint32_t

Eigen::VectorXb GetShortBaselines(double minimumBaselineThreshold = 0.0) const

Gets a flag vector of short baselines.

Return

Eigen::VectorXb

Parameters
  • minimumBaselineThreshold:

uint32_t GetNumShortBaselines(double minimumBaselineThreshold = 0.0) const

Get the number of baselines that below the minimumBaselineThreshold.

Return

uint32_t

Parameters
  • minimumBaselineThreshold:

Eigen::VectorXb GetFilteredBaselines(double minimumBaselineThreshold = 0.0) const

Gets flag vector of filtered baselines that are either flagged or short.

Return

Eigen::VectorXb

Parameters
  • minimumBaselineThreshold:

uint32_t GetNumFilteredBaselines(double minimumBaselineThreshold = 0.0) const

Gets the number of baselines that are flagged baselines or short baselines.

Return

uint32_t

Parameters
  • minimumBaselineThreshold:

Eigen::MatrixX3d GetCoords() const

Gets a flag vector of filtered stations.

Return

Eigen::VectorXb

Parameters
  • minimumBaselineThreshold:

Eigen::MatrixX3d GetCoords(uint32_t start_row, uint32_t nBaselines) const
Eigen::Tensor<std::complex<double>, 3> GetVis(std::uint32_t startBaseline, std::uint32_t startChannel, std::uint32_t nChannels, std::uint32_t nBaselines, std::uint32_t nPolarizations) const
Eigen::Tensor<std::complex<double>, 3> GetVis() const
std::set<int32_t> GetMissingAntennas() const

Gets the antennas that are not present in any baselines.

Return

std::set<int32_t>

std::set<int32_t> GetFlaggedAntennas() const

Gets the antenna indexes that are either not present in any baselines or are flagged in all of it’s baselines.

Indexes are out of the total antennas

Return

std::set<int32_t>