signalgen {RobPer}R 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 t1,,tnt_1,\ldots,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 p_f.

Details

The values yf;1,,yf;ny_{f;1},\ldots,y_{f;n} with fluctuation period pfp_f and related to observation times t1,,tnt_1,\ldots,t_n are generated using

yf;i=f(tipf),i=1,,n.y_{f;i}=f\left(\frac{t_i}{p_f}\right), i=1,\ldots,n.

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

fconst(t)=0, f_{const}(t) = 0,

fsine(t)=sin(2πtpf),f_{sine}(t)= \sin\left(\frac{2\pi t}{p_f}\right),

ftrian(t)=3φ1(t),0φ1(t)23,f_{trian}(t)= 3\varphi_{1}(t), \quad 0\leq \varphi_{1}(t)\leq\frac{2}{3},

ftrian(t)=66φ1(t),23<φ1(t)1,f_{trian}(t)= 6-6\varphi_{1}(t),\quad \frac{2}{3}<\varphi_{1}(t)\leq 1,

fpeak(t)=9exp(3pf2(φ1(t)23)2),0φ1(t)23,f_{peak}(t)= 9\exp\left(-3p_f^2\left(\varphi_{1}(t)-\frac 23\right)^2\right),\quad 0\leq \varphi_{1}(t)\leq\frac{2}{3},

fpeak(t)=9exp(12pf2(φ1(t)23)2),23<φ1(t)1,f_{peak}(t)= 9\exp\left(-12p_f^2\left(\varphi_{1}(t)-\frac 23\right)^2\right),\quad \frac{2}{3}<\varphi_{1}(t)\leq 1,

with φ1(t)=tmod1=(tt/pfpf)/pf\varphi_1(t) = t mod1 = (t-\lfloor t/p_f \rfloor p_f)/p_f = (t%%1)/pf. fconstf_{const} means that there is no (periodic) fluctuation, fsinef_{sine} defines a sine function, ftrianf_{trian} defines a triangular shaped periodic function and fpeakf_{peak} a periodically repeating peak.

Value

numeric vector: Values yf;1,,yf;ny_{f;1},\ldots,y_{f;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).


[Package RobPer version 1.2.3 Index]