API#

mne_connectivity:

Connectivity for MEG, EEG and iEEG data.

This is the application programming interface (API) reference for classes (CamelCase names) and functions (underscore_case names) of MNE-Connectivity, grouped thematically by analysis stage. The data structure classes contain different types of connectivity data and are described below.

Most-used classes#

Connectivity(data, n_nodes[, names, ...])

Connectivity class without frequency or time component.

TemporalConnectivity(data, times, n_nodes[, ...])

Temporal connectivity class.

SpectralConnectivity(data, freqs, n_nodes[, ...])

Spectral connectivity class.

SpectroTemporalConnectivity(data, freqs, ...)

Spectrotemporal connectivity class.

EpochConnectivity(data, n_nodes[, names, ...])

Epoch connectivity class.

EpochTemporalConnectivity(data, times, n_nodes)

Temporal connectivity class over Epochs.

EpochSpectralConnectivity(data, freqs, n_nodes)

Spectral connectivity class over Epochs.

EpochSpectroTemporalConnectivity(data, ...)

Spectrotemporal connectivity class over Epochs.

Connectivity functions#

These functions compute connectivity and return one of the Connectivity data structure classes listed above. All these functions work with MNE-Python’s Epochs class, which is the recommended input to these functions. However, they also work on numpy array inputs.

envelope_correlation(data[, names, ...])

Compute the envelope correlation.

phase_slope_index(data[, names, indices, ...])

Compute the Phase Slope Index (PSI) connectivity measure.

vector_auto_regression(data[, times, names, ...])

Compute vector auto-regresssive (VAR) model.

spectral_connectivity_epochs(data[, names, ...])

Compute frequency- and time-frequency-domain connectivity measures.

spectral_connectivity_time(data, freqs[, ...])

Compute time-frequency-domain connectivity measures.

Decoding classes#

These classes fit filters which decompose data into discrete sources of connectivity, amplifying the signal-to-noise ratio of these interactions.

CoherencyDecomposition(info, method, indices)

Decompose connectivity sources using multivariate coherency-based methods.

Reading functions#

read_connectivity(fname)

Read connectivity data from netCDF file.

Pre-processing on connectivity#

symmetric_orth(data, *[, n_iter, tol, verbose])

Perform symmetric orthogonalization.

Post-processing on connectivity#

degree(connectivity[, threshold_prop])

Compute the undirected degree of a connectivity matrix.

seed_target_indices(seeds, targets)

Generate indices parameter for bivariate seed-based connectivity.

seed_target_multivariate_indices(seeds, targets)

Generate indices parameter for multivariate seed-based connectivity.

check_indices(indices)

Check indices parameter for bivariate connectivity.

select_order(X[, maxlags])

Compute lag order selections based on information criterion.

Visualization functions#

plot_sensors_connectivity(info, con[, ...])

Visualize the sensor connectivity in 3D.

plot_connectivity_circle(con, node_names[, ...])

Visualize connectivity as a circular graph.

Dataset functions#

make_signals_in_freq_bands(n_seeds, ...[, ...])

Simulate signals interacting in a given frequency band.

make_surrogate_data(data[, n_shuffles, ...])

Create surrogate data for a null hypothesis of connectivity.