v2.0.0
Loading...
Searching...
No Matches
crosscorrelation.h File Reference

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>
Include dependency graph for crosscorrelation.h:
This graph shows which files directly or indirectly include this file:

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.).

Detailed Description

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

Author
Lorenz Esch loren.nosp@m.z.es.nosp@m.ch@tu.nosp@m.-ilm.nosp@m.enau..nosp@m.de; Juan GPC jgarc.nosp@m.iapr.nosp@m.ieto@.nosp@m.mgh..nosp@m.harva.nosp@m.rd.e.nosp@m.du; Gabriel Motta gabri.nosp@m.elbe.nosp@m.nmott.nosp@m.a@gm.nosp@m.ail.c.nosp@m.om; Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
0.1.0
Date
January 2018

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.