Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Public Member Functions | Protected Member Functions | List of all members
ska::cheetah::tdas::AccListGenConfig Class Reference

AccelerationListGen configuration parameters. More...

#include <cheetah/tdas/AccListGenConfig.h>

Inheritance diagram for ska::cheetah::tdas::AccListGenConfig:
Inheritance graph
Collaboration diagram for ska::cheetah::tdas::AccListGenConfig:
Collaboration graph

Public Member Functions

double acc_lo () const
 return/set the acceleration start m/s/s
 
void acc_lo (double)
 
double acc_hi () const
 return/set the acceleration end m/s/s/ m/s/s
 
void acc_hi (double)
 
double tolerance () const
 return/set the acceleration smearing tolerance (1.11=10%)
 
void tolerance (double)
 
double pulse_width () const
 return/set the minimum pulse width for which acc_tol is valid (in us)
 
void pulse_width (double)
 
double cfreq () const
 return/set the centre frequency of the data block (in MHz)
 
void cfreq (double)
 
double bw () const
 return the channel bandwidth (in MHz)
 
void bw (double)
 
data::AccelerationType magnitude () const
 return the maximum absolute acceleration magnitude
 
std::vector< data::AccelerationType > acceleration_list (data::DedispersionMeasureType< float > dm, std::size_t number_of_samples, double sampling_interval) const
 Generate a list of accelerations. More...
 
- Public Member Functions inherited from ska::cheetah::utils::Config
 Config (std::string module_name)
 
void terminate () const
 call for notifiers to indicate a termination condition More...
 

Protected Member Functions

void add_options (OptionsDescriptionEasyInit &add_options) override
 

Additional Inherited Members

- Public Types inherited from ska::cheetah::utils::Config
typedef System SystemType
 
typedef panda::PoolManager< SystemTypePoolManagerType
 
typedef PoolManagerType::PoolType PoolType
 

Detailed Description

AccelerationListGen configuration parameters.

Definition at line 41 of file AccListGenConfig.h.

Member Function Documentation

◆ acceleration_list()

std::vector< data::AccelerationType > ska::cheetah::tdas::AccListGenConfig::acceleration_list ( data::DedispersionMeasureType< float >  dm,
std::size_t  number_of_samples,
double  sampling_interval 
) const

Generate a list of accelerations.

Parameters
[in]dmThe current dispersion measure
[in]number_of_samplesThe number of samples
[in]sampling_intervalThe sampling interval
Returns
A vector of accelerations

Definition at line 140 of file AccListGenConfig.cpp.

144 {
145  std::vector<data::AccelerationType> acc_list;
146  double _tobs = number_of_samples*sampling_interval;
147 
148  if (_acc_hi == _acc_lo) {
149  acc_list.push_back(_acc_lo * data::meters_per_second_squared);
150  return acc_list;
151  }
152  double tdm = (8.3 * std::abs(_bw) / std::pow(_cfreq,3.0) * dm.value());
153  double c = boost::units::si::constants::codata::c.value().value();
154  double ttdm = tdm*tdm;
155  double tpulse = _pulse_width*_pulse_width;
156  double ttsamp = sampling_interval*sampling_interval;
157  double ttobs = _tobs * _tobs;
158  double width = std::sqrt(ttdm+tpulse+ttsamp);
159  double alt_a = 2.0 * width * 24.0 * c/ttobs * std::sqrt((_tol*_tol)-1.0);
160  std::size_t naccels = std::size_t(((_acc_hi-_acc_lo)/alt_a));
161  acc_list.reserve(naccels+3);
162  acc_list.push_back(0.0 * data::meters_per_second_squared);
163  for (auto acc=_acc_lo; acc <= _acc_hi; acc+=alt_a)
164  {
165  acc_list.push_back(acc * data::meters_per_second_squared);
166  }
167  return acc_list;
168 }

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