Skip to contents

Estimates the periodicity of data points in a View object.

Usage

spectral_density(view, columns = NULL, data_points = NULL, ...)

Arguments

view

ProcessedView or FilteredView object.

columns

names of data columns e.g. Nose_x.

data_points

data points to process e.g. Nose.

...

passed to stats::spectrum().

Value

SpectralDensityView object.

Examples

r<-get_recording("NIR_ABh_Puriya", fps=25)
rv <- get_raw_view(r, "Central", "", "Sitar")
pv <- get_processed_view(rv)
sd1 <- spectral_density(pv, columns = "LEar_x", spans = 5)

fv <- apply_filter_sgolay(pv, data_points = c("LEye"), n = 19, p = 4)
sd1 <- spectral_density(fv, data_points = c("LEye"), spans = 5)