Time-lagged cross-correlation between every channel pair, computed via the inverse FFT of the cross-spectrum. More...
#include "../connectivity_global.h"#include "abstractmetric.h"#include "../connectivitysettings.h"#include <QSharedPointer>#include <QMutex>#include <Eigen/Core>

Go to the source code of this file.
Classes | |
| class | CONNECTIVITYLIB::CrossCorrelation |
| Time-lagged cross-correlation estimator; broadband, sensitive to delayed coupling. More... | |
Namespaces | |
| namespace | CONNECTIVITYLIB |
| Functional connectivity metrics (coherence, PLV, cross-correlation, etc.). | |
Time-lagged cross-correlation between every channel pair, computed via the inverse FFT of the cross-spectrum.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2018-2026 MNE-CPP Authors
For two zero-mean signals x and y the cross-correlation is
c_{xy}(tau) = E[ x[t] * y[t + tau] ]
which by the Wiener-Khinchin theorem equals the inverse Fourier transform of the cross-spectrum S_{xy}(f). This implementation therefore reuses the DPSS-tapered FFTs computed by the spectral metrics and runs an IFFT on S_{xy} to obtain c_{xy}(tau) for all lags in [-Nfft/2, Nfft/2); the edge weight stored on the Network is the maximum absolute correlation over the lag axis, which gives a lag-robust scalar similarity measure suitable for detecting delayed coupling that zero-lag Correlation would miss.
Like Correlation this is a broadband time-domain estimator with no rejection of volume conduction or common-reference mixing; the lag at which the maximum occurs can however be inspected separately and used as a coarse conduction-delay estimate.
Definition in file crosscorrelation.h.