MNEEpochData
Namespace: MNELIB · Library: MNE Library
#include <mne/mne_epoch_data.h>
class MNELIB::MNEEpochData
Epoch data, which corresponds to an event.
Single epoch (trial slice) of sensor data with timing and rejection metadata.
QFile rawFile(data + "/MEG/sample/sample_audvis_trunc_raw.fif");
const FiffRawData raw(rawFile);
FiffEvents events;
FiffEvents::detect_from_raw(raw, events); // rising edges on STI 014
// Epochs of event 1 from -100 to 300 ms, no rejection
MNEEpochDataList epochs = MNEEpochDataList::readEpochs(raw, events.events, -0.1f, 0.3f, 1, {});
const MNEEpochData& firstEpoch = *epochs.first();
FiffEvoked evoked = epochs.average(raw.info, raw.first_samp, raw.last_samp);
Public Methods
MNEEpochData()
Default constructor.
MNEEpochData(p_MNEEpochData)
Copy constructor.
Parameters:
- p_MNEEpochData : const MNEEpochData &
MNEepoch data.
operator=(other)
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:
- other : const MNEEpochData & Object to assign from.
Returns:
- MNEEpochData & — reference to this object.
~MNEEpochData()
Destroys the MNE epoch data.
applyBaselineCorrection(baseline)
Applies baseline (mode=mean) correction to the evoked data.
Parameters:
- baseline : const QPair< float, float > & time definition of the baseline in seconds [from, to].
pick_channels(sel)
Reduces the data to the selected rows.
Parameters:
- sel : const Eigen::RowVectorXi & The selected rows to keep.
isRejected(respectAutoReject)
Returns whether this epoch should be excluded from averaging.
Parameters:
- respectAutoReject : bool Whether automatic artifact rejection should be honored.
Returns:
- bool — true when the epoch should be excluded.
Example
- Full source:
src/examples/ex_mne_api/main.cpp - Build target:
ex_mne_api(runs under CTest) - Data: mne-cpp-test-data
Used in examples
ex_clustered_inverse_mne_raw
Example of the computation of a clustered inverse mne raw.
MNEEpochData* epoch = NULL;
ex_clustered_inverse_pwl_rap_music_raw
Example of the computation of a raw clustered inverse Powell RAP-MUSIC.
MNEEpochData* epoch = NULL;
ex_clustered_inverse_rap_music_raw
Example of the computation of a raw clustered inverse rap music.
MNEEpochData* epoch = NULL;
Also used in ex_dsp_preprocessing, ex_inverse_mne_raw, ex_mne_api.
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>
- Christof Pieloth <pieloth@labp.htwk-leipzig.de>
- Lorenz Esch <lorenz.esch@tu-ilmenau.de>
- Juan GPC <jgarciaprieto@mgh.harvard.edu>
- Gabriel Motta <gabrielbenmotta@gmail.com>