InvDipolePair
Namespace: INVLIB · Library: Inverse Library
#include <inv/inv_dipole.h>
template <typename T>
struct INVLIB::InvDipolePair
Declares a InvDipolePair structure consisting of two correlated dipoles which are the result of the RAP MUSIC searching algorithm.
Pair of correlated dipole indices and orientations found by the RAP MUSIC scanning step
src/examples/ex_inv_beamformer/main.cpp
// Noise-free data from the two sources with different time courses; RAP-MUSIC scans source pairs.
const int nSamples = 60;
MatrixXd measured(G.rows(), nSamples);
for (int t = 0; t < nSamples; ++t)
measured.col(t) = g1 * std::sin(0.21 * t) + g2 * std::sin(0.53 * t + 0.4);
QList<InvDipolePair<double>> pairs;
InvRapMusic rap(fwd, false, 1, 0.5); // one correlated pair, subspace correlation >= 0.5
rap.calculateInverse(measured, pairs);
QList<InvDipolePair<double>> powellPairs;
InvPwlRapMusic pwlRap(fwd, false, 1, 0.5); // Powell coordinate search: far fewer pairs, may stop at a local optimum
pwlRap.calculateInverse(measured, powellPairs);
Example
- Full source:
src/examples/ex_inv_beamformer/main.cpp - Build target:
ex_inv_beamformer(runs under CTest) - Data: mne-cpp-test-data
Used in examples
ex_inv_beamformer
Inverse library: LCMV and DICS beamformers and the RAP-MUSIC family of dipole scanners.
src/examples/ex_inv_beamformer/main.cpp, line 81
bool isPair(const InvDipolePair<double>& pair, int a, int b)
{
return std::min(pair.m_iIdx1, pair.m_iIdx2) == std::min(a, b) && std::max(pair.m_iIdx1, pair.m_iIdx2) == std::max(a, b);
}
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>