[med-svn] [python-mne] 277/353: ENH: also retrun distance

Yaroslav Halchenko debian at onerussian.com
Fri Nov 27 17:25:15 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 8a3accd204f328a72fd7109981c7144e89fccdbb
Author: Martin Luessi <mluessi at nmr.mgh.harvard.edu>
Date:   Mon Jul 16 12:51:25 2012 -0400

    ENH: also retrun distance
---
 mne/simulation/source.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/mne/simulation/source.py b/mne/simulation/source.py
index 3457767..799aae0 100644
--- a/mne/simulation/source.py
+++ b/mne/simulation/source.py
@@ -120,7 +120,7 @@ def circular_source_labels(subject, seeds, extents, hemis, subjects_dir=None):
             hemi        Hemisphere of the label ('lh', or 'rh')
             vertices    Vertex indices (0 based)
             pos         Locations in millimeters
-            values      Values at the vertices (not used, all 1)
+            values      Distances in millimeters from seed
     """
     if subjects_dir is None:
         if 'SUBJECTS_DIR' in os.environ:
@@ -163,15 +163,15 @@ def circular_source_labels(subject, seeds, extents, hemis, subjects_dir=None):
     # create the patches
     labels = []
     for seed, extent, hemi in zip(seeds, extents, hemis):
-        patch_verts, _ = _verts_within_dist(dist[hemi], seed, extent)
+        label_verts, label_dist = _verts_within_dist(dist[hemi], seed, extent)
 
         # create a label
         label = dict()
         label['comment'] = 'Circular label: seed=%d, extent=%0.1fmm' %\
                            (seed, extent)
-        label['vertices'] = patch_verts
-        label['pos'] = vert[hemi][patch_verts]
-        label['values'] = np.ones(len(patch_verts))
+        label['vertices'] = label_verts
+        label['pos'] = vert[hemi][label_verts]
+        label['values'] = label_dist
         label['hemi'] = hemi
 
         labels.append(label)

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