Class StatHistogramMsgPackStrategy
Defined in File StatHistogramMsgPackStrategy.h
Inheritance Relationships
Base Type
public ska::pst::stat::StatMsgPackStrategy(Class StatMsgPackStrategy)
Class Documentation
-
class StatHistogramMsgPackStrategy : public ska::pst::stat::StatMsgPackStrategy
This class is used populate the “data_type”, “metadata”, and “data” sections of Histogram MsgPack messages.
Public Functions
-
virtual void pack_data_type(msgpack::packer<std::stringstream> &packer) override
Sets the value of the data_type as “pst_histogram”.
- Parameters
packer – the MsgPack packer to write the data type value to.
-
virtual void pack_metadata(msgpack::packer<std::stringstream> &packer, const StatStorage &storage, const ska::pst::common::AsciiHeader &config) override
Add metadata map to output MsgPack message.
The histogram metadata are a map of the following:
“nbins” - the number of bins in the histogram (e.g when nbit = 8, this is 256).
”min_bin” - the value of the smallest bin (e.g. when nbit = 8, this is -128).
”max_bin” - the value of the largest bin (e.g. when nbit = 8, this is 127).
- Parameters
packer – the MsgPack packer to pack the metadata record into.
storage – the StatStorage to get metadata from.
config – the current configuration of the scan
-
virtual void pack_data(msgpack::packer<std::stringstream> &packer, const StatStorage &storage, const ska::pst::common::AsciiHeader &config) override
Add data to output MsgPack message.
The histogram data are an array of polarisation data. The data for each polarisation is packed as a map with the following values:
“polarisation” - the name of the polarisation.
”real” - the histogram counts in the real value of the complex voltages.
”imag” - the histogram counts in the imaginary value of the complex voltages.
- Parameters
packer – the MsgPack packer to pack the metadata record into.
storage – the StatStorage to get metadata from.
config – the current configuration of the scan
-
virtual void pack_data_type(msgpack::packer<std::stringstream> &packer) override