Coherence
Namespace: CONNECTIVITYLIB · Library: Connectivity Library
mne_connectivity.spectral_connectivity_epochs (method='coh') in MNE-Python.
#include <connectivity/coherence.h>
class CONNECTIVITYLIB::Coherence
Computes magnitude-squared coherence between every pair of channels.
The actual cross-spectral and auto-spectral accumulation is shared with Coherency; this class only wraps the absolute-value branch and exposes a single calculate entry point that returns a Network whose edge weights are the band-averaged |coherency|^2 values in [0, 1].
Magnitude-squared coherence estimator (symmetric, sensitive to zero-lag coupling).
Network coherence = Coherence::calculate(settings);
coherence.setFrequencyRange(8.0f, 12.0f);
const double coh01 = edgeWeight(coherence, 0, 1);
const double coh02 = edgeWeight(coherence, 0, 2);
Inheritance
Public Methods
Coherence()
Constructs a Coherence object.
Static Methods
calculate(connectivitySettings)
Calculates the coherence between the rows of the data matrix.
Parameters:
- connectivitySettings : ConnectivitySettings & The input data and parameters.
Returns:
- Network — The connectivity information in form of a network structure.
Example
- Full source:
src/examples/ex_connectivity_metrics/main.cpp - Build target:
ex_connectivity_metrics(runs under CTest)
Used in examples
ex_connectivity_metrics
Connectivity metrics on synthetic data with a known coupling.
Network coherence = Coherence::calculate(settings);
coherence.setFrequencyRange(8.0f, 12.0f);
const double coh01 = edgeWeight(coherence, 0, 1);
const double coh02 = edgeWeight(coherence, 0, 2);
ok &= expect(coh01 > coh02 + 0.3, QString("COH 0-1 %1 > 0-2 %2 + 0.3").arg(coh01).arg(coh02));
Authors of this file
- Daniel Strohmeier <daniel.strohmeier@gmail.com>
- Lorenz Esch <lorenz.esch@tu-ilmenau.de>
- Juan GPC <jgarciaprieto@mgh.harvard.edu>
- Gabriel Motta <gabrielbenmotta@gmail.com>
- Christoph Dinh <christoph.dinh@mne-cpp.org>