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

template<typename _realT>
struct mx::sigproc::psdVarMeanParams< _realT >

Parameters for calculating the variance of the mean from a numerical PSD.

Interpolates on the PSD for the integration.

Template Parameters
realTthe real floating point type of the frequency and PSD vectors. [Must be double due to GSL]

Definition at line 54 of file psdVarMean.hpp.

#include <sigproc/psdVarMean.hpp>

Public Member Functions

realT psdVal (realT k)
 Get the value of the PSD at k using interpolation. More...
 

Public Attributes

std::vector< realT > * freq {nullptr}
 Pointer to the frequency vector. More...
 
std::vector< realT > * psd {nullptr}
 Pointer to the psd vector. More...
 
realT T {0}
 The sample length (units appropriate for freq) More...
 
realT minf {0}
 The minimum frequency. More...
 
realT maxf {0}
 The maximum frequency. More...
 
bool initialized {false}
 Flag controlling whether the interpolator is initialized. More...
 
math::gslInterpolator< math::gsl_interp_linear< realT > > terp
 Interpolator for the PSD. More...
 
math::gslInterpolator< math::gsl_interp_steffen< realT > > terp
 Interpolator for the PSD. More...
 

Member Function Documentation

◆ psdVal()

template<typename _realT >
realT mx::sigproc::psdVarMeanParams< _realT >::psdVal ( realT  k)
inline

Get the value of the PSD at k using interpolation.

Extrapolates outside the range of frequencies in freq. Right now this is just constant.

Todo:
implement better extrapolation past max-freq.
Parameters
[in]kThe transformed frequency coordinate

Definition at line 81 of file psdVarMean.hpp.

References mx::sigproc::psdVarMeanParams< _realT >::freq, mx::sigproc::psdVarMeanParams< _realT >::initialized, mx::astro::constants::k(), mx::sigproc::psdVarMeanParams< _realT >::maxf, mx::sigproc::psdVarMeanParams< _realT >::minf, mx::sigproc::psdVarMeanParams< _realT >::psd, mx::sigproc::psdVarMeanParams< _realT >::T, and mx::sigproc::psdVarMeanParams< _realT >::terp.

Member Data Documentation

◆ freq

template<typename _realT >
std::vector<realT>* mx::sigproc::psdVarMeanParams< _realT >::freq {nullptr}

Pointer to the frequency vector.

Definition at line 58 of file psdVarMean.hpp.

Referenced by mx::sigproc::psdVarMeanParams< _realT >::psdVal().

◆ initialized

template<typename _realT >
bool mx::sigproc::psdVarMeanParams< _realT >::initialized {false}

Flag controlling whether the interpolator is initialized.

Definition at line 67 of file psdVarMean.hpp.

Referenced by mx::sigproc::psdVarMeanParams< _realT >::psdVal().

◆ maxf

template<typename _realT >
realT mx::sigproc::psdVarMeanParams< _realT >::maxf {0}

The maximum frequency.

Definition at line 63 of file psdVarMean.hpp.

Referenced by mx::sigproc::psdVarMeanParams< _realT >::psdVal().

◆ minf

template<typename _realT >
realT mx::sigproc::psdVarMeanParams< _realT >::minf {0}

The minimum frequency.

Definition at line 62 of file psdVarMean.hpp.

Referenced by mx::sigproc::psdVarMeanParams< _realT >::psdVal().

◆ psd

template<typename _realT >
std::vector<realT>* mx::sigproc::psdVarMeanParams< _realT >::psd {nullptr}

Pointer to the psd vector.

Definition at line 59 of file psdVarMean.hpp.

Referenced by mx::sigproc::psdVarMeanParams< _realT >::psdVal().

◆ T

template<typename _realT >
realT mx::sigproc::psdVarMeanParams< _realT >::T {0}

The sample length (units appropriate for freq)

Definition at line 60 of file psdVarMean.hpp.

Referenced by mx::sigproc::psdVarMeanParams< _realT >::psdVal().

◆ terp [1/2]

template<typename _realT >
math::gslInterpolator<math::gsl_interp_linear<realT> > mx::sigproc::psdVarMeanParams< _realT >::terp

Interpolator for the PSD.

Definition at line 70 of file psdVarMean.hpp.

Referenced by mx::sigproc::psdVarMeanParams< _realT >::psdVal().

◆ terp [2/2]

template<typename _realT >
math::gslInterpolator<math::gsl_interp_steffen<realT> > mx::sigproc::psdVarMeanParams< _realT >::terp

Interpolator for the PSD.

Definition at line 72 of file psdVarMean.hpp.


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