Set of FiffEvoked instances sharing one FiffInfo, plus channel-picking and compensation helpers.
More...
#include <fiff_evoked_set.h>
|
| 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.
|
Set of FiffEvoked instances sharing one FiffInfo, plus channel-picking and compensation helpers.
The on-disk shape of a *-ave.fif: one FiffInfo and one FiffEvoked per FIFFB_EVOKED block (one per averaging condition). Conversion utilities pick channels and shift compensation state across the whole set in lock-step.
Definition at line 153 of file fiff_evoked_set.h.
◆ ConstSPtr
◆ ConstUPtr
◆ SPtr
◆ UPtr
◆ FiffEvokedSet() [1/3]
| FiffEvokedSet::FiffEvokedSet |
( |
| ) |
|
Constructs a fiff evoked data set.
◆ FiffEvokedSet() [2/3]
| FiffEvokedSet::FiffEvokedSet |
( |
QIODevice & | p_IODevice | ) |
|
Constructs a fiff evoked data set, by reading from a IO device.
- Parameters
-
| [in] | p_IODevice | IO device to read from the evoked data set. |
◆ FiffEvokedSet() [3/3]
| FiffEvokedSet::FiffEvokedSet |
( |
const FiffEvokedSet & | p_FiffEvokedSet | ) |
|
Copy constructor.
- Parameters
-
| [in] | p_FiffEvokedSet | Fiff evoked data set which should be copied. |
◆ ~FiffEvokedSet()
| FiffEvokedSet::~FiffEvokedSet |
( |
| ) |
|
Destroys the fiff evoked data set.
◆ 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] | epoch | Epoch data (nChannels x nSamples). |
| [in] | info | Channel info. |
| [in] | bads | List of bad channel names. |
| [in] | rej | Rejection parameters. |
| [out] | reason | Rejection reason string (set only when rejected). |
- Returns
- true if epoch is clean (not rejected).
◆ clear()
| void FiffEvokedSet::clear |
( |
| ) |
|
Initializes fiff evoked data set.
◆ 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] | to | desired compensation in the output. |
| [in,out] | p_FiffEvokedSet | Evoked set to compensate. |
- Returns
- true if succeeded, false otherwise.
◆ computeAverages()
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] | raw | The raw data. |
| [in] | desc | The averaging description (categories, rejection, etc.). |
| [in] | events | Event matrix (nEvents x 3): [sample, from, to]. |
| [out] | log | Processing log output. |
- Returns
- FiffEvokedSet containing one FiffEvoked per category, or empty set on failure.
◆ computeGrandAverage()
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] | evokedSets | List of evoked data sets to combine. |
- Returns
- The grand-average evoked set, or an empty set if input is empty.
◆ find_evoked()
| bool FiffEvokedSet::find_evoked |
( |
const FiffEvokedSet & | p_FiffEvokedSet | ) |
const |
fiff_find_evoked
Find evoked data sets
- Parameters
-
| [out] | p_FiffEvokedSet | The read evoked data set. |
- Returns
- true when any set was found, false otherwise.
◆ 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.
◆ 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_IODevice | An fiff IO device like a fiff QFile or QTCPSocket. |
| [out] | p_FiffEvokedSet | The read evoked data set. |
| [in] | baseline | The 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] | proj | Apply SSP projection vectors (optional, default = true). |
- Returns
- true when successful, false otherwise.
◆ save()
| bool FiffEvokedSet::save |
( |
const QString & | fileName | ) |
const |
Save this evoked data set to a FIFF file.
- Parameters
-
| [in] | fileName | Output file path. |
- Returns
- true on success.
◆ 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] | epoch | Data matrix (channels x samples) to correct in-place. |
| [in] | bminSamp | First baseline sample (clamped to 0). |
| [in] | bmaxSamp | Last baseline sample (clamped to epoch length - 1). |
◆ evoked
| QList<FiffEvoked> FiffEvokedSet::evoked |
◆ info
| FiffInfo FiffEvokedSet::info |
The documentation for this class was generated from the following file: