[med-svn] [python-mne] 207/353: typo, beautification
Yaroslav Halchenko
debian at onerussian.com
Fri Nov 27 17:24:59 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 cf818c8b75a55e1c28dee0549d4eb6b28a5e6034
Author: mluessi at nmr.mgh.harvard.edu <mluessi at nmr.mgh.harvard.edu>
Date: Wed Jun 20 03:54:28 2012 -0400
typo, beautification
---
mne/fiff/pick.py | 5 ++---
mne/fiff/tests/test_pick.py | 1 +
mne/selection.py | 3 ++-
mne/tests/test_selection.py | 1 +
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/mne/fiff/pick.py b/mne/fiff/pick.py
index 2d6dbe6..b1fe156 100644
--- a/mne/fiff/pick.py
+++ b/mne/fiff/pick.py
@@ -182,9 +182,8 @@ def pick_types(info, meg=True, eeg=False, stim=False, eog=False, ecg=False,
sel_kind = [FIFF.FIFFV_MEG_CH, FIFF.FIFFV_REF_MEG_CH,
FIFF.FIFFV_EEG_CH]
for k in np.where(pick == True)[0]:
- if info['chs'][k]['kind'] not in sel_kind:
- continue
- if info['ch_names'][k] not in selection:
+ if (info['chs'][k]['kind'] in sel_kind
+ and info['ch_names'][k] not in selection):
pick[k] = False
myinclude = [info['ch_names'][k] for k in range(nchan) if pick[k]]
diff --git a/mne/fiff/tests/test_pick.py b/mne/fiff/tests/test_pick.py
index d3ddb5d..6452941 100644
--- a/mne/fiff/tests/test_pick.py
+++ b/mne/fiff/tests/test_pick.py
@@ -8,3 +8,4 @@ def test_pick_channels_regexp():
assert_array_equal(pick_channels_regexp(ch_names, 'MEG ...1'), [0])
assert_array_equal(pick_channels_regexp(ch_names, 'MEG ...[2-3]'), [1, 2])
assert_array_equal(pick_channels_regexp(ch_names, 'MEG *'), [0, 1, 2])
+
diff --git a/mne/selection.py b/mne/selection.py
index 1c83a65..ef7bd8a 100644
--- a/mne/selection.py
+++ b/mne/selection.py
@@ -30,7 +30,7 @@ def read_selection(name, fname=None):
name : string or list of string
Name of the selection. If is a list, the selections are combined.
- self_fname : string
+ fname : string
Filename of the selection file (if None, built-in selections are used)
Returns
@@ -96,3 +96,4 @@ def read_selection(name, fname=None):
sel.sort()
return sel
+
diff --git a/mne/tests/test_selection.py b/mne/tests/test_selection.py
index db8e71c..99deec2 100644
--- a/mne/tests/test_selection.py
+++ b/mne/tests/test_selection.py
@@ -26,3 +26,4 @@ def test_read_selection():
frontal = read_selection('frontal')
occipital = read_selection('Right-occipital')
assert(len(Set(frontal).intersection(Set(occipital))) == 0)
+
--
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