mne.label_adjacency#

mne.label_adjacency(labels, src)[source]#

Compute adjacency between labels.

Two labels are considered adjacent if one of their vertices are adjacent in the source space.

Parameters:
labelslist of mne.Label

The labels between which to compute adjacency.

srcmne.SourceSpaces

The source space on which the labels are defined.

Returns:
label_adjacencyscipy.sparse.coo_matrix

A sparse adjacency matrix containing a 1 for labels that are adjacent and 0 otherwise.

Notes

New in v1.13.