Channel derivation and re-referencing utilities. More...
#include <channel_derivation.h>
Static Public Member Functions | |
| static QVector< DerivationRule > | buildBipolar (const QStringList &channelNames) |
| Build bipolar derivation rules from sequential electrode pairs. | |
| static QVector< DerivationRule > | buildCommonAverage (const QStringList &channelNames) |
| Build common-average reference derivation rules. | |
| static QPair< Eigen::MatrixXd, QStringList > | apply (const Eigen::MatrixXd &matData, const QStringList &channelNames, const QVector< DerivationRule > &rules) |
| Apply derivation rules to a data matrix. | |
| static QVector< DerivationRule > | readDefinitionFile (const QString &path) |
| Read derivation rules from an MNE-C derivation text file (MNELIB::MNEDerivSet::readText). | |
| static bool | writeDefinitionFile (const QString &path, const QVector< DerivationRule > &rules) |
| Write derivation rules in MNE-C derivation text syntax, readable by readDefinitionFile and mne_make_derivations. | |
Channel derivation and re-referencing utilities.
Provides methods to build bipolar and common-average re-referencing schemes, apply arbitrary linear derivation rules to data matrices, and read/write derivation definition files.
Definition at line 79 of file channel_derivation.h.
|
static |
Apply derivation rules to a data matrix.
| [in] | matData | Input data matrix (n_channels × n_times). |
| [in] | channelNames | Channel names corresponding to rows of matData. |
| [in] | rules | Derivation rules to apply. |
Definition at line 126 of file channel_derivation.cpp.
|
static |
Build bipolar derivation rules from sequential electrode pairs.
Channels are grouped by shaft prefix (all leading alphabetic characters and apostrophes before the first digit). Within each group, consecutive pairs are subtracted: channel[i] − channel[i+1].
| [in] | channelNames | List of channel names, e.g. {"LH1","LH2","LH3","RA1","RA2"}. |
Definition at line 66 of file channel_derivation.cpp.
|
static |
Build common-average reference derivation rules.
Each output channel equals the original channel minus the mean of all channels: out_i = ch_i − (1/N) Σ ch_j.
| [in] | channelNames | List of channel names. |
Definition at line 98 of file channel_derivation.cpp.
|
static |
Read derivation rules from an MNE-C derivation text file (MNELIB::MNEDerivSet::readText).
| [in] | path | Path to the definition file. |
Definition at line 162 of file channel_derivation.cpp.
|
static |
Write derivation rules in MNE-C derivation text syntax, readable by readDefinitionFile and mne_make_derivations.
| [in] | path | Path to the output file. |
| [in] | rules | Derivation rules to write. |
Definition at line 177 of file channel_derivation.cpp.