Class LeapDataset
Defined in File LeapDataset.h
Inheritance Relationships
Derived Types
public ska::CasaLeapDataset(Class CasaLeapDataset)public ska::NumpyLeapDataset(Class NumpyLeapDataset)public ska::ZarrLeapDataset(Class ZarrLeapDataset)
Class Documentation
-
class LeapDataset
An abstraction layer around an Observation Measurement 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.
Subclassed by ska::CasaLeapDataset, ska::NumpyLeapDataset, ska::ZarrLeapDataset
Public Functions
-
virtual std::optional<std::string> GetFilepath() const = 0
Get the file path of the data.
-
virtual uint32_t GetTotalAntennas() const = 0
Get the total number of antennas including flagged antennas.
-
virtual uint32_t GetNumStations() const = 0
Get the number of stations excluding flagged stations.
- Returns:
uint32_t
-
virtual uint32_t GetNumBaselines() const = 0
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
- Returns:
uint32_t
-
virtual uint32_t GetNumPols() const = 0
Get the number of polarizations in the measurement set.
- Returns:
uint32_t
-
virtual uint32_t GetNumChannels() const = 0
Get the number of channels in the measurement set.
- Returns:
uint32_t
-
virtual double GetFreqStartHz() const = 0
-
virtual double GetFreqIncHz() const = 0
-
virtual Eigen::Vector2d GetPhaseCentreRad() const = 0
-
virtual uint32_t GetNumRows() const = 0
Get the number of rows in the measurement set (non-flagged baselines * timesteps).
- Returns:
uint32_t
-
virtual Eigen::VectorXi GetAntenna1() const = 0
Get the indexes of the first antenna in baselines.
- Returns:
Eigen::VectorXi
-
virtual Eigen::VectorXi GetAntenna2() const = 0
Get the indexes of the second antenna in baselines.
- Returns:
Eigen::VectorXi
-
virtual uint32_t GetNumTimesteps() const = 0
Get the total number of timesteps in the measurement set.
- Returns:
uint32_t
-
virtual std::vector<double> GetVisibilityTimeIntervals() const = 0
Get the time interval of visibilities in seconds.
-
virtual std::vector<double> GetVisibilityTimestamps() const = 0
Get Time coordinates of visibilities in seconds from MJD epoch.
Note
Visibility timestamps are the mid-point of the correlated period (not the centroid).
- Returns:
std::vector<double>
-
virtual Eigen::VectorXb GetFlaggedBaselines() const = 0
Get a vector of size nBaselines with a true value at the index of unflagged baselines. Flag is is logical and of channels and polarizations.
- Returns:
Eigen::VectorXb
-
virtual uint32_t GetNumFlaggedBaselines() const = 0
Get the number of baselines that are flagged by the measurement set.
- Returns:
uint32_t
-
virtual Eigen::VectorXb GetShortBaselines(double minimumBaselineThreshold = 0.0) const = 0
Get a flag vector of short baselines.
- Parameters:
minimumBaselineThreshold – baseline threshold
- Returns:
Eigen::VectorXb
-
virtual uint32_t GetNumShortBaselines(double minimumBaselineThreshold = 0.0) const = 0
Get the number of baselines that below the
minimumBaselineThreshold.- Parameters:
minimumBaselineThreshold – baseline threshold
- Returns:
uint32_t
-
virtual Eigen::VectorXb GetFilteredBaselines(double minimumBaselineThreshold = 0.0) const = 0
Get flag vector of filtered baselines that are either flagged or short.
- Parameters:
minimumBaselineThreshold – baseline threshold
- Returns:
Eigen::VectorXb
-
virtual uint32_t GetNumFilteredBaselines(double minimumBaselineThreshold = 0.0) const = 0
Get the number of baselines that are flagged baselines or short baselines.
- Parameters:
minimumBaselineThreshold – baseline threshold
- Returns:
uint32_t
-
virtual Eigen::Tensor<double, 3> ReadCoords() const = 0
Reads UVW coordinates from the measurement set TODO: rename ReadUVWs.
- Returns:
Eigen::Tensor<double, 3>
-
virtual Eigen::Tensor<double, 3> ReadCoords(const Slice ×tepSlice) const = 0
Get the Coords/UVWs of a specified time interval.
- Parameters:
startTimestep –
intervalTimesteps –
- Returns:
Eigen::Tensor<double, 3> of dimensions (3, baselines, timesteps)
-
virtual Eigen::Tensor<double, 3> ReadCoords(uint32_t startTimestep, uint32_t intervalTimesteps) const = 0
Get the Coords/UVWs of a specified time interval.
- Parameters:
startTimestep –
intervalTimesteps –
- Returns:
Eigen::Tensor<double, 3> of dimensions (3, baselines, timesteps)
-
virtual Eigen::Tensor<std::complex<double>, 4> ReadVis() const = 0
Get the visibilities from all baselines, channels and polarizations for the first timestep.
- Returns:
Eigen::Tensor<std::complex<double>, 4> of dimensions (polarizations, channels, baselines, timesteps)
-
virtual Eigen::Tensor<std::complex<double>, 4> ReadVis(const Slice ×tepSlice, const Slice &polarizationSlice = Slice(0, std::nullopt, 1)) const = 0
Get visibilities from the specificed dimension slices of a specified timestep slice.
- Parameters:
startTimestep – start timestep index
intervalTimesteps – number of timesteps
- Returns:
Eigen::Tensor<std::complex<double>, 4> of dimensions (polarizations, channels, baselines, timesteps)
-
virtual Eigen::Tensor<std::complex<double>, 4> ReadVis(std::uint32_t startTimestep, std::uint32_t intervalTimesteps, const Slice &polarizationSlice = Slice(0, std::nullopt, 1)) const = 0
Get visibilities from the specificed dimension slices of a specified timestep slice.
- Parameters:
startTimestep – start timestep index
intervalTimesteps – number of timesteps
- Returns:
Eigen::Tensor<std::complex<double>, 4> of dimensions (polarizations, channels, baselines, timesteps)
-
virtual Eigen::Tensor<std::complex<double>, 4> ReadVis(uint32_t startTimestep, uint32_t intervalTimesteps, Range<int32_t> polarizationRange, const char *column) const = 0
Reads from file visibilities using specified dimension slices.
- Parameters:
startTimestep –
intervalTimesteps –
polarizationRange –
column –
- Returns:
Eigen::Tensor<std::complex<double>, 4> of dimensions (polarizations, channels, baselines, timesteps)
-
virtual std::set<int32_t> GetFlaggedAntennas() const = 0
Get 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.
Testing only.
- Returns:
std::set<int32_t>
-
virtual std::optional<std::string> GetFilepath() const = 0