v2.0.0
Loading...
Searching...
No Matches
UTILSLIB::ArtifactDetect Class Reference

ECG and EOG physiological artifact event detection. More...

#include <artifact_detect.h>

Public Types

using EcgParams = ArtifactDetectEcgParams
using EogParams = ArtifactDetectEogParams
using ProjParams = ArtifactDetectProjParams

Static Public Member Functions

static QVector< int > detectEcg (const Eigen::MatrixXd &matData, const FIFFLIB::FiffInfo &fiffInfo, double dSFreq, const EcgParams &params=EcgParams())
static QVector< int > detectEog (const Eigen::MatrixXd &matData, const FIFFLIB::FiffInfo &fiffInfo, double dSFreq, const EogParams &params=EogParams())
static QList< FIFFLIB::FiffProj > computeProjEcg (const Eigen::MatrixXd &matData, const FIFFLIB::FiffInfo &fiffInfo, double dSFreq, const ProjParams &proj=ProjParams::ecg(), const EcgParams &detect=EcgParams())
static QList< FIFFLIB::FiffProj > computeProjEog (const Eigen::MatrixXd &matData, const FIFFLIB::FiffInfo &fiffInfo, double dSFreq, const ProjParams &proj=ProjParams::eog(), const EogParams &detect=EogParams())

Detailed Description

ECG and EOG physiological artifact event detection.

Definition at line 122 of file artifact_detect.h.

Member Typedef Documentation

◆ EcgParams

Convenience alias so callers can still write ArtifactDetect::EcgParams.

Definition at line 125 of file artifact_detect.h.

◆ EogParams

Convenience alias so callers can still write ArtifactDetect::EogParams.

Definition at line 126 of file artifact_detect.h.

◆ ProjParams

Convenience alias.

Definition at line 166 of file artifact_detect.h.

Member Function Documentation

◆ computeProjEcg()

QList< FiffProj > ArtifactDetect::computeProjEcg ( const Eigen::MatrixXd & matData,
const FIFFLIB::FiffInfo & fiffInfo,
double dSFreq,
const ProjParams & proj = ProjParams::ecg(),
const EcgParams & detect = EcgParams() )
static

SSP projectors for heartbeat artifacts as mne.preprocessing.compute_proj_ecg does: ECG events, band-passed data with the info projectors applied, peak-to-peak rejection, average, then FiffProj::compute_from_evoked. Returns the info projectors followed by the new ones ("ECG-...").

Parameters
[in]matDataRaw data (n_channels × n_samples), calibrated (SI units).
[in]fiffInfoMeasurement info including its projectors.
[in]dSFreqSampling frequency in Hz.
[in]projEpoching, filtering, rejection and vector counts.
[in]detectECG event detection parameters.
Returns
The projectors, or only the info projectors if no event or epoch survives.

Definition at line 312 of file artifact_detect.cpp.

◆ computeProjEog()

QList< FiffProj > ArtifactDetect::computeProjEog ( const Eigen::MatrixXd & matData,
const FIFFLIB::FiffInfo & fiffInfo,
double dSFreq,
const ProjParams & proj = ProjParams::eog(),
const EogParams & detect = EogParams() )
static

SSP projectors for blink artifacts as mne.preprocessing.compute_proj_eog does (see computeProjEcg).

Parameters
[in]matDataRaw data (n_channels × n_samples), calibrated (SI units).
[in]fiffInfoMeasurement info including its projectors.
[in]dSFreqSampling frequency in Hz.
[in]projEpoching, filtering, rejection and vector counts.
[in]detectEOG event detection parameters.
Returns
The projectors, or only the info projectors if no event or epoch survives.

Definition at line 320 of file artifact_detect.cpp.

◆ detectEcg()

QVector< int > ArtifactDetect::detectEcg ( const Eigen::MatrixXd & matData,
const FIFFLIB::FiffInfo & fiffInfo,
double dSFreq,
const EcgParams & params = EcgParams() )
static

Detect ECG R-peak events as mne.preprocessing.find_ecg_events does.

Uses the first good channel with kind == FIFFV_ECG_CH; without one, the mean of the good magnetometers (or, failing those, gradiometers) stands in for it.

Parameters
[in]matDataRaw data matrix (n_channels × n_samples), calibrated (SI units).
[in]fiffInfoMeasurement info (channel kinds, names).
[in]dSFreqSampling frequency in Hz.
[in]paramsDetection parameters.
Returns
Sample indices (0-based) of detected R-peaks.

Definition at line 244 of file artifact_detect.cpp.

◆ detectEog()

QVector< int > ArtifactDetect::detectEog ( const Eigen::MatrixXd & matData,
const FIFFLIB::FiffInfo & fiffInfo,
double dSFreq,
const EogParams & params = EogParams() )
static

Detect EOG blink/saccade events as mne.preprocessing.find_eog_events does.

Of the good channels with kind == FIFFV_EOG_CH, the one with the most 2-45 Hz energy is used. Returns an empty vector if no EOG channel is found.

Parameters
[in]matDataRaw data matrix (n_channels × n_samples), calibrated (SI units).
[in]fiffInfoMeasurement info.
[in]dSFreqSampling frequency in Hz.
[in]paramsDetection parameters.
Returns
Sample indices (0-based) of the detected EOG peaks.

Definition at line 278 of file artifact_detect.cpp.


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