mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
mx::sigproc::autocorrelationFromPSD< T > Struct Template Reference

template<typename T>
struct mx::sigproc::autocorrelationFromPSD< T >

Functor for calculating the autocorrelation given a PSD.

Stores the fftT object and related working memory so that repeated calls do not re-allocate or re-plan the FFT.

Template Parameters
Tis the real type of the PSD and resultig A.C.

Definition at line 96 of file autocorrelation.hpp.

#include <sigproc/autocorrelation.hpp>

Public Member Functions

void operator() (T *ac, size_t Nac, T *psd, size_t Npsd)
 Calculate the A.C. as the inverse FFT of the PSD. More...
 
void operator() (std::vector< T > &ac, std::vector< T > &psd)
 Calculate the A.C. as the inverse FFT of the PSD. More...
 

Member Function Documentation

◆ operator()() [1/2]

template<typename T >
void mx::sigproc::autocorrelationFromPSD< T >::operator() ( std::vector< T > &  ac,
std::vector< T > &  psd 
)
inline

Calculate the A.C. as the inverse FFT of the PSD.

This calculates the circular autocorrelation from the PSD.

Parameters
[out]acOn output contains the autocorrelation. If ac.size()==0, it is allocated to psd.size().
[in]psdthe 2-sided FFT storage order PSD

Definition at line 131 of file autocorrelation.hpp.

References mx::sigproc::autocorrelationFromPSD< T >::operator()().

◆ operator()() [2/2]

template<typename T >
void mx::sigproc::autocorrelationFromPSD< T >::operator() ( T *  ac,
size_t  Nac,
T *  psd,
size_t  Npsd 
)
inline

Calculate the A.C. as the inverse FFT of the PSD.

This calculates the circular autocorrelation from the PSD.

Parameters
[out]acpre-allocated array, on output contains the first Nac points of the autocorrelation
[in]Nacthe allocated size of ac.
[in]psdthe 2-sided FFT storage order PSD
[in]Npsdthe number of points in the PSD

Definition at line 107 of file autocorrelation.hpp.

Referenced by mx::sigproc::autocorrelationFromPSD< T >::operator()().


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