Welch's averaged-periodogram power-spectral-density estimator. More...


Go to the source code of this file.
Classes | |
| struct | UTILSLIB::WelchPsdResult |
| Result of a Welch PSD computation. More... | |
| class | UTILSLIB::WelchPsd |
| Welch's averaged-periodogram power spectral density estimator. More... | |
Namespaces | |
| namespace | UTILSLIB |
| Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms). | |
Welch's averaged-periodogram power-spectral-density estimator.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
Welch's method (1967) splits the signal into overlapping segments, applies a window function (Hann by default) to each segment, takes the squared magnitude FFT, and averages the resulting periodograms. Compared with a single FFT of the full record, the segment averaging reduces the variance of the estimate by approximately the number of segments at the cost of a coarser frequency resolution proportional to the inverse of the window length. Standard overlap is 50% with a Hann window, which gives an effectively independent sample count of ≈0.36 · (n_segments).
The estimator returns either a one-sided spectrum (real-valued input, negative frequencies folded onto positive ones with a factor of two) or the full two-sided spectrum, and supports linear, mean and constant detrending of each segment prior to windowing.
Definition in file welch_psd.h.