TrapMusicDipole
Namespace: INVLIB · Library: Inverse Library
#include <inv/inv_trap_music.h>
struct INVLIB::TrapMusicDipole
Result of a TRAP-MUSIC source scan.
src/examples/ex_inv_beamformer/main.cpp
MatrixX3d positions = fwd.source_rr.cast<double>();
InvTrapMusic trap(2, 0.85); // at most 2 dipoles, stop below a subspace correlation of 0.85
const QList<TrapMusicDipole> dipoles = trap.compute(G, measured, positions, 3);
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 168
MatrixX3d positions = fwd.source_rr.cast<double>();
InvTrapMusic trap(2, 0.85); // at most 2 dipoles, stop below a subspace correlation of 0.85
const QList<TrapMusicDipole> dipoles = trap.compute(G, measured, positions, 3);
QVector<int> found;
for (const TrapMusicDipole& d : dipoles)
found << d.sourceIdx;
std::sort(found.begin(), found.end());
ok &= expect(found == QVector<int>({10, 50}) && std::abs(dipoles[0].orientation.z()) > 0.999,
"InvTrapMusic: TRAP-MUSIC finds both sources one at a time, oriented along z");
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>