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

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

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

Detailed Description

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

Author
Daniel Strohmeier danie.nosp@m.l.st.nosp@m.rohme.nosp@m.ier@.nosp@m.gmail.nosp@m..com; 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
April 2018

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.