mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
mx::sigproc Namespace Reference

Namespaces

namespace  psdFilterTypes
 
namespace  window
 

Classes

struct  autocorrelationFromPSD
 Functor for calculating the autocorrelation given a PSD. More...
 
class  averagePeriodogram
 Calculate the average periodogram of a time-series. More...
 
class  circularBufferBase
 CRTP base class for all circular buffers, providing the underlying memory management and accessors. More...
 
class  circularBufferBranch
 Circular buffer which wraps with an if statement (branching) [faster than mod, less memory than index]. More...
 
class  circularBufferIndex
 Circular buffer which wraps with a pre-populated indices array [generally fastest]. More...
 
class  circularBufferMod
 Circular buffer which wraps with the mod opoerator [very slow]. More...
 
struct  fourierModeDef
 Structure to contain the parameters of a Fourier mode. More...
 
struct  linearPredictor
 A class to support linear prediction. More...
 
class  psdFilter
 
class  psdFilter< _realT, 1 >
 A class for filtering noise with PSDs using CUDA cuFFT. More...
 
class  psdFilter< _realT, _rank, 0 >
 A class for filtering noise with PSDs. More...
 
struct  psdVarMean
 Calculate the variance of the mean for a process given its PSD. More...
 
struct  psdVarMeanParams
 Parameters for calculating the variance of the mean from a numerical PSD. More...
 

Functions

template<typename realT >
realT ar1FreqPhase (realT f, realT fsamp)
 Get the phase of a given frequency.
 
template<typename realT >
realT ar1PSDNorm (realT beta, realT alpha, realT fpole, realT fsamp)
 Calculate the norm of an AR1 PSD.
 
template<typename realT >
void ar1PSD (std::vector< realT > &psd, const std::vector< realT > &f, realT beta, realT alpha, realT fpole)
 Generate an AR1 PSD.
 
template<typename realT >
void ar1PSD (std::vector< realT > &psd, const std::vector< realT > &f, realT beta, std::complex< realT > alpha)
 Generate an AR1 PSD.
 
template<typename realT >
void arNPSD (std::vector< realT > &psd, const std::vector< realT > &f, realT fmax, realT var, std::vector< realT > alphaMag, std::vector< realT > alphaPhase)
 
template<typename T >
void autocorrelation (T *ac, size_t Nac, T *sig, size_t Nsig)
 Calculate the autocorrelation of a time-series.
 
template<typename T >
void autocorrelation (std::vector< T > &ac, std::vector< T > &sig)
 Calculate the autocorrelation of a time-series.
 
template<typename realT >
int basisMask (improc::eigenCube< realT > &modes, improc::eigenImage< realT > &mask)
 Mask a basis set.
 
template<typename realT >
int basisMeanSub (improc::eigenCube< realT > &modes, improc::eigenImage< realT > &mask, bool postMult=true)
 Mean-subtract a basis set.
 
template<typename realT >
int basisNormalize (improc::eigenCube< realT > &modes, improc::eigenImage< realT > &mask)
 Normalize a basis set.
 
template<typename realT >
int basisAmplitudes (std::vector< realT > &amps, improc::eigenImage< realT > &im, improc::eigenCube< realT > &modes, improc::eigenImage< realT > &mask, bool subtract=false, int meanIgnore=0, int N=-1)
 Measure the amplitudes of a set of basis modes fit to an image. Optionally subtract them.
 
template<int progress = 0, typename eigenTout , typename eigenTin >
void gramSchmidt (eigenTout &out, const eigenTin &in, bool normalize=true)
 Perform Gram-Schmidt ortogonalization of a basis set, and normalize the result.
 
template<int progress = 0, typename eigenTout , typename eigenTin , typename eigenTWin >
void gramSchmidt (eigenTout &out, const eigenTin &in, const eigenTWin &window)
 Perform Gram-Schmidt ortogonalization of a basis set on a window, and normalize the result.
 
template<int progress = 0, typename eigenT >
void baseSpectrum (eigenT &bspect, eigenT &gsspect)
 
template<int progress = 0, typename eigenTout , typename eigenTout2 , typename eigenTin >
void gramSchmidtSpectrum (eigenTout &out, eigenTout2 &spect, const eigenTin &in, typename eigenTin::Scalar normPix=0.0)
 Perform Gram-Schmidt ortogonalization of a basis set, and normalize the result, while recording the spectrum.
 
template<typename paramsT >
paramsT::realT psdVarMeanFunc (typename paramsT::realT k, void *params)
 Integration worker function for psdVarMean::operator()
 
int noll_j (unsigned int n, int m)
 
int nZernRadOrd (unsigned int n)
 

Function Documentation

◆ arNPSD()

template<typename realT >
void mx::sigproc::arNPSD ( std::vector< realT > &  psd,
const std::vector< realT > &  f,
realT  fmax,
realT  var,
std::vector< realT alphaMag,
std::vector< realT alphaPhase 
)

Definition at line 150 of file arpsd.hpp.

References mx::math::six_fifths().

◆ baseSpectrum()

template<int progress = 0, typename eigenT >
void mx::sigproc::baseSpectrum ( eigenT &  bspect,
eigenT &  gsspect 
)

Definition at line 139 of file gramSchmidt.hpp.

Referenced by gramSchmidtSpectrum().

◆ noll_j()

int mx::sigproc::noll_j ( unsigned int  n,
int  m 
)

Definition at line 52 of file zernike.cpp.

◆ nZernRadOrd()

int mx::sigproc::nZernRadOrd ( unsigned int  n)

Definition at line 70 of file zernike.cpp.

References noll_j().

◆ psdVarMeanFunc()

template<typename paramsT >
paramsT::realT mx::sigproc::psdVarMeanFunc ( typename paramsT::realT  k,
void *  params 
)

Integration worker function for psdVarMean::operator()

Template Parameters
paramsTthe type of the parameter structure. See psdVarMean.
Returns
the value of the integrand at k
Parameters
[in]kthe scaled frequency coordinate
[in]paramspointer to the parameter structure

Definition at line 137 of file psdVarMean.hpp.

References mx::math::six_fifths().