Threshold and edge-based trigger detection on streaming stim channels. More...


Go to the source code of this file.
Namespaces | |
| namespace | RTPROCESSINGLIB |
Functions | |
| DSPSHARED_EXPORT QList< Eigen::MatrixXi > | RTPROCESSINGLIB::toEventMatrix (QMap< int, QList< QPair< int, double > > > mapTriggers) |
| DSPSHARED_EXPORT QMap< int, QList< QPair< int, double > > > | RTPROCESSINGLIB::detectTriggerFlanksMax (const Eigen::MatrixXd &data, const QList< int > &lTriggerChannels, int iOffsetIndex, double dThreshold, bool bRemoveOffset, int iBurstLengthSamp=100) |
| DSPSHARED_EXPORT QList< QPair< int, double > > | RTPROCESSINGLIB::detectTriggerFlanksMax (const Eigen::MatrixXd &data, int iTriggerChannelIdx, int iOffsetIndex, double dThreshold, bool bRemoveOffset, int iBurstLengthSamp=100) |
| DSPSHARED_EXPORT QMap< int, QList< QPair< int, double > > > | RTPROCESSINGLIB::detectTriggerFlanksGrad (const Eigen::MatrixXd &data, const QList< int > &lTriggerChannels, int iOffsetIndex, double dThreshold, bool bRemoveOffset, const QString &type, int iBurstLengthSamp=100) |
| DSPSHARED_EXPORT QList< QPair< int, double > > | RTPROCESSINGLIB::detectTriggerFlanksGrad (const Eigen::MatrixXd &data, int iTriggerChannelIdx, int iOffsetIndex, double dThreshold, bool bRemoveOffset, const QString &type, int iBurstLengthSamp=100) |
Threshold and edge-based trigger detection on streaming stim channels.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
The functions in this header scan the rows of an incoming data matrix — typically the stimulus / digital-trigger channels of a MEG or EEG file — for sign or value transitions and return the sample index and amplitude of every detected flank. detectTriggerFlanks uses Eigen's maxCoeff over the per-sample derivative to localise rising edges, with optional de-bouncing controlled by a minimum inter-event distance.
toEventMatrix turns the per-channel QMap of detected events into the canonical three-column Eigen::MatrixXi event layout (sample, previous code, new code) consumed by the rest of the mne-cpp pipeline (averaging, epoching, annotations).
Definition in file rt_detect_trigger.h.