Estimates power spectral density (PSD) using Welch's method and integrates power within standard EEG frequency bands (delta, theta, alpha, sigma, beta, gamma) for each epoch and each specified channel. Mirrors the band-power feature extraction used by YASA's staging pipeline.
Arguments
- psg
An
mrpheus_psgobject fromprepare_psg().- channels
Character vector. EEG channel labels. If
NULL(default), all non-bad EEG channels are used.- bands
Named list of length-2 numeric vectors defining frequency bands. Default:
- relative
Logical. If
TRUE, return relative band power (band / total power in 0.5–40 Hz). DefaultFALSE.- window_s
Numeric. Welch window length in seconds. Default
4.- overlap
Numeric in [0, 1). Fractional overlap between Welch windows. Default
0.5.