mne.connectivity.envelope_correlation(data, combine='mean', orthogonalize='pairwise', log=False, absolute=True, verbose=None)[source]

Compute the envelope correlation.

dataarray_like, shape=(n_epochs, n_signals, n_times) | generator

The data from which to compute connectivity. The array-like object can also be a list/generator of array, each with shape (n_signals, n_times), or a SourceEstimate object (and will be used). If it’s float data, the Hilbert transform will be applied; if it’s complex data, it’s assumed the Hilbert has already been applied.

combine‘mean’ | callable() | None

How to combine correlation estimates across epochs. Default is ‘mean’. Can be None to return without combining. If callable, it must accept one positional input. For example:

combine = lambda data: np.median(data, axis=0)
orthogonalize‘pairwise’ | False

Whether to orthogonalize with the pairwise method or not. Defaults to ‘pairwise’. Note that when False, the correlation matrix will not be returned with absolute values.

New in version 0.19.


If True (default False), square and take the log before orthonalizing envelopes or computing correlations.

New in version 0.22.


If True (default), then take the absolute value of correlation coefficients before making each epoch’s correlation matrix symmetric (and thus before combining matrices across epochs). Only used when orthogonalize=True.

New in version 0.22.

verbosebool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more). If used, it should be passed as a keyword-argument only.

corrndarray, shape ([n_epochs, ]n_nodes, n_nodes)

The pairwise orthogonal envelope correlations. This matrix is symmetric. If combine is None, the array with have three dimensions, the first of which is n_epochs.


This function computes the power envelope correlation between orthogonalized signals [1] [2].

Changed in version 0.22: Computations fixed for orthogonalize=True and diagonal entries are set explicitly to zero.



Hipp JF, Hawellek DJ, Corbetta M, Siegel M, Engel AK (2012) Large-scale cortical correlation structure of spontaneous oscillatory activity. Nature Neuroscience 15:884–890


Khan S et al. (2018). Maturation trajectories of cortical resting-state networks depend on the mediating frequency band. Neuroimage 174:57–68

Examples using mne.connectivity.envelope_correlation