v2.0.0
Loading...
Searching...
No Matches
multitaper_tfr.h
Go to the documentation of this file.
1//=============================================================================================================
27
28#ifndef MULTITAPER_TFR_H
29#define MULTITAPER_TFR_H
30
31//=============================================================================================================
32// INCLUDES
33//=============================================================================================================
34
35#include "dsp_global.h"
36
37//=============================================================================================================
38// EIGEN INCLUDES
39//=============================================================================================================
40
41#include <Eigen/Core>
42
43//=============================================================================================================
44// QT INCLUDES
45//=============================================================================================================
46
47#include <QVector>
48
49//=============================================================================================================
50// DEFINE NAMESPACE UTILSLIB
51//=============================================================================================================
52
53namespace UTILSLIB
54{
55
56//=============================================================================================================
63{
64 QVector<Eigen::MatrixXd> tfrData;
65 Eigen::RowVectorXd vecFreqs;
66 Eigen::RowVectorXd vecTimes;
67};
68
69//=============================================================================================================
79{
80public:
81 //=========================================================================================================
93 static MultitaperTfrResult compute(const Eigen::MatrixXd& matData,
94 double sfreq,
95 int windowSize = 256,
96 int stepSize = -1,
97 double halfBandwidth = 4.0,
98 int nTapers = -1);
99
100 //=========================================================================================================
113 static MultitaperTfrResult computeArray(const Eigen::MatrixXd& matData,
114 double sfreq,
115 const Eigen::RowVectorXd& vecFreqs,
116 double nCycles = 7.0,
117 double timeBandwidth = 4.0,
118 bool zeroMean = true);
119};
120
121} // namespace UTILSLIB
122
123#endif // MULTITAPER_TFR_H
Export/import macros and namespace declaration for the DSP library.
#define DSPSHARED_EXPORT
Definition dsp_global.h:50
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
Result of a multitaper TFR computation.
QVector< Eigen::MatrixXd > tfrData
One matrix per channel, each: n_freqs × n_times.
Eigen::RowVectorXd vecTimes
Time axis in seconds (window centres).
Eigen::RowVectorXd vecFreqs
Frequency axis in Hz.
Sliding-window multitaper time-frequency representation.
static MultitaperTfrResult compute(const Eigen::MatrixXd &matData, double sfreq, int windowSize=256, int stepSize=-1, double halfBandwidth=4.0, int nTapers=-1)
static MultitaperTfrResult computeArray(const Eigen::MatrixXd &matData, double sfreq, const Eigen::RowVectorXd &vecFreqs, double nCycles=7.0, double timeBandwidth=4.0, bool zeroMean=true)