MNE-CPP  0.1.9
A Framework for Electrophysiology
Functions
detecttrigger.h File Reference

DetectTrigger declarations. More...

#include "rtprocessing_global.h"
#include <QPair>
#include <Eigen/Core>
Include dependency graph for detecttrigger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

RTPROCESINGSHARED_EXPORT QList< Eigen::MatrixXi > RTPROCESSINGLIB::toEventMatrix (QMap< int, QList< QPair< int, double > > > mapTriggers)
 
RTPROCESINGSHARED_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)
 
RTPROCESINGSHARED_EXPORT QList< QPair< int, double > > RTPROCESSINGLIB::detectTriggerFlanksMax (const Eigen::MatrixXd &data, int iTriggerChannelIdx, int iOffsetIndex, double dThreshold, bool bRemoveOffset, int iBurstLengthSamp=100)
 
RTPROCESINGSHARED_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)
 
RTPROCESINGSHARED_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)
 

Detailed Description

DetectTrigger declarations.

Author
Lorenz Esch lesch.nosp@m.@mgh.nosp@m..harv.nosp@m.ard..nosp@m.edu
Since
0.1.3
Date
June, 2020

LICENSE

Copyright (C) 2020, Lorenz Esch. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file detecttrigger.h.

Function Documentation

◆ detectTriggerFlanksGrad() [1/2]

RTPROCESINGSHARED_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 
)

detectTriggerFlanksGrad detects flanks from a given data matrix in row wise order. This function uses a simple gradient to locate the triggers.

Parameters
[in]datathe data used to find the trigger flanks.
[in]lTriggerChannelsThe indeces of the trigger channels.
[in]iOffsetIndexthe offset index gets added to the found trigger flank index.
[in]iThresholdthe gradient threshold value used to find the trigger flank.
[in]bRemoveOffsetremove the first sample as offset.
[in]typedetect rising or falling flank. Use "Rising" or "Falling" as input.
[in]iBurstLengthMsThe length in samples which is skipped after a trigger was found.
Returns
This map holds the indices of the channels which are to be read from data. For each index/channel the found triggers and corresponding signal values are written to the value of the map.

◆ detectTriggerFlanksGrad() [2/2]

RTPROCESINGSHARED_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 
)

detectTriggerFlanksGrad detects flanks from a given data matrix in row wise order. This function uses a simple gradient to locate the triggers.

Parameters
[in]datathe data used to find the trigger flanks.
[in]iTriggerChannelIdxthe index of the trigger channel in the matrix.
[in]iOffsetIndexthe offset index gets added to the found trigger flank index.
[in]iThresholdthe gradient threshold value used to find the trigger flank.
[in]bRemoveOffsetremove the first sample as offset.
[in]typedetect rising or falling flank. Use "Rising" or "Falling" as input.
[in]iBurstLengthMsThe length in samples which is skipped after a trigger was found.
Returns
This list holds the found trigger indices and corresponding signal values.

◆ detectTriggerFlanksMax() [1/2]

RTPROCESINGSHARED_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 
)

detectTriggerFlanks detects flanks from a given data matrix in row wise order. This function uses a simple maxCoeff function implemented by eigen to locate the triggers.

Parameters
[in]datathe data used to find the trigger flanks.
[in]lTriggerChannelsThe indeces of the trigger channels.
[in]iOffsetIndexthe offset index gets added to the found trigger flank index.
[in]dThresholdthe signal threshold value used to find the trigger flank.
[in]bRemoveOffsetremove the first sample as offset.
[in]iBurstLengthMsThe length in samples which is skipped after a trigger was found.
Returns
This map holds the indices of the channels which are to be read from data. For each index/channel the found triggersand corresponding signal values are written to the value of the map.

◆ detectTriggerFlanksMax() [2/2]

RTPROCESINGSHARED_EXPORT QList<QPair<int,double> > RTPROCESSINGLIB::detectTriggerFlanksMax ( const Eigen::MatrixXd &  data,
int  iTriggerChannelIdx,
int  iOffsetIndex,
double  dThreshold,
bool  bRemoveOffset,
int  iBurstLengthSamp = 100 
)

detectTriggerFlanks detects flanks from a given data matrix in row wise order. This function uses a simple maxCoeff function implemented by eigen to locate the triggers.

Parameters
[in]datathe data used to find the trigger flanks.
[in]iTriggerChannelIdxthe index of the trigger channel in the matrix.
[in]iOffsetIndexthe offset index gets added to the found trigger flank index.
[in]dThresholdthe signal threshold value used to find the trigger flank.
[in]bRemoveOffsetremove the first sample as offset.
[in]iBurstLengthMsThe length in samples which is skipped after a trigger was found.
Returns
This list holds the found trigger indices and corresponding signal values.

◆ toEventMatrix()

QList< MatrixXi > RTPROCESSINGLIB::toEventMatrix ( QMap< int, QList< QPair< int, double > > >  mapTriggers)

Transforms QMap with stored information about events per stim channel to a list of event matrices.

Parameters
[in]mapTriggersThe QMap to be transformed.
[in]Alist of transformed Eigen matrices.

Definition at line 58 of file detecttrigger.cpp.