[med-svn] [python-mne] 335/353: rem. nested fun
Yaroslav Halchenko
debian at onerussian.com
Fri Nov 27 17:25:27 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 073c7c23adeb1e431649c55cb3bb169807becfea
Author: Martin Luessi <mluessi at nmr.mgh.harvard.edu>
Date: Tue Jul 31 11:20:54 2012 -0400
rem. nested fun
---
mne/beamformer/_lcmv.py | 7 +------
mne/beamformer/tests/test_lcmv.py | 4 ++--
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/mne/beamformer/_lcmv.py b/mne/beamformer/_lcmv.py
index c02c1b2..908fbf1 100644
--- a/mne/beamformer/_lcmv.py
+++ b/mne/beamformer/_lcmv.py
@@ -237,13 +237,8 @@ def lcmv_epochs(epochs, forward, noise_cov, data_cov, reg=0.01, label=None):
tmin = epochs.times[0]
# use only the good data channels
- def _epochs_data(epochs, picks):
- for e in epochs:
- yield e[picks, :]
-
picks = pick_types(info, meg=True, eeg=True, exclude=info['bads'])
-
- data = _epochs_data(epochs, picks)
+ data = epochs.get_data()[:, picks, :]
stcs = _apply_lcmv(data, info, tmin, forward, noise_cov, data_cov, reg,
label)
diff --git a/mne/beamformer/tests/test_lcmv.py b/mne/beamformer/tests/test_lcmv.py
index c938ecb..e276f1f 100644
--- a/mne/beamformer/tests/test_lcmv.py
+++ b/mne/beamformer/tests/test_lcmv.py
@@ -78,8 +78,8 @@ def test_lcmv():
# average the single trial estimates
stc_avg = np.zeros_like(stc.data)
- for stc_single in stcs:
- stc_avg += stc_single.data
+ for this_stc in stcs:
+ stc_avg += this_stc.data
stc_avg /= len(stcs)
# compare it to the solution using evoked with fixed orientation
--
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