mne_connectivity.envelope_correlation#

mne_connectivity.envelope_correlation(data, names=None, orthogonalize='pairwise', log=False, absolute=True, verbose=None)[source]#

Compute the envelope correlation.

Parameters:
dataarray_like, shape=(n_epochs, n_signals, n_times) | Epochs | 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 stc.data 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.

nameslist | array_like | None

A list of names associated with the signals in data. If None, will be a list of indices of the number of nodes.

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.

logbool

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

absolutebool

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='pairwise'.

verbosebool | str | int | None

Control verbosity of the logging output. If None, use the default verbosity level. See the logging documentation and mne.verbose() for details. Should only be passed as a keyword argument.

Returns:
corrinstance of EpochTemporalConnectivity

The pairwise orthogonal envelope correlations. This matrix is symmetric. The array will have three dimensions, the first of which is n_epochs. The data shape would be (n_epochs, (n_nodes + 1) * n_nodes / 2).

Notes

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

If you would like to combine Epochs after the fact using some function over the Epochs axis, see the combine() method of the EpochTemporalConnectivity class.

References

Examples using mne_connectivity.envelope_correlation#

Compute envelope correlations in source space

Compute envelope correlations in source space

Compute envelope correlations in volume source space

Compute envelope correlations in volume source space