v2.0.0
Loading...
Searching...
No Matches
epoch_extractor.h
Go to the documentation of this file.
1//=============================================================================================================
20
21#ifndef EPOCH_EXTRACTOR_DSP_H
22#define EPOCH_EXTRACTOR_DSP_H
23
24//=============================================================================================================
25// INCLUDES
26//=============================================================================================================
27
28#include "dsp_global.h"
29
30#include <mne/mne_epoch_data.h>
31
32//=============================================================================================================
33// EIGEN INCLUDES
34//=============================================================================================================
35
36#include <Eigen/Core>
37
38//=============================================================================================================
39// QT INCLUDES
40//=============================================================================================================
41
42#include <QVector>
43
44//=============================================================================================================
45// DEFINE NAMESPACE UTILSLIB
46//=============================================================================================================
47
48namespace UTILSLIB
49{
50
51//=============================================================================================================
54{
55 double dTmin = -0.2;
56 double dTmax = 0.5;
57 double dBaseMin = -0.2;
58 double dBaseMax = 0.0;
59 double dThreshold = 0.0;
61 bool bApplyBaseline = true;
62};
63
64//=============================================================================================================
85{
86public:
88
89 //=========================================================================================================
110 static QVector<MNELIB::MNEEpochData> extract(const Eigen::MatrixXd& matData,
111 const QVector<int>& eventSamples,
112 double dSFreq,
113 const Params& params = Params(),
114 const QVector<int>& eventCodes = QVector<int>());
115
116 //=========================================================================================================
124 static Eigen::MatrixXd average(const QVector<MNELIB::MNEEpochData>& epochs);
125
126 //=========================================================================================================
134 static QVector<MNELIB::MNEEpochData> rejectMarked(const QVector<MNELIB::MNEEpochData>& epochs);
135
136private:
137 //=========================================================================================================
148 static void applyBaseline(Eigen::MatrixXd& matEpoch, int iBase0, int iBase1);
149};
150
151} // namespace UTILSLIB
152
153#endif // EPOCH_EXTRACTOR_DSP_H
Single epoch (one trial slice of preprocessed sensor data) with timing and rejection metadata.
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).
Epoch extraction parameters (defined outside class to avoid Clang/GCC default-argument issues with ne...
Segments continuous raw data into fixed-length epochs locked to events.
static QVector< MNELIB::MNEEpochData > rejectMarked(const QVector< MNELIB::MNEEpochData > &epochs)
static QVector< MNELIB::MNEEpochData > extract(const Eigen::MatrixXd &matData, const QVector< int > &eventSamples, double dSFreq, const Params &params=Params(), const QVector< int > &eventCodes=QVector< int >())
EpochExtractorParams Params
static Eigen::MatrixXd average(const QVector< MNELIB::MNEEpochData > &epochs)