Magnitude-squared coherence (MSC) between every channel pair, band-averaged over the selected DPSS spectral window. More...
#include "../connectivity_global.h"#include "abstractmetric.h"#include <QSharedPointer>#include <Eigen/Core>

Go to the source code of this file.
Classes | |
| class | CONNECTIVITYLIB::Coherence |
| Magnitude-squared coherence estimator (symmetric, sensitive to zero-lag coupling). More... | |
Namespaces | |
| namespace | CONNECTIVITYLIB |
| Functional connectivity metrics (coherence, PLV, cross-correlation, etc.). | |
Magnitude-squared coherence (MSC) between every channel pair, band-averaged over the selected DPSS spectral window.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2018-2026 MNE-CPP Authors
Coherence is the canonical undirected linear measure of frequency-domain coupling. It is defined as the squared magnitude of complex coherency normalised by the auto-spectra,
C_{xy}(f) = |S_{xy}(f)|^2 / (S_{xx}(f) * S_{yy}(f))
where S_{xy} is the cross-spectral density and S_{xx}, S_{yy} are the auto-spectra. Values lie in [0, 1]: 1 means a perfectly linear, constant phase/amplitude relationship at frequency f and 0 means no linear relationship. Because the squared magnitude discards the phase, coherence is symmetric and cannot distinguish true coupling from volume-conduction / common-reference artefacts that produce instantaneous (zero-lag) mixing - use ImagCoherence (Nolte et al., 2004) when volume conduction is a concern.
This implementation delegates the per-trial FFT, tapering and CSD accumulation to Coherency::calculateAbs, then collapses the result to a scalar per channel pair by averaging |coherency|^2 over the frequency window [AbstractMetric::m_iNumberBinStart, m_iNumberBinStart + m_iNumberBinAmount).
Definition in file coherence.h.