signalgen | R Documentation |
Calculates periodically varying values for given observation times.
signalgen(tt, ytype, pf = 1)
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 |
pf |
positive numeric value: Fluctuation period pf. |
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.
numeric vector: Values yf[1],…,yf[n].
This function is used in Thieler et al. (2013). See also Thieler, Fried and Rathjens (2016).
Anita M. Thieler and Jonathan Rathjens
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>
Applied in tsgen
(see there for an example).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.