[Mne_analysis] Vertices

Karin Westin karin.westin85 at gmail.com
Sun Sep 30 11:08:03 EDT 2018
Search archives:

        External Email - Use Caution        

I'm trying to find closest neighbors of vertices, and found this code
snippet in a previous question on the same subject:

import mne
from mne.source_estimate import spatial_tris_connectivity
import numpy as np

surf = mne.surface._get_ico_surface(5)
connectivity = spatial_tris_connectivity(surf['tris'])
connectivity = connectivity.todense()
neighbours_list = [np.where(row==1)[1] for row in connectivity]
#neighbours_list contains the list of the neighbours of each vertex

However, if I try to plot ( using .add foci()) the arrays containing the
vertices of interest, I get 6 foci scattered all over the brain. So now my
question is how to interpret the output of neighbors_list?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180930/99153e92/attachment.html 

More information about the Mne_analysis mailing list