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

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

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

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

Detailed Description

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

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.1.0
Date
March 2026

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.