Skip to main content

InvSourceCoupling

Namespace: INVLIB  ·  Library: Inverse Library

#include <inv/inv_source_coupling.h>

struct INVLIB::InvSourceCoupling

Describes a group of N coupled (correlated) source grid points found by algorithms such as RAP-MUSIC.

The group can be a pair, triplet, or any N-tuple of grid indices together with their orientations and an N x N correlation matrix.

N-tuple of correlated grid sources with orientations and correlation matrix.

src/examples/ex_inv_api/main.cpp
InvSourceEstimate layered = stc;
InvFocalDipole dipole; // an off-grid ECD result alongside the grid
dipole.position = Vector3f(0.01f, -0.08f, 0.03f);
dipole.moment = Vector3f(0.0f, 0.0f, 20e-9f);
dipole.goodness = 0.9f;
layered.focalDipoles.push_back(dipole);
InvSourceCoupling pair; // two grid sources that move together
pair.gridIndices = {0, 1};
pair.moments = {Vector3d::UnitZ(), Vector3d::UnitZ()};
pair.correlations = Matrix2d{{1.0, 0.8}, {0.8, 1.0}};
layered.couplings.push_back(pair);
InvConnectivity coherence; // a source-space connectivity layer
coherence.measure = "coh";
coherence.matrix = Matrix2d{{1.0, 0.4}, {0.4, 1.0}};
coherence.fmin = 8.0f;
coherence.fmax = 12.0f;
layered.connectivity.push_back(coherence);
InvTokenizeOptions options; // at most 5 sources and 10 samples; values travel as float
options.maxSources = 5;
options.maxTimePoints = 10;
const std::vector<InvToken> tokens = tokenize(layered, options);
const InvSourceEstimate fromTokenStream = fromTokens(tokens);

Public Methods​

InvSourceCoupling()​


Example​

Used in examples​

ex_inv_api​

Inverse library: minimum-norm estimates, resolution matrices, label time courses, sparse solvers.

src/examples/ex_inv_api/main.cpp, line 290
dipole.moment = Vector3f(0.0f, 0.0f, 20e-9f);
dipole.goodness = 0.9f;
layered.focalDipoles.push_back(dipole);
InvSourceCoupling pair; // two grid sources that move together
pair.gridIndices = {0, 1};
pair.moments = {Vector3d::UnitZ(), Vector3d::UnitZ()};
pair.correlations = Matrix2d{{1.0, 0.8}, {0.8, 1.0}};
layered.couplings.push_back(pair);
InvConnectivity coherence; // a source-space connectivity layer
coherence.measure = "coh";
coherence.matrix = Matrix2d{{1.0, 0.4}, {0.4, 1.0}};
coherence.fmin = 8.0f;
coherence.fmax = 12.0f;
layered.connectivity.push_back(coherence);

Authors of this file​