Computes absolute and relative spectral band powers for each channel using
Welch's method (windowed FFT averaging). Results are stored as a new assay
(channels x bands matrix of absolute power) and as relative power in
metadata(x)$qeeg.
Usage
eegQEEG(
x,
bands = NULL,
window_sec = 2,
overlap = 0.5,
assay_name = NULL,
output_assay = "qeeg"
)Arguments
- x
A PhysioExperiment object with EEG data.
- bands
Named list of frequency bands. Each element is a numeric vector of length 2 specifying the lower and upper frequency in Hz. Defaults to standard EEG bands: delta (1-4), theta (4-8), alpha (8-13), beta (13-30), gamma (30-50).
- window_sec
Window length in seconds for Welch's method (default: 2).
- overlap
Overlap fraction between windows, 0 to 1 (default: 0.5).
- assay_name
Name of the input assay. If
NULL, the default assay is used.- output_assay
Name of the assay to store absolute power results (default:
"qeeg").
Value
Modified PhysioExperiment with:
Absolute power matrix (n_channels x n_bands) in
output_assayBand definitions and relative power in
metadata(x)$qeeg, a list containingbands,absolute_power,relative_power,band_names,window_sec, andoverlap.