signalgen: Generator for periodic signal in a light curve

View source: R/signalgen.R

signalgenR Documentation

Generator for periodic signal in a light curve

Description

Calculates periodically varying values for given observation times.

Usage

signalgen(tt, ytype, pf = 1)

Arguments

tt

numeric vector: Observation times t_1,…,t_n (see Details).

ytype

character string: Specifying the shape of the periodic fluctuation (see Details). Possible choices are "const", "sine", "trian","peak".

pf

positive numeric value: Fluctuation period pf.

Details

The values yf[1],…,yf[n] with fluctuation period pf and related to observation times t[1],…,t[n] are generated using

yf[i]=f(t[i]/pf), i=1,…,n.

Depending on ytype (see above), f is defined as:

f.const(t)=0,

f.sine(t)=sin(2π t/pf),

f.trian(t)=3*phase(t) if 0 ≤ phase(t) ≤ 2/3,

f.trian(t)=6-6*phase(t) if 2/3 < phase(t) ≤ 1,

f.peak(t)=9exp(-3pf^2*(phase(t)-2/3)^2) if 0 ≤ phase(t) ≤ 2/3,

f.peak(t)=9exp(-12pf^2*(phase(t)-2/3)^2) if 2/3 < phase(t) ≤ 1,

with phase(t) = t mod 1 = (t%%1)/pf. f.const means that there is no (periodic) fluctuation, f.sine defines a sine function, f.trian defines a triangular shaped periodic function and f.peak a periodically repeating peak.

Value

numeric vector: Values yf[1],…,yf[n].

Note

This function is used in Thieler et al. (2013). See also Thieler, Fried and Rathjens (2016).

Author(s)

Anita M. Thieler and Jonathan Rathjens

References

Thieler, A. M., Backes, M., Fried, R. and Rhode, W. (2013): Periodicity Detection in Irregularly Sampled Light Curves by Robust Regression and Outlier Detection. Statistical Analysis and Data Mining, 6 (1), 73-89

Thieler, A. M., Fried, R. and Rathjens, J. (2016): RobPer: An R Package to Calculate Periodograms for Light Curves Based on Robust Regression. Journal of Statistical Software, 69 (9), 1-36, <doi:10.18637/jss.v069.i09>

See Also

Applied in tsgen (see there for an example).


RobPer documentation built on June 13, 2022, 1:06 a.m.