Skip to contents

R parity of morie.entheo_dmt.spectral_band_power. Wraps rgpsd (morie's Welch PSD; same algorithm as SciPy's welch) and integrates the PSD over each canonical band by the trapezoidal rule.

Usage

morie_entheo_spectral_band_power(
  signal,
  fs = 200,
  bands = .MORIE_ENTHEO_DEFAULT_BANDS,
  nperseg = NULL
)

Arguments

signal

numeric vector. A 1-D EEG time series.

fs

numeric. Sampling frequency in Hz. Default 200 Hz (Timmermann 2023 acquisition).

bands

list of list(name=, lo=, hi=) entries. Default = canonical delta/theta/alpha/beta/gamma.

nperseg

integer or NULL. Welch segment length. Defaults to min(length(signal), max(64, 4*fs)) – 4-second segments at fs.

Value

RichResult-style named list. payload$rows carries per-band absolute and relative power.

References

Welch, P. (1967). The use of FFT for the estimation of power spectra. IEEE Trans. Audio Electroacoust. 15(2): 70-73. Rangayyan, R. M. & Krishnan, S. (2024). Biomedical Signal Analysis, 3rd ed., Ch. 5.