Class DataUnpacker
Defined in File DataUnpacker.h
Class Documentation
-
class DataUnpacker
Unpacks data+weights+scales generation and validation.
Public Functions
-
DataUnpacker() = default
Construct a new DataUnpacker object.
-
virtual ~DataUnpacker() = default
Destroy the DataUnpacker object.
-
virtual void configure(const ska::pst::common::AsciiHeader &data_config, const ska::pst::common::AsciiHeader &weights_config)
Configure the data unpacker with the AsciiHeader from the data and weights streams.
- Parameters
data_config – AsciiHeader containing the configuration of the data stream
weights_config – AsciiHeader containing the configuration of the weights stream
-
auto unpack(char *data, uint64_t data_bufsz, char *weights, uint64_t weights_bufsz) -> std::vector<std::vector<std::vector<std::complex<float>>>>&
Unpack the data and weights streams into the unpacked class attribute. unpacked is a three dimensional floating point vector, that is resized within this method to ensure it can store the data.
- Parameters
data – pointer to raw data array
data_bufsz – size of the raw data array in bytes
weights – pointer to raw weights array
weights_bufsz – size of the raw weights array in bytes
- Returns
std::vector<std::vector<std::vector<std::complex<float>>>>& unpacked data ordered by time, freqeuncy then polarisation
-
void integrate_bandpass(char *data, uint64_t data_bufsz, char *weights, uint64_t weights_bufsz)
Integrate the data and weights streams into the bandpass member attribute. bandpass is a two dimensional floating point vector that is resized within this method to ensure it can store the data.
- Parameters
data – pointer to raw data array
data_bufsz – size of the raw data array in bytes
weights – pointer to raw weights array
weights_bufsz – size of the raw weights array in bytes
-
inline auto get_bandpass() -> std::vector<std::vector<float>>&
Get the integrated bandpass vector.
- Returns
std::vector<std::vector<float>>&o upacked bandpass vector ordered by frequency then polarisation
-
void reset()
Reset the integrated bandpass vector to zero.
-
DataUnpacker() = default