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 arrays, each with shape
(n_signals, n_times)
, or amne.SourceEstimate
object (andstc.data
will be used). If float data, the Hilbert transform will be applied; if complex data, it is assumed the Hilbert has already been applied.- namesarray_like |
None
A list of names associated with the signals in
data
. IfNone
, 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 whenFalse
, the correlation matrix will not be returned with absolute values.- logbool
If
True
(defaultFalse
), 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 whenorthogonalize='pairwise'
.- verbosebool |
str
|int
|None
Control verbosity of the logging output. If
None
, use the default verbosity level. See the logging documentation andmne.verbose()
for details. Should only be passed as a keyword argument.
- dataarray_like, shape (n_epochs, n_signals, n_times) |
- 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 is(n_epochs, (n_nodes + 1) * n_nodes / 2)
.
- corrinstance of
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 theEpochTemporalConnectivity
class.References
Examples using mne_connectivity.envelope_correlation
#

Compute envelope correlations in volume source space