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 164 of file fiff_evoked_set.h.
◆ ConstSPtr
◆ ConstUPtr
◆ SPtr
◆ UPtr
◆ FiffEvokedSet() [1/3]
| FIFFLIB::FiffEvokedSet::FiffEvokedSet |
( |
| ) |
|
Constructs a fiff evoked data set.
◆ FiffEvokedSet() [2/3]
| FIFFLIB::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]
| FIFFLIB::FiffEvokedSet::FiffEvokedSet |
( |
const FiffEvokedSet & | p_FiffEvokedSet | ) |
|
Copy constructor.
- Parameters
-
| [in] | p_FiffEvokedSet | Fiff evoked data set which should be copied. |
◆ ~FiffEvokedSet()
| FIFFLIB::FiffEvokedSet::~FiffEvokedSet |
( |
| ) |
|
Destroys the fiff evoked data set.
◆ checkArtifacts()
| bool FIFFLIB::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 FIFFLIB::FiffEvokedSet::clear |
( |
| ) |
|
Initializes fiff evoked data set.
◆ compensate_to()
| bool FIFFLIB::FiffEvokedSet::compensate_to |
( |
fiff_int_t | to | ) |
|
mne_compensate_to
Changes the CTF gradient compensation grade of all evoked responses in place.
- Parameters
-
| [in] | to | Desired compensation grade. |
- Returns
- true if the data were changed, false if they already had that grade or it is not available.
◆ 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 (mne.grand_average with interpolate_bads=False, drop_bads=True). For each category, channels marked bad in any set are dropped, the common channels are kept and the sets are combined with equal weights. nave is set to the number of sets and the comment to "Grand average (n = N)".
- 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 FIFFLIB::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.
◆ operator=()
Copy assignment. Every member has value semantics, so the compiler-generated member-wise assignment is correct. It is declared explicitly because declaring a copy constructor and/or a destructor deprecates the implicitly generated one.
- Parameters
-
| [in] | other | Object to assign from. |
- Returns
- reference to this object.
◆ pick_channels()
| FiffEvokedSet FIFFLIB::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 FIFFLIB::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() [1/2]
| bool FIFFLIB::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.
◆ save() [2/2]
| bool FIFFLIB::FiffEvokedSet::save |
( |
QIODevice & | device | ) |
const |
Save this evoked data set as FIFF to an I/O device, e.g. a QBuffer.
- Parameters
-
| [in] | device | The device to write to; it is opened for writing. |
- Returns
- true on success.
◆ subtractBaseline()
| void FIFFLIB::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
◆ info
The documentation for this class was generated from the following file: