v2.0.0
Loading...
Searching...
No Matches
sts_source_metrics.h File Reference

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

#include "sts_global.h"
#include <Eigen/Core>
Include dependency graph for sts_source_metrics.h:
This graph shows which files directly or indirectly include this file:

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).

Detailed Description

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

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.2.0
Date
April 2026

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.