This documentation is for development version 0.18.dev0.


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

Parse FieldTrip neighbors .mat file.

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

fname : str

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

picks : str | 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. Picks Must match the template.

ch_connectivity : scipy.sparse.csr_matrix, shape (n_channels, n_channels)

The connectivity matrix.

ch_names : list

The list of channel names present in connectivity matrix.


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