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.

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)
#> [[1]]
#> [1] -169.1249
#>
#> [[2]]
#> [1] -237.7298
#>
`