Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Public Types | Public Member Functions | Protected Types | List of all members
ska::cheetah::data::ExtendedTimeFrequency< TimeFrequencyT > Class Template Reference

Wrapper around a TimeFrequency type object (or shared_ptr to such) mainiting the TimeFrequency interface. More...

#include <cheetah/data/ExtendedTimeFrequency.h>

Inheritance diagram for ska::cheetah::data::ExtendedTimeFrequency< TimeFrequencyT >:
Inheritance graph
Collaboration diagram for ska::cheetah::data::ExtendedTimeFrequency< TimeFrequencyT >:
Collaboration graph

Public Types

typedef Type TimeFrequencyType
 
typedef Type::TimeType TimeType
 
typedef Type::TimePointType TimePointType
 
typedef Type::FrequencyType FrequencyType
 
typedef Type::Architecture Architecture
 
typedef Type::NumericalRep NumericalRep
 

Public Member Functions

 ExtendedTimeFrequency (std::shared_ptr< TimeFrequencyT > const &)
 
 operator Type const & () const
 conversion operator to the underlying TimeFrequency type static casting to the tf block and using the reference may prove more efficient way of accessing the TF interface if you are calling more than one method.
 
TimePointType const & start_time () const
 get the start time of first spectrum
 
TimePointType start_time (std::size_t offset) const
 
void start_time (TimePointType const &start_time)
 Set the start time of the instance. More...
 
TimeType sample_interval () const
 
void sample_interval (TimeType dt)
 
std::vector< FrequencyType > const & channel_frequencies () const
 
std::pair< FrequencyType, FrequencyType > low_high_frequencies () const
 
void set_channel_frequencies_const_width (FrequencyType const &start, FrequencyType const &delta)
 Set the frequency index based on evenly spaced channels. More...
 
void set_channel (unsigned channel_number, NumericalRep const &value)
 sets the value of the specified channel to the provided value across all time samples
 

Protected Types

typedef BaseT::Type Type
 

Detailed Description

template<typename TimeFrequencyT>
class ska::cheetah::data::ExtendedTimeFrequency< TimeFrequencyT >

Wrapper around a TimeFrequency type object (or shared_ptr to such) mainiting the TimeFrequency interface.

Allows for easy composition.

Definition at line 43 of file ExtendedTimeFrequency.h.

Member Function Documentation

◆ channel_frequencies()

template<typename TimeFrequencyT >
std::vector< typename ExtendedTimeFrequency< TimeFrequencyT >::FrequencyType > const & ska::cheetah::data::ExtendedTimeFrequency< TimeFrequencyT >::channel_frequencies ( ) const
inline
Returns
a vector of frequencies that are represented in each time sample

Definition at line 85 of file ExtendedTimeFrequency.cpp.

86 {
87  return this->get().channel_frequencies();
88 }
std::vector< FrequencyType > const & channel_frequencies() const

◆ low_high_frequencies()

template<typename TimeFrequencyT >
std::pair< typename ExtendedTimeFrequency< TimeFrequencyT >::FrequencyType, typename ExtendedTimeFrequency< TimeFrequencyT >::FrequencyType > ska::cheetah::data::ExtendedTimeFrequency< TimeFrequencyT >::low_high_frequencies ( ) const
inline
Returns
returns the lowest and highest frequencies represented in channel_frequenceis

Definition at line 92 of file ExtendedTimeFrequency.cpp.

93 {
94  return this->get().low_high_frequencies();
95 }
std::pair< FrequencyType, FrequencyType > low_high_frequencies() const

◆ sample_interval() [1/2]

template<typename TimeFrequencyT >
ExtendedTimeFrequency< TimeFrequencyT >::TimeType ska::cheetah::data::ExtendedTimeFrequency< TimeFrequencyT >::sample_interval ( ) const
inline
Returns
the sample interval in seconds

Definition at line 71 of file ExtendedTimeFrequency.cpp.

72 {
73  return this->get().sample_interval();
74 }

◆ sample_interval() [2/2]

template<typename TimeFrequencyT>
void ska::cheetah::data::ExtendedTimeFrequency< TimeFrequencyT >::sample_interval ( TimeType  dt)

the sample interval in seconds

◆ set_channel_frequencies_const_width()

template<typename TimeFrequencyT >
void ska::cheetah::data::ExtendedTimeFrequency< TimeFrequencyT >::set_channel_frequencies_const_width ( FrequencyType const &  start,
FrequencyType const &  delta 
)
inline

Set the frequency index based on evenly spaced channels.

Assumes that the number_of_channels has already been set

Definition at line 99 of file ExtendedTimeFrequency.cpp.

100 {
101  this->get().set_channel_frequencies_const_width(start, delta);
102 }
void set_channel_frequencies_const_width(FrequencyType const &start, FrequencyType const &delta)
Set the frequency index based on evenly spaced channels.

◆ start_time() [1/2]

template<typename TimeFrequencyT >
ExtendedTimeFrequency< TimeFrequencyT >::TimePointType ska::cheetah::data::ExtendedTimeFrequency< TimeFrequencyT >::start_time ( std::size_t  offset) const
inline
Returns
the absolute time the Nth time sample corresponds to.

Definition at line 57 of file ExtendedTimeFrequency.cpp.

58 {
59  return this->get().start_time(offset);
60 }
TimePointType const & start_time() const
get the start time of first spectrum

◆ start_time() [2/2]

template<typename TimeFrequencyT>
void ska::cheetah::data::ExtendedTimeFrequency< TimeFrequencyT >::start_time ( TimePointType const &  start_time)

Set the start time of the instance.

Parameters
start_timeThe start time (MJD) of the instance

The documentation for this class was generated from the following files: