v2.0.0
Loading...
Searching...
No Matches
FIFFLIB::FiffEvokedSet Class Reference

evoked data set More...

#include <fiff_evoked_set.h>

Public Types

typedef QSharedPointer< FiffEvokedSetSPtr
typedef QSharedPointer< const FiffEvokedSetConstSPtr

Public Member Functions

 FiffEvokedSet ()
 FiffEvokedSet (QIODevice &p_IODevice)
 FiffEvokedSet (const FiffEvokedSet &p_FiffEvokedSet)
 ~FiffEvokedSet ()
void clear ()
FiffEvokedSet pick_channels (const QStringList &include=defaultQStringList, const QStringList &exclude=defaultQStringList) const
bool compensate_to (FiffEvokedSet &p_FiffEvokedSet, fiff_int_t to) const
bool find_evoked (const FiffEvokedSet &p_FiffEvokedSet) const
bool save (const QString &fileName) const

Static Public Member Functions

static bool read (QIODevice &p_IODevice, FiffEvokedSet &p_FiffEvokedSet, QPair< float, float > baseline=defaultFloatPair, bool proj=true)
static FiffEvokedSet computeGrandAverage (const QList< FiffEvokedSet > &evokedSets)
static FiffEvokedSet computeAverages (const FiffRawData &raw, const AverageDescription &desc, const Eigen::MatrixXi &events, QString &log)
static bool checkArtifacts (const Eigen::MatrixXd &epoch, const FiffInfo &info, const QStringList &bads, const RejectionParams &rej, QString &reason)
static void subtractBaseline (Eigen::MatrixXd &epoch, int bminSamp, int bmaxSamp)
 Subtract baseline from each channel of an epoch.

Public Attributes

FiffInfo info
QList< FiffEvokedevoked

Detailed Description

evoked data set

Fiff evoked data set

Definition at line 139 of file fiff_evoked_set.h.

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const FiffEvokedSet> FIFFLIB::FiffEvokedSet::ConstSPtr

Const shared pointer type for FiffEvokedSet.

Definition at line 144 of file fiff_evoked_set.h.

◆ SPtr

Shared pointer type for FiffEvokedSet.

Definition at line 143 of file fiff_evoked_set.h.

Constructor & Destructor Documentation

◆ FiffEvokedSet() [1/3]

FiffEvokedSet::FiffEvokedSet ( )

Constructs a fiff evoked data set.

Definition at line 75 of file fiff_evoked_set.cpp.

◆ FiffEvokedSet() [2/3]

FiffEvokedSet::FiffEvokedSet ( QIODevice & p_IODevice)

Constructs a fiff evoked data set, by reading from a IO device.

Parameters
[in]p_IODeviceIO device to read from the evoked data set.

Definition at line 83 of file fiff_evoked_set.cpp.

◆ FiffEvokedSet() [3/3]

FiffEvokedSet::FiffEvokedSet ( const FiffEvokedSet & p_FiffEvokedSet)

Copy constructor.

Parameters
[in]p_FiffEvokedSetFiff evoked data set which should be copied.

Definition at line 97 of file fiff_evoked_set.cpp.

◆ ~FiffEvokedSet()

FiffEvokedSet::~FiffEvokedSet ( )

Destroys the fiff evoked data set.

Definition at line 105 of file fiff_evoked_set.cpp.

Member Function Documentation

◆ checkArtifacts()

bool FiffEvokedSet::checkArtifacts ( const Eigen::MatrixXd & epoch,
const FiffInfo & info,
const QStringList & bads,
const RejectionParams & rej,
QString & reason )
static

Check whether an epoch passes artifact rejection criteria.

Parameters
[in]epochEpoch data (nChannels x nSamples).
[in]infoChannel info.
[in]badsList of bad channel names.
[in]rejRejection parameters.
[out]reasonRejection reason string (set only when rejected).
Returns
true if epoch is clean (not rejected).

Definition at line 449 of file fiff_evoked_set.cpp.

◆ clear()

void FiffEvokedSet::clear ( )

Initializes fiff evoked data set.

Definition at line 111 of file fiff_evoked_set.cpp.

◆ compensate_to()

bool FiffEvokedSet::compensate_to ( FiffEvokedSet & p_FiffEvokedSet,
fiff_int_t to ) const

mne_compensate_to

Apply compensation to the data as desired

Parameters
[in]todesired compensation in the output.
[in,out]p_FiffEvokedSetEvoked set to compensate.
Returns
true if succeeded, false otherwise.

