Implementation of the peak localisation error and spatial dispersion metrics declared in sts_source_metrics.h. More...

Go to the source code of this file.
Implementation of the peak localisation error and spatial dispersion metrics declared in sts_source_metrics.h.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
Peak localisation error is the Euclidean norm of the difference between true and estimated peak positions. Spatial dispersion walks the source list once, accumulating |a_k| * dist(k, peak) into the numerator and |a_k| into the denominator so the result is the amplitude-weighted mean distance from the estimated peak in the same units as the input positions (typically millimetres). findPeakIndex is a single absolute-value argmax over the amplitude vector.
Definition in file sts_source_metrics.cpp.