mne-tools / mne-connectivity

Connectivity algorithms that leverage the MNE-Python API.
https://mne.tools/mne-connectivity/dev/index.html
BSD 3-Clause "New" or "Revised" License
66 stars 34 forks source link

Allow plotting sensor connectivity in 2D #97

Open hoechenberger opened 2 years ago

hoechenberger commented 2 years ago

Currently, plot_sensors_connectivity() produces a 3D scene.

It would be great to have a visualization in 2D space too. With the new machinery in MNE-Python that powers plot_ch_adjacency(), this should be relatively easy to do / give some inspiration.

The plotting function would then return a Matplotlib Figure instead of a PyVista scene.

WDYT?

ctrltz commented 2 years ago

image

Just a suggestion - it could also be cool to have so called head-in-head plots (fig. 5 of this paper, for example), seems possible with mne.viz.iter_topography

hoechenberger commented 2 years ago

I have to admit I don't understand the purpose of this head-in-head representation... what does it tell us?

drammock commented 2 years ago

I think each mini-head is connectivity based on a "seed" in that location. This is (somewhat redundantly) illustrated by the little black dot in each mini-head.

hoechenberger commented 2 years ago

So it shows connectivity "strength", e.g. in a simple case where each edge has the same weight, it would be 1/number of edges between the starting node and the "target node"?

ctrltz commented 2 years ago

Yes, the idea is to display the whole NxN connectivity matrix at once as @drammock mentioned, black dot indeed might be not super-obvious when taken out of the context.

It has an advantage over graph-like display of important edges in case of many significant connections that might overlap and make the interpretation a little bit harder.

@hoechenberger you're right, all topomaps would be of the same color. And if, for example, connectivity between surroundings of C3 and C4 is very strong, then the topomap located at C3 would display high values around C4, and vice versa.