Skip to main content

MultitaperTfrResult

Namespace: RTPROCESSINGLIB  ·  Library: DSP Library

#include <dsp/multitaper_tfr.h>

struct UTILSLIB::MultitaperTfrResult

Result of a multitaper TFR computation.

src/examples/ex_dsp_spectral/main.cpp
const MultitaperTfrResult tfr = MultitaperTfr::compute(signal, kSFreq, 128, 32); // 128-sample windows, 32-sample hop

Example​

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 145
const MultitaperTfrResult tfr = MultitaperTfr::compute(signal, kSFreq, 128, 32); // 128-sample windows, 32-sample hop
const RowVectorXd tfrMean = tfr.tfrData[0].rowwise().mean().transpose();
ok &= expect(std::fabs(frequencyOfMax(tfrMean, tfr.vecFreqs) - 20.0) < 2.0 && tfr.vecTimes.size() == tfr.tfrData[0].cols(),
QString("multitaper TFR: %1 windows, strongest band near 20 Hz").arg(tfr.vecTimes.size()));

Authors of this file​