[med-svn] [python-mne] 15/353: ENH : handle FS labels starting with lh. or rh.

Yaroslav Halchenko debian at onerussian.com
Fri Nov 27 17:24:25 UTC 2015


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 559a4c2f3273933a9f325a2966cdaff5572dc170
Author: Alexandre Gramfort <alexandre.gramfort at inria.fr>
Date:   Mon Nov 14 21:06:58 2011 -0500

    ENH : handle FS labels starting with lh. or rh.
---
 mne/label.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mne/label.py b/mne/label.py
index 1b8e937..e466de1 100644
--- a/mne/label.py
+++ b/mne/label.py
@@ -36,9 +36,9 @@ def read_label(filename):
     label['vertices'] = np.array(data[0], dtype=np.int32)
     label['pos'] = 1e-3 * data[1:4].T
     label['values'] = data[4]
-    if filename.endswith('lh.label'):
+    if filename.endswith('lh.label') or filename.startswith('lh.'):
         label['hemi'] = 'lh'
-    elif filename.endswith('rh.label'):
+    elif filename.endswith('rh.label') or filename.startswith('rh.'):
         label['hemi'] = 'rh'
     else:
         raise ValueError('Cannot find which hemisphere it is. File should end'

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



More information about the debian-med-commit mailing list