v2.0.0
Loading...
Searching...
No Matches
morlet_tfr.h
Go to the documentation of this file.
1//=============================================================================================================
33
34#ifndef MORLET_TFR_H
35#define MORLET_TFR_H
36
37//=============================================================================================================
38// INCLUDES
39//=============================================================================================================
40
41#include "dsp_global.h"
42
43//=============================================================================================================
44// EIGEN INCLUDES
45//=============================================================================================================
46
47#include <Eigen/Core>
48
49//=============================================================================================================
50// QT INCLUDES
51//=============================================================================================================
52
53#include <QVector>
54
55//=============================================================================================================
56// DEFINE NAMESPACE UTILSLIB
57//=============================================================================================================
58
59namespace UTILSLIB
60{
61
62//=============================================================================================================
67{
68 Eigen::MatrixXd matPower;
69 Eigen::RowVectorXd vecFreqs;
70};
71
72//=============================================================================================================
89{
90public:
91 //=========================================================================================================
101 static MorletTfrResult compute(const Eigen::RowVectorXd& vecData,
102 double dSFreq,
103 const Eigen::RowVectorXd& vecFreqs,
104 double dNCycles = 7.0);
105
106 //=========================================================================================================
117 static QVector<MorletTfrResult> computeMultiChannel(
118 const Eigen::MatrixXd& matData,
119 double dSFreq,
120 const Eigen::RowVectorXd& vecFreqs,
121 double dNCycles = 7.0,
122 const Eigen::RowVectorXi& vecPicks = Eigen::RowVectorXi());
123
124private:
125 //=========================================================================================================
135 static Eigen::VectorXcd buildWavelet(double dFreq, double dSFreq, double dNCycles, int& halfLen);
136
138 static int nextPow2(int n);
139};
140
141} // namespace UTILSLIB
142
143#endif // MORLET_TFR_H
dsp library export/import macros.
#define DSPSHARED_EXPORT
Definition dsp_global.h:56
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
Result of a Morlet TFR computation for one channel.
Definition morlet_tfr.h:67
Eigen::RowVectorXd vecFreqs
Centre frequencies in Hz, length n_freqs.
Definition morlet_tfr.h:69
Eigen::MatrixXd matPower
n_freqs × n_times, instantaneous power (amplitude²)
Definition morlet_tfr.h:68
Complex Morlet wavelet time-frequency representation.
Definition morlet_tfr.h:89
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())