v2.0.0
Loading...
Searching...
No Matches
fiff_epochs.h
Go to the documentation of this file.
1//=============================================================================================================
21
22#ifndef FIFF_EPOCHS_H
23#define FIFF_EPOCHS_H
24
25//=============================================================================================================
26// INCLUDES
27//=============================================================================================================
28
29#include "fiff_global.h"
30#include "fiff_evoked.h"
31
32//=============================================================================================================
33// EIGEN INCLUDES
34//=============================================================================================================
35
36#include <Eigen/Core>
37
38//=============================================================================================================
39// QT INCLUDES
40//=============================================================================================================
41
42#include <QList>
43#include <QPair>
44
45//=============================================================================================================
46// DEFINE NAMESPACE FIFFLIB
47//=============================================================================================================
48
49namespace FIFFLIB
50{
51
52//=============================================================================================================
61{
62 Eigen::MatrixXd data;
63 double tmin = 0.0;
64 double tmax = 0.0;
65};
66
67//=============================================================================================================
76{
77public:
78 //=========================================================================================================
93 static QList<FiffEpochData> makeFixedLengthEpochs(const Eigen::MatrixXd& matData,
94 double dSFreq,
95 double dDuration,
96 double dOverlap = 0.0,
97 bool bDropLast = true);
98
99 //=========================================================================================================
107 static QList<FiffEpochData> concatenateEpochs(const QList<QList<FiffEpochData>>& epochSets);
108
109 //=========================================================================================================
122 static FiffEvoked averageEpochs(const QList<FiffEpochData>& epochs,
123 double dSFreq,
124 const QString& comment = "Average");
125
126 //=========================================================================================================
137 static QList<Eigen::MatrixXd> toMatrixList(const QList<FiffEpochData>& epochs);
138};
139
140} // namespace FIFFLIB
141
142#endif // FIFF_EPOCHS_H
Export/import macros and build-info accessors for the FIFFLIB shared library.
#define FIFFSHARED_EXPORT
Definition fiff_global.h:44
Single averaged evoked response: time axis, samples, baseline, channel info and processing history.
FIFF file I/O, in-memory data structures and high-level readers/writers.
Eigen::MatrixXd data
Definition fiff_epochs.h:62
Free / static helpers that turn a FiffRawData plus an event list into fixed-length epochs.
Definition fiff_epochs.h:76
static QList< FiffEpochData > makeFixedLengthEpochs(const Eigen::MatrixXd &matData, double dSFreq, double dDuration, double dOverlap=0.0, bool bDropLast=true)
Create fixed-length epochs from continuous data.
static QList< FiffEpochData > concatenateEpochs(const QList< QList< FiffEpochData > > &epochSets)
Concatenate multiple epoch sets into a single list.
static QList< Eigen::MatrixXd > toMatrixList(const QList< FiffEpochData > &epochs)
Extract data matrices from epoch structures.
static FiffEvoked averageEpochs(const QList< FiffEpochData > &epochs, double dSFreq, const QString &comment="Average")
Compute the average (evoked response) across epochs.