MorletTfrResult
Namespace: RTPROCESSINGLIB · Library: DSP Library
#include <dsp/morlet_tfr.h>
struct UTILSLIB::MorletTfrResult
Result of a Morlet TFR computation for one channel.
src/examples/ex_dsp_spectral/main.cpp
RowVectorXd morletFreqs(3);
morletFreqs << 20.0, 35.0, 55.0;
const MorletTfrResult morlet = MorletTfr::compute(signal, kSFreq, morletFreqs, 7.0);
Example
- Full source:
src/examples/ex_dsp_spectral/main.cpp - Build target:
ex_dsp_spectral(runs under CTest)
Used in examples
ex_dsp_spectral
Spectral and filtering tools of the dsp library on signals with known content.
src/examples/ex_dsp_spectral/main.cpp, line 152
RowVectorXd morletFreqs(3);
morletFreqs << 20.0, 35.0, 55.0;
const MorletTfrResult morlet = MorletTfr::compute(signal, kSFreq, morletFreqs, 7.0);
const VectorXd middle = morlet.matPower.col(n / 2);
// Power of a sine of amplitude A is ~ A^2 times a common wavelet gain: 20 Hz carries 4x the 55 Hz power
ok &= expect(middle(0) > 3.0 * middle(2) && middle(2) > 10.0 * middle(1),
QString("Morlet power at 20/35/55 Hz: %1 / %2 / %3").arg(middle(0)).arg(middle(1)).arg(middle(2)));
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>