Implementation of the Spatio-Spectral Decomposition narrowband enhancer. More...
#include "decoding_ssd.h"#include <Eigen/Eigenvalues>#include <algorithm>#include <cmath>#include <stdexcept>
Go to the source code of this file.
Implementation of the Spatio-Spectral Decomposition narrowband enhancer.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
Internally band-passes the input continuous data twice — once for the signal band and once for the flanking noise band — with a zero-phase windowed-sinc FIR (forward + reverse pass), computes the two covariance matrices, shrinks the noise covariance towards a scaled identity by regParam, and solves the generalised eigenproblem \(\Sigma_s w = \lambda \Sigma_n w\) via Eigen's GeneralizedSelfAdjointEigenSolver. The leading n_components eigenvectors are stored as filters; their pseudoinverse columns are stored as patterns and the eigenvalues themselves are kept verbatim as the per-component signal-band-to-noise-band power ratio that the caller uses to decide on the effective rank.
DecodingSsd::transform returns the projection of the input into the (lower-dimensional) signal subspace, while DecodingSsd::apply performs the low-rank back-projection \(X_{\text{clean}} = A_{:,1:k} W_{1:k,:} X\) to produce a sensor- space denoised reconstruction with the broadband background suppressed but the narrowband oscillation of interest preserved. The bandpass kernel is generated on the fly per call: this trades a negligible amount of compute for the freedom to reuse the same fitted model with different sampling rates downstream.
Definition in file decoding_ssd.cpp.