Peak localisation error and spatial dispersion metrics for evaluating distributed M/EEG inverse solutions. More...


Go to the source code of this file.
Classes | |
| class | STSLIB::StatsSourceMetrics |
| Peak localisation error and spatial dispersion metrics for evaluating distributed M/EEG inverse solutions. More... | |
Namespaces | |
| namespace | STSLIB |
| Statistical testing (t-tests, F-tests, cluster permutation, multiple comparison correction). | |
Peak localisation error and spatial dispersion metrics for evaluating distributed M/EEG inverse solutions.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
Distributed source estimators (MNE, dSPM, sLORETA, eLORETA, CMNE) smear point sources across a neighbourhood of the cortex, so judging an inverse solver requires more than just looking at the maximum. This module provides the two metrics standardly reported in the source-localisation literature: peak localisation error (PE), the Euclidean distance between the true source and the estimated peak, and spatial dispersion (SD), the amplitude-weighted mean distance from the estimated peak \(\mathrm{SD} = \sum_k |a_k|\,\|r_k - r_\text{peak}\| / \sum_k |a_k|\).
PE quantifies localisation bias; SD quantifies how focally the solver concentrates activity around that peak. A good solver achieves a small PE and a small SD; trade-offs between the two characterise the different inverse families. The helper findPeakIndex returns the index of the source with maximum absolute amplitude so callers never have to roll their own argmax.
References: Molins et al. (2008), NeuroImage 42(3); Lin et al. (2006), NeuroImage 31(1); Dinh et al. (2021), Front. Neurosci. 15.
Definition in file sts_source_metrics.h.