v2.0.0
Loading...
Searching...
No Matches
fiff_epochs.h
Go to the documentation of this file.
1//=============================================================================================================
16
17#ifndef FIFF_EPOCHS_H
18#define FIFF_EPOCHS_H
19
20//=============================================================================================================
21// INCLUDES
22//=============================================================================================================
23
24#include "fiff_global.h"
25#include "fiff_evoked.h"
26
27//=============================================================================================================
28// EIGEN INCLUDES
29//=============================================================================================================
30
31#include <Eigen/Core>
32
33//=============================================================================================================
34// QT INCLUDES
35//=============================================================================================================
36
37#include <QList>
38#include <QPair>
39
40//=============================================================================================================
41// DEFINE NAMESPACE FIFFLIB
42//=============================================================================================================
43
44namespace FIFFLIB
45{
46
47//=============================================================================================================
58{
59 Eigen::MatrixXd data;
60 double tmin = 0.0;
61 double tmax = 0.0;
62};
63
64//=============================================================================================================
74{
75public:
76 //=========================================================================================================
91 static QList<FiffEpochData> makeFixedLengthEpochs(const Eigen::MatrixXd& matData,
92 double dSFreq,
93 double dDuration,
94 double dOverlap = 0.0,
95 bool bDropLast = true);
96
97 //=========================================================================================================
105 static QList<FiffEpochData> concatenateEpochs(const QList<QList<FiffEpochData>>& epochSets);
106
107 //=========================================================================================================
120 static FiffEvoked averageEpochs(const QList<FiffEpochData>& epochs,
121 double dSFreq,
122 const QString& comment = "Average");
123
124 //=========================================================================================================
135 static QList<Eigen::MatrixXd> toMatrixList(const QList<FiffEpochData>& epochs);
136};
137
138} // namespace FIFFLIB
139
140#endif // FIFF_EPOCHS_H
Single averaged evoked response: time axis, samples, baseline, channel info and processing history.
Export/import macros and build-info accessors for the FIFFLIB shared library.
#define FIFFSHARED_EXPORT
Definition fiff_global.h:44
FIFF file I/O, in-memory data structures and high-level readers/writers.
Fixed-length epoching result: the (nepoch × nchan × nsamples) data stack plus the matching FiffInfo.
Definition fiff_epochs.h:58
Eigen::MatrixXd data
Definition fiff_epochs.h:59
Static helpers that cut continuous data into fixed-length epochs, concatenate and average them.
Definition fiff_epochs.h:74
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.
Single averaged evoked response: time axis, data, baseline, channel info and averaging metadata.
Definition fiff_evoked.h:77