cycles: Generate harmonic model

cyclesR Documentation

Generate harmonic model

Description

Make a time series with specified harmonic components and noise

Usage

cycles(freqs=NULL,phase=NULL,amp=NULL,start=0,end=499,dt=1,noisevar=0,genplot=T,
        verbose=T)

Arguments

freqs

Vector with frequencies to model ('linear' frequencies).

phase

Vector with phases for each frequency (phase in radians). Phases are subtracted.

amp

Vector with amplitudes for each frequency.

start

First time/depth/height for output.

end

Last time/depth/height for output.

dt

Sampling interval.

noisevar

Variance of additive Gaussian noise.

genplot

Generate summary plots? (T or F)

verbose

Verbose output? (T or F)

Value

modeled time series.

Examples

## test signal on pg 38 of Choudhury, Shah, and Thornhill (2008)
freqs=c(0.12,0.18,0.30,0.42)
phase=c(-pi/3,-pi/12,-pi/4,-3*pi/8)
amp=c(1,1,1,1)

cycles(freqs,phase,amp,start=0,end=4095,dt=1,noisevar=0.2)

astrochron documentation built on Sept. 30, 2024, 9:14 a.m.