Class ZarrLeapDataset
Defined in File ZarrLeapDataset.h
Inheritance Relationships
Base Type
public ska::LeapDataset(Class LeapDataset)
Class Documentation
-
class ZarrLeapDataset : public ska::LeapDataset
An abstraction layer around a Zarr MSv4 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
-
ZarrLeapDataset(const std::string &filepath)
Construct a new Zarr Leap Dataset object.
- Parameters:
filepath – a Casa MeasurementSet v4 filepath
-
virtual std::optional<std::string> GetFilepath() const override
Get the file path of the data.
-
virtual uint32_t GetTotalAntennas() const override
Get the total number of antennas including flagged antennas.
-
virtual uint32_t GetNumStations() const override
Get the number of stations excluding flagged stations.
- Returns:
uint32_t
-
virtual uint32_t GetNumBaselines() const override
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 override
Get the number of polarizations in the measurement set.
- Returns:
uint32_t
-
virtual uint32_t GetNumChannels() const override
Get the number of channels in the measurement set.
- Returns:
uint32_t
-
virtual double GetFreqStartHz() const override
-
virtual double GetFreqIncHz() const override
-
virtual Eigen::Vector2d GetPhaseCentreRad() const override
-
virtual uint32_t GetNumRows() const override
Get the number of rows in the measurement set (non-flagged baselines * timesteps).
- Returns:
uint32_t
-
std::vector<std::u32string> GetAntennaNames() const
-
std::vector<std::u32string> GetAntenna1Names() const
-
std::vector<std::u32string> GetAntenna2Names() const
-
virtual Eigen::VectorXi GetAntenna1() const override
Get the indexes of the first antenna in baselines.
- Returns:
Eigen::VectorXi
-
virtual Eigen::VectorXi GetAntenna2() const override
Get the indexes of the second antenna in baselines.
- Returns:
Eigen::VectorXi
-
virtual uint32_t GetNumTimesteps() const override
Get the total number of timesteps in the measurement set.
- Returns:
uint32_t
-
virtual std::vector<double> GetVisibilityTimeIntervals() const override
Get the time interval of visibilities in seconds.
-
virtual std::vector<double> GetVisibilityTimestamps() const override
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 override
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 override
Get the number of baselines that are flagged by the measurement set.
- Returns:
uint32_t
-
virtual Eigen::VectorXb GetShortBaselines(double minimumBaselineThreshold = 0.0) const override
Get a flag vector of short baselines.
- Parameters:
minimumBaselineThreshold – baseline threshold
- Returns:
Eigen::VectorXb
-
virtual uint32_t GetNumShortBaselines(double minimumBaselineThreshold = 0.0) const override
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 override
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 override
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 override
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 override
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 override
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 override
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 override
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 override
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 override
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 override
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>
-
ZarrLeapDataset(const std::string &filepath)