Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SpectrumSolver Class Referenceabstract

#include <spectrumsolver.h>

Inheritance diagram for SpectrumSolver:
Inheritance graph
[legend]

Public Types

typedef double(* tfuncIC )(double sigma2, int p, int t)
 

Public Member Functions

void exec (const std::vector< std::complex< double > > &memin, std::vector< std::complex< double > > &memout, int t0, double tol, FFT::twindowfunc windowfunc, double windowlength) throw (XKameError&)
 Perform spectrum analysis.
 
const std::vector
< std::complex< double > > & 
ifft () const
 
const std::vector< std::pair
< double, double > > & 
peaks () const
 
virtual bool isFT () const
 

Static Public Member Functions

static double icAIC (double loglikelifood, int k, int n)
 
static double icAICc (double loglikelifood, int k, int n)
 
static double icHQ (double loglikelifood, int k, int n)
 
static double icMDL (double loglikelifood, int k, int n)
 
static double windowLength (int tdlen, int t0, double windowlength)
 
static void window (int t, int t0, FFT::twindowfunc windowfunc, double windowlength, std::vector< double > &window)
 Create a window waveform.
 

Protected Member Functions

virtual void genSpectrum (const std::vector< std::complex< double > > &memin, std::vector< std::complex< double > > &memout, int t0, double tol, FFT::twindowfunc windowfunc, double windowlength)=0
 
virtual bool hasWeighting () const
 If false, perform rectangular windowing before solver process.
 
double numberOfNoises (const std::vector< std::complex< double > > &memin)
 
void genIFFT (const std::vector< std::complex< double > > &wavein)
 
double lspe (const std::vector< std::complex< double > > &wavein, int origin, const std::vector< double > &psd, std::vector< std::complex< double > > &waveout, double tol, bool powfit, FFT::twindowfunc windowfunc)
 
double stepLSPE (const std::vector< std::complex< double > > &wavein, int origin, const std::vector< double > &psd, std::vector< std::complex< double > > &waveout, bool powfit, double &coeff, const std::vector< double > &weight)
 
int fftlen () const
 
void autoCorrelation (const std::vector< std::complex< double > > &wave, std::vector< std::complex< double > > &corr)
 

Protected Attributes

std::vector< std::complex
< double > > 
m_ifft
 
std::vector< std::pair< double,
double > > 
m_peaks
 
shared_ptr< FFTm_fftN
 
shared_ptr< FFTm_ifftN
 
shared_ptr< FFTm_fftRX
 For autocorrelation.
 
shared_ptr< FFTm_ifftRX
 

Detailed Description

Base class for spectrum solvers.

See Also
FFTSolver, MEMStrict, CompositeSpectrumSolver, FreqEstimation, MemBurg, YuleWalkerAR

Definition at line 27 of file spectrumsolver.h.

Member Function Documentation

double SpectrumSolver::icAIC ( double  loglikelifood,
int  k,
int  n 
)
static

Akachi's information criterion.

Parameters
loglikelifoodln(L).
k# of parameters.
n# of samples.

Definition at line 23 of file spectrumsolver.cpp.

double SpectrumSolver::icAICc ( double  loglikelifood,
int  k,
int  n 
)
static

Corrected Akachi's information criterion.

See Also
icAIC

Definition at line 27 of file spectrumsolver.cpp.

double SpectrumSolver::icHQ ( double  loglikelifood,
int  k,
int  n 
)
static

Hannan-Quinn information criterion.

See Also
icAIC

Definition at line 31 of file spectrumsolver.cpp.

double SpectrumSolver::icMDL ( double  loglikelifood,
int  k,
int  n 
)
static

Minimum Description Length.

See Also
icAIC

Definition at line 35 of file spectrumsolver.cpp.

double SpectrumSolver::lspe ( const std::vector< std::complex< double > > &  wavein,
int  origin,
const std::vector< double > &  psd,
std::vector< std::complex< double > > &  waveout,
double  tol,
bool  powfit,
FFT::twindowfunc  windowfunc 
)
protected

Least-square phase estimation.

Returns
coeff.

Definition at line 113 of file spectrumsolver.cpp.

References stepLSPE(), and window().

double SpectrumSolver::numberOfNoises ( const std::vector< std::complex< double > > &  memin)
protected
Returns
estimated number of effective (noisy) data points.

Definition at line 203 of file spectrumsolver.cpp.

const std::vector<std::pair<double, double> >& SpectrumSolver::peaks ( ) const
inline
Returns
(power, index) in descending order.

Definition at line 37 of file spectrumsolver.h.

Referenced by XNMRPulseAnalyzer::analyze(), and XNMRPulseAnalyzer::visualize().

double SpectrumSolver::stepLSPE ( const std::vector< std::complex< double > > &  wavein,
int  origin,
const std::vector< double > &  psd,
std::vector< std::complex< double > > &  waveout,
bool  powfit,
double &  coeff,
const std::vector< double > &  weight 
)
protected
Returns
err.

Definition at line 154 of file spectrumsolver.cpp.

Referenced by lspe().


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

Generated for KAME4 by  doxygen 1.8.3