Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Public Types | Public Member Functions | List of all members
ska::cheetah::data::FrequencySeries< Arch, ValueType, Alloc > Class Template Reference

A container of Fourier series data. More...

#include <cheetah/data/FrequencySeries.h>

Inheritance diagram for ska::cheetah::data::FrequencySeries< Arch, ValueType, Alloc >:
Inheritance graph
Collaboration diagram for ska::cheetah::data::FrequencySeries< Arch, ValueType, Alloc >:
Collaboration graph

Public Types

typedef Alloc Allocator
 
typedef Arch Architecture
 
- Public Types inherited from ska::cheetah::data::Series< Arch, ValueType, Alloc >
typedef DeviceMemoryType::Iterator Iterator
 
typedef DeviceMemoryType::ConstIterator ConstIterator
 
typedef Alloc Allocator
 
typedef Arch Architecture
 
typedef ValueType ValueType
 

Public Member Functions

 FrequencySeries (Allocator const &allocator=Allocator())
 Construct a default frequency series (of size 0)
 
 FrequencySeries (std::size_t size, Allocator const &allocator=Allocator())
 Construct a default frequency series.
 
template<typename OtherArch , typename OtherAlloc >
 FrequencySeries (FrequencySeries< OtherArch, ValueType, OtherAlloc > const &copy, Alloc const &allocator=Allocator())
 Construct a regularly sampled frequency series copying data from device memory.
 
 FrequencySeries (FourierFrequencyType const &df, std::size_t size, Allocator const &allocator=Allocator())
 Construct a frequency series with a given sampling interval. More...
 
 FrequencySeries (FourierFrequencyType const &df, Allocator const &allocator=Allocator())
 Construct a frequency series with a given sampling interval. More...
 
FourierFrequencyType const & frequency_step () const
 Retrieve the frequency step of the series. More...
 
void frequency_step (FourierFrequencyType const &df)
 Set the frequency step of the series. More...
 
data::FourierFrequencyType const bin_to_frequency (std::size_t idx) const
 
data::TimeType const bin_to_period (std::size_t idx) const
 
std::size_t frequency_to_bin (data::FourierFrequencyType const &frequency) const
 
- Public Member Functions inherited from ska::cheetah::data::Series< Arch, ValueType, Alloc >
 Series (Allocator const &)
 
 Series (std::size_t size, Allocator const &)
 
 Series (Series const &copy)
 
 Series (Series &&copy_to_move)
 
 Series (Series< OtherArch, ValueType, OtherAlloc > const &copy, Alloc const &allocator)
 copies Series data to the device
 
 Series (Series< OtherArch, ValueType, OtherAlloc > const &copy)
 
ConstIterator begin () const
 Iterators to device memory. More...
 
Iterator begin ()
 
Iterator end ()
 
ConstIterator end () const
 
ConstIterator cbegin () const
 
ConstIterator cend () const
 
std::size_t size () const
 the size of the series
 
void resize (std::size_t size)
 resize the data
 

Detailed Description

template<typename Arch, typename ValueType, typename Alloc = typename DefaultAllocator<Arch,ValueType>::type>
class ska::cheetah::data::FrequencySeries< Arch, ValueType, Alloc >

A container of Fourier series data.

A contiguous block of data ordered by Fourier frequency.

The FrequencySeries class wraps a generic Series class providing methods and members that describe a series of data (powers, amplitudes, etc.) ordered by Fourier frequency.

Note that by convention the frequency value of each bin is referenced to the centre of that bin. This means that the zero'th bin of the series spans the range (-frequecy_step/2,frequecy_step/2). This is important to account for when performing operations which require exact knowledge of the frequencies of each bin.

Definition at line 54 of file FrequencySeries.h.

Constructor & Destructor Documentation

◆ FrequencySeries() [1/2]

template<typename Arch , typename ValueType , typename Alloc >
ska::cheetah::data::FrequencySeries< Arch, ValueType, Alloc >::FrequencySeries ( FourierFrequencyType const &  df,
std::size_t  size,
Allocator const &  allocator = Allocator() 
)

Construct a frequency series with a given sampling interval.

Parameters
dfThe frequency step between neighbouring bins in the series

Definition at line 53 of file FrequencySeries.cpp.

54  : BaseT(size, allocator)
55  , _frequency_step(df)
56 {
57 }
std::size_t size() const
the size of the series
Definition: Series.cpp:109

◆ FrequencySeries() [2/2]

template<typename Arch , typename ValueType , typename Alloc >
ska::cheetah::data::FrequencySeries< Arch, ValueType, Alloc >::FrequencySeries ( FourierFrequencyType const &  df,
Allocator const &  allocator = Allocator() 
)

Construct a frequency series with a given sampling interval.

Parameters
dfThe frequency step between neighbouring bins in the series

Definition at line 60 of file FrequencySeries.cpp.

61  : FrequencySeries(df, 0, allocator)
62 {
63 }
FrequencySeries(Allocator const &allocator=Allocator())
Construct a default frequency series (of size 0)

Member Function Documentation

◆ frequency_step() [1/2]

template<typename Arch , typename ValueType , typename Alloc >
FourierFrequencyType const & ska::cheetah::data::FrequencySeries< Arch, ValueType, Alloc >::frequency_step ( ) const

Retrieve the frequency step of the series.

Returns
The frequency step between neighbouring bins in the series

Definition at line 71 of file FrequencySeries.cpp.

72 {
73  return _frequency_step;
74 }

◆ frequency_step() [2/2]

template<typename Arch , typename ValueType , typename Alloc >
void ska::cheetah::data::FrequencySeries< Arch, ValueType, Alloc >::frequency_step ( FourierFrequencyType const &  df)

Set the frequency step of the series.

Parameters
dfThe new frequency step for the series

Definition at line 77 of file FrequencySeries.cpp.

78 {
79  _frequency_step = df;
80 }

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