Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
|
Container for metadata that describes a set of dispersion measure trials. More...
#include <cheetah/data/DmTrialsMetadata.h>
Classes | |
class | Metadata |
Container for an metadata concerning a single DM trial. More... | |
Public Types | |
typedef DedispersionMeasureType< float > | DmType |
typedef SecondsType< double > | TimeType |
Public Member Functions | |
DmTrialsMetadata (TimeType fundamental_sampling_interval, std::size_t fundamental_sample_count) | |
Create a new DmTrialsMetadata instance. More... | |
void | emplace_back (DmType dm, std::size_t downsampling_factor=1) |
Add a new Metadata instance containing information about a single DM trial. More... | |
ContainerType::const_reference | operator[] (std::size_t n) const |
Return a const reference to a Metadata instance. More... | |
ContainerType::reference | operator[] (std::size_t n) |
Return a reference to a Metadata instance. More... | |
ContainerType::iterator | begin () |
Return an iterator pointing to the first Metadata instance contained. | |
ContainerType::const_iterator | begin () const |
Return an iterator pointing to the first Metadata instance contained. | |
ContainerType::const_iterator | cbegin () const |
Return an const iterator pointing to the first Metadata instance contained. | |
ContainerType::iterator | end () |
Return an iterator pointing beyond the Metadata instance contained. | |
ContainerType::const_iterator | end () const |
Return an iterator pointing beyond the Metadata instance contained. | |
ContainerType::const_iterator | cend () const |
Return a const iterator pointing beyond the Metadata instance contained. | |
std::size_t | size () const |
Return the number of Metadata instances contained. | |
bool | operator== (DmTrialsMetadata const &other) |
Test if this instance is compatible with another instance. More... | |
TimeType | duration () const |
Return the temporal duration of the trials. More... | |
TimeType | fundamental_sampling_interval () const |
Return the fundamental_sampling_interval. | |
std::size_t | total_data_size () const |
Return the total size of the data represented. | |
Container for metadata that describes a set of dispersion measure trials.
The DmTrialsMetadata class is used to store information required to instantiate a DmTrials object. The emplace_back method is used to register a new DmTrial into the instance. Upon registering, the instance will update a hash value that encodes the order and number of DM values in the DmTrialsMetadata object. This hash value is used to check whether two DmTrialsMetadata objects are compatible (check via == operator.)
To generate a DmTrials object using a DmTrialsMetadata object we do the following:
Definition at line 48 of file DmTrialsMetadata.h.
ska::cheetah::data::DmTrialsMetadata::DmTrialsMetadata | ( | TimeType | fundamental_sampling_interval, |
std::size_t | fundamental_sample_count | ||
) |
Create a new DmTrialsMetadata instance.
[in] | fundamental_sampling_interval | The fundamental sampling interval |
[in] | fundamental_sample_count | The fundamental sample count |
The fundamental_sampling_interval and fundamental_sample_count are important, as all Metadata instances contained in this DmTrialsMetadata instances will have sampling intervals that are integer multiples of fundamental_sampling_interval and lengths that will be zero-remainder integer divisiors of fundamental_sample_count.
Definition at line 36 of file DmTrialsMetadata.cpp.
DmTrialsMetadata::TimeType ska::cheetah::data::DmTrialsMetadata::duration | ( | ) | const |
Return the temporal duration of the trials.
This is simply fundamental_sampling_interval * fundamental_sample_count
Definition at line 108 of file DmTrialsMetadata.cpp.
void ska::cheetah::data::DmTrialsMetadata::emplace_back | ( | DmType | dm, |
std::size_t | downsampling_factor = 1 |
||
) |
Add a new Metadata instance containing information about a single DM trial.
[in] | dm | The dispersion measure of the trial |
[in] | downsampling_factor | The downsampling factor of the trial |
Definition at line 49 of file DmTrialsMetadata.cpp.
bool ska::cheetah::data::DmTrialsMetadata::operator== | ( | DmTrialsMetadata const & | other | ) |
Test if this instance is compatible with another instance.
other | The other instance against which to compare |
Definition at line 103 of file DmTrialsMetadata.cpp.
DmTrialsMetadata::ContainerType::const_reference ska::cheetah::data::DmTrialsMetadata::operator[] | ( | std::size_t | n | ) | const |
Return a const reference to a Metadata instance.
[in] | n | The index of the instance to return |
Definition at line 58 of file DmTrialsMetadata.cpp.
DmTrialsMetadata::ContainerType::reference ska::cheetah::data::DmTrialsMetadata::operator[] | ( | std::size_t | n | ) |
Return a reference to a Metadata instance.
[in] | n | The index of the instance to return |
Definition at line 63 of file DmTrialsMetadata.cpp.