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

yoh pushed a commit to tag 0.4
in repository python-mne.

commit 2440bc8c989c1a829ced1f27c865dc77afc73b34
Author: Alexandre Gramfort <[email protected]>
Date:   Thu May 24 18:10:23 2012 +0200

    add warning in ecg.py
---
 mne/artifacts/ecg.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mne/artifacts/ecg.py b/mne/artifacts/ecg.py
index 5882c26..18b7c43 100644
--- a/mne/artifacts/ecg.py
+++ b/mne/artifacts/ecg.py
@@ -107,6 +107,9 @@ def find_ecg_events(raw, event_id=999, ch_name=None):
                                  eog=False, ecg=True, emg=False)
     else:
         ch_ECG = fiff.pick_channels(raw.ch_names, include=[ch_name])
+        if len(ch_ECG) == 0:
+            raise ValueError('%s not in channel list (%s)' %
+                              (ch_name, raw.ch_names))
 
     if len(ch_ECG) == 0 and ch_name is None:
         raise Exception('No ECG channel found. Please specify ch_name '

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/debian-med/python-mne.git

_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to