[med-svn] [python-mne] 167/376: combining orients in source space

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


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

yoh pushed a commit to annotated tag v0.1
in repository python-mne.

commit 75dc2c2fbc295e312fd778b010b800e3bc943cae
Author: Alexandre Gramfort <alexandre.gramfort at inria.fr>
Date:   Mon Mar 28 17:14:05 2011 -0400

    combining orients in source space
---
 examples/plot_minimum_norm_estimate.py | 2 +-
 mne/inverse.py                         | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/examples/plot_minimum_norm_estimate.py b/examples/plot_minimum_norm_estimate.py
index 79aef87..dbaffa4 100644
--- a/examples/plot_minimum_norm_estimate.py
+++ b/examples/plot_minimum_norm_estimate.py
@@ -37,7 +37,7 @@ noise_cov = mne.Covariance()
 noise_cov.load(fname_cov)
 
 # Compute inverse solution
-stc, K, W = mne.minimum_norm(evoked, forward, noise_cov, orientation='fixed',
+stc, K, W = mne.minimum_norm(evoked, forward, noise_cov, orientation='free',
                              method='dspm', snr=3, loose=0.2, pca=True)
 
 # Save result in stc files
diff --git a/mne/inverse.py b/mne/inverse.py
index c566f93..38a8dad 100644
--- a/mne/inverse.py
+++ b/mne/inverse.py
@@ -713,6 +713,13 @@ def minimum_norm(evoked, forward, cov, picks=None, method='dspm',
     sel = [evoked.ch_names.index(name) for name in ch_names]
     sol = np.dot(Kernel, evoked.data[sel])
 
+    if n_dip_per_pos > 1:
+        print 'combining the current components...',
+        sol1 = np.empty((sol.shape[0]/3, sol.shape[1]))
+        for k in range(sol.shape[1]):
+            sol1[:, k] = np.sqrt(combine_xyz(sol[:, k]))
+        sol = sol1
+
     stc = dict()
     stc['inv'] = dict()
     stc['inv']['src'] = forward['src']

-- 
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