[med-svn] [aghermann] 43/60: sensibly restrict artifact detection algos to (non-)EEG signal types

andrei zavada hmmr-guest at alioth.debian.org
Mon Nov 4 23:49:58 UTC 2013


This is an automated email from the git hooks/post-receive script.

hmmr-guest pushed a commit to branch WIP
in repository aghermann.

commit 10603a4b35090ab80196aec34c9d1f70fdbc2279
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Tue Oct 22 00:27:19 2013 +0300

    sensibly restrict artifact detection algos to (non-)EEG signal types
---
 upstream/src/aghermann/artifact-detection/3in1.cc |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/upstream/src/aghermann/artifact-detection/3in1.cc b/upstream/src/aghermann/artifact-detection/3in1.cc
index a9823d4..cf6524e 100644
--- a/upstream/src/aghermann/artifact-detection/3in1.cc
+++ b/upstream/src/aghermann/artifact-detection/3in1.cc
@@ -105,7 +105,8 @@ detect_artifacts( sigfile::SNamedChannel& N,
         }
 
       // 2. EMG perturbations
-        if ( P.do_emg_perturbations ) {
+        if ( P.do_emg_perturbations &&
+             N.source.signal_type(N.sig_no) != sigfile::SChannel::TType::emg ) {
                 // which EMG channels are there?
                 list<int> emgRR;
                 for ( int h = 0; h < (int)N.source.n_channels(); ++h )
@@ -138,7 +139,8 @@ detect_artifacts( sigfile::SNamedChannel& N,
         }
 
         // 3. MC-based
-        if ( P.do_mc_based ) {
+        if ( P.do_mc_based &&
+             N.source.signal_type(N.sig_no) == sigfile::SChannel::TType::eeg ) {
                 auto marked =
                         metrics::mc::detect_artifacts( S, sr, P.MC);
                 for ( size_t p = 0; p < marked.size(); ++p ) {

-- 
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git



More information about the debian-med-commit mailing list