power.spec: Power Spectral Density

Description Usage Arguments Value Examples

Description

Estimates normalized power spectral density of a time series

Usage

1
2
3
power.spec(x, hz = 1, use.period = FALSE,
center = FALSE, detrend = FALSE, pad = TRUE,
logxy = FALSE, do.plot = TRUE, graph.par = NULL)

Arguments

x

a real valued time series

hz

the sampling rate in Hz, default = 1

use.period

logical indicating whether power should be given in terms of period (s) instead of frequency (hz)

center

logical indicating whether series should be centered

detrend

logical indicating whether linear trend should be removed

pad

logical indicating whether zero padding should be applied

logxy

should frequency and power be returned in log10 units?

do.plot

logical indicating whether plot should be generated. if logxy = TRUE, plot will also be in log units.

graph.par

a list comtaining additional graphical parameters to use for plotting. The default is NULL

Value

returns normalized power spectrum

Examples

1
2
3
4
tt = (1:1000)/29.97
sintt = sin(2*pi*tt*3)
ps = power.spec(sintt, hz = 29.97,use.period = FALSE, center = TRUE, detrend = FALSE,
 pad = TRUE, logxy = FALSE, do.plot = TRUE)

aaronlikens/framediff documentation built on May 24, 2019, 8:51 a.m.