Complex coherency between every channel pair and its two reductions: magnitude (coherence) and imaginary part (imaginary coherence). 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::Coherency |
| Complex coherency core; produces magnitude-squared and imaginary-part reductions for downstream metrics. More... | |
Namespaces | |
| namespace | CONNECTIVITYLIB |
| Functional connectivity metrics (coherence, PLV, cross-correlation, etc.). | |
Complex coherency between every channel pair and its two reductions: magnitude (coherence) and imaginary part (imaginary coherence).
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2018-2026 MNE-CPP Authors
Coherency is the normalised cross-spectrum,
Coh_{xy}(f) = S_{xy}(f) / sqrt(S_{xx}(f) * S_{yy}(f))
a complex-valued quantity whose magnitude is the classical coherence in [0, 1] and whose argument is the average phase lag between the two signals at frequency f. Splitting it into real and imaginary parts is the basis of the volume-conduction-robust imaginary-coherence estimator of Nolte et al. (NeuroImage, 2004): only non-zero phase lag (i.e. true interaction with finite conduction delay) survives projection onto the imaginary axis, while instantaneous common-reference / volume-conduction mixing contributes only to the real axis and is rejected.
The per-trial workhorse Coherency::compute computes DPSS tapered spectra and accumulates the cross-spectral and auto-spectral sums into the shared ConnectivitySettings::IntermediateSumData. The two public reductions, calculateAbs and calculateImag, then divide by the running auto-spectral norms and average over the frequency window defined on AbstractMetric to produce the scalar edge weights of the returned Network.
Definition in file coherency.h.