Skip to contents

signal -> band power per channel. Band power is computed from the Welch PSD integrated over each band, so it is inherently frequency-selective (no pre-filter needed).

Usage

tar_eeg_bandpower(
  name = "eeg",
  source = NULL,
  bands = list(alpha = c(8, 13), beta = c(13, 30)),
  method = "welch",
  relative = FALSE
)

Arguments

name

Target-name prefix.

source

Expression producing a PhysioExperiment, or NULL for a synthetic EEG demo (10 Hz alpha + noise).

bands

Named list of c(low, high) Hz bands.

method

Welch or wavelet PSD.

relative

Report band power relative to total.

Value

A list of targets.

Examples

# Returns target objects (synthetic EEG demo); splice into a `_targets.R`.
targs <- tar_eeg_bandpower()
length(targs)
#> [1] 3
# Point it at a real file instead of the synthetic demo:
# tar_eeg_bandpower(source = quote(PhysioIO::readEDF("sub01.edf")))