mne.channels.read_ch_adjacency#

mne.channels.read_ch_adjacency(fname, picks=None)[source]#

Parse FieldTrip neighbors .mat file.

More information on these neighbor definitions can be found on the related FieldTrip documentation pages.

Parameters
fnamestr

The file name. Example: ‘neuromag306mag’, ‘neuromag306planar’, ‘ctf275’, ‘biosemi64’, etc.

picksstr | list | slice | None

Channels to include. Slices and lists of integers will be interpreted as channel indices. In lists, channel type strings (e.g., ['meg', 'eeg']) will pick channels of those types, channel name strings (e.g., ['MEG0111', 'MEG2623'] will pick the given channels. Can also be the string values “all” to pick all channels, or “data” to pick data channels. None (default) will pick all channels. Note that channels in info['bads'] will be included if their names or indices are explicitly provided. Picks Must match the template.

Returns
ch_adjacencyscipy.sparse.csr_matrix, shape (n_channels, n_channels)

The adjacency matrix.

ch_nameslist

The list of channel names present in adjacency matrix.

Notes

This function is closely related to find_ch_adjacency(). If you don’t know the correct file for the neighbor definitions, find_ch_adjacency() can compute the adjacency matrix from 2d sensor locations.