Single averaged evoked response: time axis, data, baseline, channel info and averaging metadata. More...
#include <fiff_evoked.h>
Public Types | |
| enum class | CombineWeights { Nave , Equal } |
| using | SPtr = QSharedPointer<FiffEvoked> |
| using | ConstSPtr = QSharedPointer<const FiffEvoked> |
| using | UPtr = std::unique_ptr<FiffEvoked> |
| using | ConstUPtr = std::unique_ptr<const FiffEvoked> |
Public Member Functions | |
| FiffEvoked () | |
| FiffEvoked (QIODevice &p_IODevice, QVariant setno=0, QPair< float, float > t_baseline=defaultFloatPair, bool proj=true, fiff_int_t p_aspect_kind=FIFFV_ASPECT_AVERAGE) | |
| FiffEvoked (const FiffEvoked &p_FiffEvoked) | |
| FiffEvoked & | operator= (const FiffEvoked &other)=default |
| ~FiffEvoked () | |
| QStringList | ch_names () |
| void | clear () |
| QString | aspectKindToString () const |
| bool | isEmpty () const |
| FiffEvoked | pick_channels (const QStringList &include=defaultQStringList, const QStringList &exclude=defaultQStringList) const |
| void | setInfo (const FiffInfo &p_info, bool applyProj=true) |
| FiffEvoked & | operator+= (const Eigen::MatrixXd &newData) |
| void | applyBaselineCorrection (QPair< float, float > &p_baseline) |
Static Public Member Functions | |
| static bool | read (QIODevice &p_IODevice, FiffEvoked &p_FiffEvoked, QVariant setno=0, QPair< float, float > t_baseline=defaultFloatPair, bool proj=true, fiff_int_t p_aspect_kind=FIFFV_ASPECT_AVERAGE) |
| static FiffEvoked | combine (const QList< FiffEvoked > &evokeds, const Eigen::VectorXd &weights) |
| static FiffEvoked | combine (const QList< FiffEvoked > &evokeds, CombineWeights weights) |
Public Attributes | |
| FiffInfo | info |
| fiff_int_t | nave |
| fiff_int_t | aspect_kind |
| fiff_int_t | first |
| fiff_int_t | last |
| QString | comment |
| Eigen::RowVectorXf | times |
| Eigen::MatrixXd | data |
| Eigen::MatrixXd | proj |
| QPair< float, float > | baseline |
Single averaged evoked response: time axis, data, baseline, channel info and averaging metadata.
Holds one FIFFB_EVOKED block: times, data, first / last sample indices, baseline, kind, nave, comment and the FiffInfo describing the channels. Use FiffEvokedSet for recordings that contain multiple averaging conditions.
Definition at line 76 of file fiff_evoked.h.
| using FIFFLIB::FiffEvoked::ConstSPtr = QSharedPointer<const FiffEvoked> |
Const shared pointer type for FiffEvoked.
Definition at line 80 of file fiff_evoked.h.
| using FIFFLIB::FiffEvoked::ConstUPtr = std::unique_ptr<const FiffEvoked> |
Const unique pointer type for FiffEvoked.
Definition at line 82 of file fiff_evoked.h.
| using FIFFLIB::FiffEvoked::SPtr = QSharedPointer<FiffEvoked> |
Shared pointer type for FiffEvoked.
Definition at line 79 of file fiff_evoked.h.
| using FIFFLIB::FiffEvoked::UPtr = std::unique_ptr<FiffEvoked> |
Unique pointer type for FiffEvoked.
Definition at line 81 of file fiff_evoked.h.
|
strong |
Predefined weighting strategies of combine().
| Enumerator | |
|---|---|
| Nave | Sum-to-one weights proportional to each nave. |
| Equal | Every data set is weighted by 1 / number of data sets. |
Definition at line 230 of file fiff_evoked.h.
| FiffEvoked::FiffEvoked | ( | ) |
Constructs a fiff evoked data.
Definition at line 45 of file fiff_evoked.cpp.
| FiffEvoked::FiffEvoked | ( | QIODevice & | p_IODevice, |
| QVariant | setno = 0, | ||
| QPair< float, float > | t_baseline = defaultFloatPair, | ||
| bool | proj = true, | ||
| fiff_int_t | p_aspect_kind = FIFFV_ASPECT_AVERAGE ) |
Constructs fiff evoked data, by reading from a IO device.
| [in] | p_IODevice | IO device to read from the evoked data set. |
| [in] | setno | The set to pick. Dataset ID number (int) or comment/name (str). Optional if there isonly one data set in file. |
| [in] | t_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). |
| [in] | p_aspect_kind | Either "FIFFV_ASPECT_AVERAGE" or "FIFFV_ASPECT_STD_ERR". The type of data to read. Only used if "setno" is a str. |
Definition at line 56 of file fiff_evoked.cpp.
| FiffEvoked::FiffEvoked | ( | const FiffEvoked & | p_FiffEvoked | ) |
Copy constructor.
| [in] | p_FiffEvoked | Fiff evoked data which should be copied. |
Definition at line 71 of file fiff_evoked.cpp.
| FiffEvoked::~FiffEvoked | ( | ) |
Destroys the FiffEvoked.
Definition at line 87 of file fiff_evoked.cpp.
| void FiffEvoked::applyBaselineCorrection | ( | QPair< float, float > & | p_baseline | ) |
Applies baseline correction to the evoked data.
| [in] | p_baseline | time definition of the baseline in seconds [from, to]. |
Definition at line 574 of file fiff_evoked.cpp.
|
inline |
Provides the python Evoked string formatted aspect_kind, which is stored in kind: "average" <-> FIFFV_ASPECT_AVERAGE, "standard_error" <-> FIFFV_ASPECT_STD_ERR or "unknown"
Definition at line 295 of file fiff_evoked.h.
|
inline |
Returns list of channel names stored in fiff info -> this is to stay consistent with python.
Definition at line 288 of file fiff_evoked.h.
| void FiffEvoked::clear | ( | ) |
Initializes fiff evoked data.
Definition at line 93 of file fiff_evoked.cpp.
|
static |
Merges evoked data with a predefined weighting strategy (weights="nave" or "equal").
| [in] | evokeds | The evoked data sets. |
| [in] | weights | The weighting strategy. |
Definition at line 509 of file fiff_evoked.cpp.
|
static |
Merges evoked data by weighted addition or subtraction (mne.combine_evoked).
All data sets must have the same channels and time instants. The result carries the union of the bad channels, the weighted sum of the data, a comment such as "0.474 × A + 0.526 × B" and nave = 1 / sum(w_i^2 / nave_i), rounded to an integer as required by the FIFF format.
| [in] | evokeds | The evoked data sets. |
| [in] | weights | One weight per data set. |
|
inline |
Returns whether FiffEvoked is empty.
Definition at line 307 of file fiff_evoked.h.
| FiffEvoked & FiffEvoked::operator+= | ( | const Eigen::MatrixXd & | newData | ) |
Inputs a new data set and recalculates the average. This function also iterates the nave parameter by one.
| [in] | newData | the new data set which is to be added to the current average. |
Definition at line 482 of file fiff_evoked.cpp.
|
default |
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.
| [in] | other | Object to assign from. |
| FiffEvoked FiffEvoked::pick_channels | ( | const QStringList & | include = defaultQStringList, |
| const QStringList & | exclude = defaultQStringList ) const |
fiff_pick_channels_evoked
Pick desired channels from evoked-response data
| [in] | include | - Channels to include (if empty, include all available). |
| [in] | exclude | - Channels to exclude (if empty, do not exclude any). |
Definition at line 108 of file fiff_evoked.cpp.
|
static |
fiff_read_evoked
Wrapper for the FiffEvokedDataSet::read_evoked static function
Read one evoked data set
| [in] | p_IODevice | An fiff IO device like a fiff QFile or QTCPSocket. |
| [out] | p_FiffEvoked | The read evoked data. |
| [in] | setno | the set to pick. Dataset ID number (int) or comment/name (str). Optional if there isonly one data set in file. |
| [in] | t_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). |
| [in] | p_aspect_kind | Either "FIFFV_ASPECT_AVERAGE" or "FIFFV_ASPECT_STD_ERR". The type of data to read. Only used if "setno" is a str. |
Definition at line 144 of file fiff_evoked.cpp.
| void FiffEvoked::setInfo | ( | const FiffInfo & | p_info, |
| bool | applyProj = true ) |
Set a new fiff measurement info
| [in] | p_info | Info to set. |
| [in] | applyProj | Apply SSP projection vectors (optional, default = true). |
Definition at line 453 of file fiff_evoked.cpp.
| fiff_int_t FIFFLIB::FiffEvoked::aspect_kind |
Aspect identifier, either FIFFV_ASPECT_AVERAGE or FIFFV_ASPECT_STD_ERR.
Definition at line 274 of file fiff_evoked.h.
| QPair<float, float> FIFFLIB::FiffEvoked::baseline |
Baseline information in seconds form where the seconds are seen relative to the trigger, meaning they can also be negative [from to]
Definition at line 281 of file fiff_evoked.h.
| QString FIFFLIB::FiffEvoked::comment |
Comment on dataset. Can be the condition.
Definition at line 277 of file fiff_evoked.h.
| Eigen::MatrixXd FIFFLIB::FiffEvoked::data |
2D array of shape [n_channels x n_times]; Evoked response.
Definition at line 279 of file fiff_evoked.h.
| fiff_int_t FIFFLIB::FiffEvoked::first |
First time sample.
Definition at line 275 of file fiff_evoked.h.
| FiffInfo FIFFLIB::FiffEvoked::info |
Measurement info.
Definition at line 272 of file fiff_evoked.h.
| fiff_int_t FIFFLIB::FiffEvoked::last |
Last time sample.
Definition at line 276 of file fiff_evoked.h.
| fiff_int_t FIFFLIB::FiffEvoked::nave |
Number of averaged epochs.
Definition at line 273 of file fiff_evoked.h.
| Eigen::MatrixXd FIFFLIB::FiffEvoked::proj |
SSP projection.
Definition at line 280 of file fiff_evoked.h.
| Eigen::RowVectorXf FIFFLIB::FiffEvoked::times |
Vector of time instants in seconds.
Definition at line 278 of file fiff_evoked.h.