Definition at line 143 of file fiff_evoked_set.cpp.

◆ computeAverages()

FiffEvokedSet FiffEvokedSet::computeAverages ( const FiffRawData & raw,
const AverageDescription & desc,
const Eigen::MatrixXi & events,
QString & log )
static

Compute epoch-based averages from raw data according to an averaging description.

For each category in the description, matching events are epoched from the raw data, artifact-rejected, baseline-corrected, and averaged into a FiffEvoked entry.

Parameters
[in]rawThe raw data.
[in]descThe averaging description (categories, rejection, etc.).
[in]eventsEvent matrix (nEvents x 3): [sample, from, to].
[out]logProcessing log output.
Returns
FiffEvokedSet containing one FiffEvoked per category, or empty set on failure.

Definition at line 321 of file fiff_evoked_set.cpp.

◆ computeGrandAverage()

FiffEvokedSet FiffEvokedSet::computeGrandAverage ( const QList< FiffEvokedSet > & evokedSets)
static

Compute a grand average across multiple evoked data sets. Corresponding categories are averaged by summing data and dividing by the number of sets. The nave field accumulates the total count.

Parameters
[in]evokedSetsList of evoked data sets to combine.
Returns
The grand-average evoked set, or an empty set if input is empty.

Definition at line 274 of file fiff_evoked_set.cpp.

◆ find_evoked()

bool FiffEvokedSet::find_evoked ( const FiffEvokedSet & p_FiffEvokedSet) const

fiff_find_evoked

Find evoked data sets

Parameters
[out]p_FiffEvokedSetThe read evoked data set.
Returns
true when any set was found, false otherwise.

Definition at line 171 of file fiff_evoked_set.cpp.

◆ pick_channels()

FiffEvokedSet FiffEvokedSet::pick_channels ( const QStringList & include = defaultQStringList,
const QStringList & exclude = defaultQStringList ) const

fiff_pick_channels_evoked

Pick desired channels from evoked-response data

Parameters
[in]include- Channels to include (if empty, include all available).
[in]exclude- Channels to exclude (if empty, do not exclude any).
Returns
the desired fiff evoked data set.

Definition at line 119 of file fiff_evoked_set.cpp.

◆ read()

bool FiffEvokedSet::read ( QIODevice & p_IODevice,
FiffEvokedSet & p_FiffEvokedSet,
QPair< float, float > baseline = defaultFloatPair,
bool proj = true )
static

fiff_read_evoked

Wrapper for the FiffEvokedDataSet::read_evoked static function

Read one evoked data set

Parameters
[in]p_IODeviceAn fiff IO device like a fiff QFile or QTCPSocket.
[out]p_FiffEvokedSetThe read evoked data set.
[in]baselineThe time interval to apply rescaling / baseline correction. If None do not apply it. If baseline is (a, b). the interval is between "a (s)" and "b (s)". If a is None the beginning of the data is used and if b is None then b is set to the end of the interval. If baseline is equal ot (None, None) all the time interval is used. If None, no correction is applied.
[in]projApply SSP projection vectors (optional, default = true).
Returns
true when successful, false otherwise.

Definition at line 189 of file fiff_evoked_set.cpp.

◆ save()

bool FiffEvokedSet::save ( const QString & fileName) const

Save this evoked data set to a FIFF file.

Parameters
[in]fileNameOutput file path.
Returns
true on success.

Definition at line 250 of file fiff_evoked_set.cpp.

◆ subtractBaseline()

void FiffEvokedSet::subtractBaseline ( Eigen::MatrixXd & epoch,
int bminSamp,
int bmaxSamp )
static

Subtract baseline from each channel of an epoch.

For each row (channel), the mean of the samples in [bminSamp, bminSamp+nBase) is subtracted.

Parameters
[in,out]epochData matrix (channels x samples) to correct in-place.
[in]bminSampFirst baseline sample (clamped to 0).
[in]bmaxSampLast baseline sample (clamped to epoch length - 1).

Definition at line 306 of file fiff_evoked_set.cpp.

Member Data Documentation

◆ evoked

QList<FiffEvoked> FIFFLIB::FiffEvokedSet::evoked

List of Fiff Evoked Data.

Definition at line 312 of file fiff_evoked_set.h.

◆ info

FiffInfo FIFFLIB::FiffEvokedSet::info

FIFF measurement information.

Definition at line 311 of file fiff_evoked_set.h.


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