v2.0.0
Loading...
Searching...
No Matches
FiffEpochs Class Reference

Free / static helpers that turn a FiffRawData plus an event list into fixed-length epochs. More...

#include <fiff_epochs.h>

Static Public Member Functions

static QList< FiffEpochDatamakeFixedLengthEpochs (const Eigen::MatrixXd &matData, double dSFreq, double dDuration, double dOverlap=0.0, bool bDropLast=true)
 Create fixed-length epochs from continuous data.
static QList< FiffEpochDataconcatenateEpochs (const QList< QList< FiffEpochData > > &epochSets)
 Concatenate multiple epoch sets into a single list.
static FiffEvoked averageEpochs (const QList< FiffEpochData > &epochs, double dSFreq, const QString &comment="Average")
 Compute the average (evoked response) across epochs.
static QList< Eigen::MatrixXd > toMatrixList (const QList< FiffEpochData > &epochs)
 Extract data matrices from epoch structures.

Detailed Description

Free / static helpers that turn a FiffRawData plus an event list into fixed-length epochs.

Stateless — operates on the FiffRawData and event arguments directly. Used by the source-reconstruction pipeline and by the offline averaging tooling when building epochs for an FiffEvokedSet.

Definition at line 75 of file fiff_epochs.h.

Member Function Documentation

◆ averageEpochs()

FiffEvoked FiffEpochs::averageEpochs ( const QList< FiffEpochData > & epochs,
double dSFreq,
const QString & comment = "Average" )
static

Compute the average (evoked response) across epochs.

All epochs must have the same dimensions. Returns a FiffEvoked with data, nave, times, and aspect_kind populated.

Parameters
[in]epochsList of epochs.
[in]dSFreqSampling frequency in Hz (used to compute times vector).
[in]commentComment string for the evoked (default "Average").
Returns
FiffEvoked with averaged data and metadata.

Definition at line 110 of file fiff_epochs.cpp.

◆ concatenateEpochs()

QList< FiffEpochData > FiffEpochs::concatenateEpochs ( const QList< QList< FiffEpochData > > & epochSets)
static

Concatenate multiple epoch sets into a single list.

Parameters
[in]epochSetsList of epoch sets to concatenate.
Returns
Combined list of all epochs.

Definition at line 98 of file fiff_epochs.cpp.

◆ makeFixedLengthEpochs()

QList< FiffEpochData > FiffEpochs::makeFixedLengthEpochs ( const Eigen::MatrixXd & matData,
double dSFreq,
double dDuration,
double dOverlap = 0.0,
bool bDropLast = true )
static

Create fixed-length epochs from continuous data.

Segments the data matrix into non-overlapping (or overlapping) epochs of the specified duration.

Parameters
[in]matDataContinuous data (n_channels × n_times).
[in]dSFreqSampling frequency in Hz.
[in]dDurationEpoch duration in seconds.
[in]dOverlapOverlap between epochs in seconds (default 0.0).
[in]bDropLastDrop the last epoch if it's shorter than duration (default true).
Returns
List of epoch data structures.

Definition at line 47 of file fiff_epochs.cpp.

◆ toMatrixList()

QList< MatrixXd > FiffEpochs::toMatrixList ( const QList< FiffEpochData > & epochs)
static

Extract data matrices from epoch structures.

Convenience method to get a list of data matrices from epoch structures, suitable for use with CSP, SPoC, SSD, etc.

Parameters
[in]epochsList of epoch data.
Returns
List of data matrices (n_channels × n_times).

Definition at line 158 of file fiff_epochs.cpp.


The documentation for this class was generated from the following files: