bands_psd: Compute power spectral density of bands listed in the bands...

View source: R/eeg.R

bands_psdR Documentation

Compute power spectral density of bands listed in the bands argument.

Description

'bands_psd' calculates power spectral densities estimates on bands. Bands are computed from spectrogram bands equal or greater than lower limit and inferior to the upper limit.

Usage

bands_psd(signal, sRate, bands, normalize = FALSE, method = "pwelch")

Arguments

signal

Numerical vector of the signal.

sRate

Signal sample rate in Hertz.

bands

A list of bands to compute with lower and upper limits in the form 'list(c(0,4),c(4,8))“

normalize

A band to normalize (divide) by. Defaults to 'c(0.5,40)'. Can be set up to FALSE for raw results. Defaults to FALSE.

method

Character. Method to use to compute power spectral density. "pwelch" or "psm". Defaults to "pwelch".

Value

A list of bands powers.

Examples

signal <- sin(seq(0,100,0.01))
bands_psd(bands = list(c(0,4),c(4,8)), signal = signal, sRate = 200)

rsleep documentation built on Nov. 6, 2023, 1:06 a.m.