JayBeams  0.1
Another project to have fun coding.
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
jb::fftw::time_delay_estimator< timeseries_t, vector > Class Template Reference

A simple time delay estimator based on cross-correlation. More...

#include <time_delay_estimator.hpp>

Public Types

Type traits
typedef timeseries_t timeseries_type
 The input timeseries type. More...
 
typedef timeseries_type::value_type value_type
 The values stored in the input timeseries. More...
 
typedef jb::extract_value_type< value_type >::precision precision_type
 Extract T out of std::complex<T>, otherwise simply T. More...
 
typedef vector< std::complex< precision_type > > frequency_timeseries_type
 The type used to store the DFT of the input timeseries. More...
 
typedef vector< precision_typeoutput_timeseries_type
 The type used to stored the inverse of the DFT. More...
 
typedef jb::fftw::plan< timeseries_type, frequency_timeseries_typedplan
 The execution plan to apply the (forward) DFT. More...
 
typedef jb::fftw::plan< frequency_timeseries_type, output_timeseries_typeiplan
 The execution plan to apply the inverse (aka backward) DFT. More...
 

Public Member Functions

 time_delay_estimator (timeseries_type &a, timeseries_type &b)
 Constructs a time delay estimator using. More...
 
std::pair< bool, precision_typeestimate_delay (timeseries_type &a, timeseries_type &b)
 Compute the time-delay estimate between two timeseries. More...
 

Static Private Member Functions

static int planning_flags ()
 Determine the correct FFTW planning flags given the inputs. More...
 

Private Attributes

frequency_timeseries_type tmpa_
 
frequency_timeseries_type tmpb_
 
dplan a2tmpa_
 
dplan b2tmpb_
 
output_timeseries_type out_
 
iplan tmpa2out_
 

Detailed Description

template<typename timeseries_t, template< typename T > class vector = jb::fftw::aligned_vector>
class jb::fftw::time_delay_estimator< timeseries_t, vector >

A simple time delay estimator based on cross-correlation.

Definition at line 17 of file time_delay_estimator.hpp.

Member Typedef Documentation

◆ dplan

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
typedef jb::fftw::plan<timeseries_type, frequency_timeseries_type> jb::fftw::time_delay_estimator< timeseries_t, vector >::dplan

The execution plan to apply the (forward) DFT.

Definition at line 39 of file time_delay_estimator.hpp.

◆ frequency_timeseries_type

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
typedef vector<std::complex<precision_type> > jb::fftw::time_delay_estimator< timeseries_t, vector >::frequency_timeseries_type

The type used to store the DFT of the input timeseries.

Definition at line 33 of file time_delay_estimator.hpp.

◆ iplan

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
typedef jb::fftw::plan<frequency_timeseries_type, output_timeseries_type> jb::fftw::time_delay_estimator< timeseries_t, vector >::iplan

The execution plan to apply the inverse (aka backward) DFT.

Definition at line 43 of file time_delay_estimator.hpp.

◆ output_timeseries_type

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
typedef vector<precision_type> jb::fftw::time_delay_estimator< timeseries_t, vector >::output_timeseries_type

The type used to stored the inverse of the DFT.

Definition at line 36 of file time_delay_estimator.hpp.

◆ precision_type

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
typedef jb::extract_value_type<value_type>::precision jb::fftw::time_delay_estimator< timeseries_t, vector >::precision_type

Extract T out of std::complex<T>, otherwise simply T.

Definition at line 30 of file time_delay_estimator.hpp.

◆ timeseries_type

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
typedef timeseries_t jb::fftw::time_delay_estimator< timeseries_t, vector >::timeseries_type

The input timeseries type.

Definition at line 24 of file time_delay_estimator.hpp.

◆ value_type

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
typedef timeseries_type::value_type jb::fftw::time_delay_estimator< timeseries_t, vector >::value_type

The values stored in the input timeseries.

Definition at line 27 of file time_delay_estimator.hpp.

Constructor & Destructor Documentation

◆ time_delay_estimator()

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
jb::fftw::time_delay_estimator< timeseries_t, vector >::time_delay_estimator ( timeseries_type a,
timeseries_type b 
)
inline

Constructs a time delay estimator using.

Parameters
aand
bas prototypes for the arguments.

The optimal algorithm to compute the FFTs used in the cross correlation depends on the size of the input parameters and their memory alignment.

The FFTW library modifies the arguments to compute the optimal execution plan, do not assume the values are unmodified.

Parameters
acontainer type (e.g. vector<>) timeseries
bcontainer type (e.g. vector<>) timeseries

Definition at line 59 of file time_delay_estimator.hpp.

Member Function Documentation

◆ estimate_delay()

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
std::pair<bool, precision_type> jb::fftw::time_delay_estimator< timeseries_t, vector >::estimate_delay ( timeseries_type a,
timeseries_type b 
)
inline

◆ planning_flags()

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
static int jb::fftw::time_delay_estimator< timeseries_t, vector >::planning_flags ( )
inlinestaticprivate

Determine the correct FFTW planning flags given the inputs.

Definition at line 112 of file time_delay_estimator.hpp.

Member Data Documentation

◆ a2tmpa_

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
dplan jb::fftw::time_delay_estimator< timeseries_t, vector >::a2tmpa_
private

◆ b2tmpb_

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
dplan jb::fftw::time_delay_estimator< timeseries_t, vector >::b2tmpb_
private

◆ out_

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
output_timeseries_type jb::fftw::time_delay_estimator< timeseries_t, vector >::out_
private

◆ tmpa2out_

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
iplan jb::fftw::time_delay_estimator< timeseries_t, vector >::tmpa2out_
private

◆ tmpa_

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
frequency_timeseries_type jb::fftw::time_delay_estimator< timeseries_t, vector >::tmpa_
private

◆ tmpb_

template<typename timeseries_t , template< typename T > class vector = jb::fftw::aligned_vector>
frequency_timeseries_type jb::fftw::time_delay_estimator< timeseries_t, vector >::tmpb_
private

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