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

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

#include "sts_source_metrics.h"
#include <cmath>
Include dependency graph for sts_source_metrics.cpp:

Go to the source code of this file.

Detailed Description

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

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

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.