v2.0.0
Loading...
Searching...
No Matches
morlet_tfr.h
Go to the documentation of this file.
1//=============================================================================================================
28
29#ifndef MORLET_TFR_H
30#define MORLET_TFR_H
31
32//=============================================================================================================
33// INCLUDES
34//=============================================================================================================
35
36#include "dsp_global.h"
37
38//=============================================================================================================
39// EIGEN INCLUDES
40//=============================================================================================================
41
42#include <Eigen/Core>
43
44//=============================================================================================================
45// QT INCLUDES
46//=============================================================================================================
47
48#include <QVector>
49
50//=============================================================================================================
51// DEFINE NAMESPACE UTILSLIB
52//=============================================================================================================
53
54namespace UTILSLIB
55{
56
57//=============================================================================================================
62{
63 Eigen::MatrixXd matPower;
64 Eigen::RowVectorXd vecFreqs;
65};
66
67//=============================================================================================================
84{
85public:
86 //=========================================================================================================
96 static MorletTfrResult compute(const Eigen::RowVectorXd& vecData,
97 double dSFreq,
98 const Eigen::RowVectorXd& vecFreqs,
99 double dNCycles = 7.0);
100
101 //=========================================================================================================
112 static QVector<MorletTfrResult> computeMultiChannel(
113 const Eigen::MatrixXd& matData,
114 double dSFreq,
115 const Eigen::RowVectorXd& vecFreqs,
116 double dNCycles = 7.0,
117 const Eigen::RowVectorXi& vecPicks = Eigen::RowVectorXi());
118
119private:
120 //=========================================================================================================
130 static Eigen::VectorXcd buildWavelet(double dFreq, double dSFreq, double dNCycles, int& halfLen);
131
133 static int nextPow2(int n);
134};
135
136} // namespace UTILSLIB
137
138#endif // MORLET_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 Morlet TFR computation for one channel.
Definition morlet_tfr.h:62
Eigen::RowVectorXd vecFreqs
Centre frequencies in Hz, length n_freqs.
Definition morlet_tfr.h:64
Eigen::MatrixXd matPower
n_freqs × n_times, instantaneous power (amplitude²)
Definition morlet_tfr.h:63
Complex Morlet wavelet time-frequency representation.
Definition morlet_tfr.h:84
static MorletTfrResult compute(const Eigen::RowVectorXd &vecData, double dSFreq, const Eigen::RowVectorXd &vecFreqs, double dNCycles=7.0)
static QVector< MorletTfrResult > computeMultiChannel(const Eigen::MatrixXd &matData, double dSFreq, const Eigen::RowVectorXd &vecFreqs, double dNCycles=7.0, const Eigen::RowVectorXi &vecPicks=Eigen::RowVectorXi())