[Mne_analysis] Finding nearest neighbors with 'use_tris'?

Gladia Hotan gladiach at gmail.com
Fri Apr 23 05:36:28 EDT 2021
Search archives:

        External Email - Use Caution        

Hi,

I have an ico-3 source space and I'm trying to get the matrix of
nearest-neighbor sources according to this:
https://secure-web.cisco.com/1Y0DaxwOM4dMv0gJSB9EnZ_uNubgvEsLGsi11i6atfCR0ecY9sWqM-FeogyN2YYE_G_99Ne2v9o2B0NI75ZqhiOlifpeKIrr0gy_B9ydnb26e4QEI9Hln9o51OrWt2qFi_G-oE5ZpXKSnRkJ8twzzVriySHM9Hk2FMr0rxeYnLNAEO0sf4UqHM3yFQs16rKMfRbzBNYdkWyMtc307KQI8sxAudOLVR2QVhvwCSJd2-Jaxgjc6EEZ9xJ7jwZQoXOGFX1yI1E49pwetbk5h6ncqbw/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fpipermail%2F%2Fmne_analysis%2F2018-September%2F005212.html

Doing:

src = mne.read_source_spaces('<subject>-ico-3-src.fif')

connectivity = spatial_tris_connectivity(src[0]['use_tris'])

Gives me this error:

Cannot compute connectivity on a selection of triangles

However, if I use src[0]['tris'], that's the full source space instead of ico-3.

How can I get the nearest neighbors matrix for ico-3 based on a src object?


Also, I'm using MNE 0.20.7. The function 'spatial_tris_connectivity'
seems to be gone in the latest

stable MNE (0.22.1). Is there an updated way of getting the nearest
neighbors matrix?


Thanks and Best Regards,

Gladia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20210423/35098d28/attachment.html 


More information about the Mne_analysis mailing list