drw_utils
#
Module Contents#
Functions#
|
Generate a damped random walk light curve |
|
Generate a damped random walk light curve |
- drw_utils.get_drw(t_rest, tau, z, SF_inf, xmean=0, rng=None)[source]#
Generate a damped random walk light curve This uses a damped random walk model to generate a light curve similar to that of a QSO [1]_. Taken with minor modification from https://github.com/astroML/astroML/blob/main/astroML/time_series/generate.py
- t_restarray_like
rest-frame time. Should be in increasing order
- taufloat
relaxation time
- zfloat
redshift
- xmeanfloat (optional)
mean value of random walk; default=0
- SF_inffloat (optional
Structure function at infinity; default=0.3
- random_stateGenerator instance
random seed or random number generator
- xndarray
the sampled values corresponding to times t_rest
- The differential equation is (with t = time/tau):
dX = -X(t) * dt + sigma * sqrt(tau) * e(t) * sqrt(dt) + b * tau * dt
- where e(t) is white noise with zero mean and unit variance, and
Xmean = b * tau SFinf = sigma * sqrt(tau / 2)
- so
dX(t) = -X(t) * dt + sqrt(2) * SFint * e(t) * sqrt(dt) + Xmean * dt
- 1
Kelly, B., Bechtold, J. & Siemiginowska, A. (2009) Are the Variations in Quasar Optical Flux Driven by Thermal Fluctuations? ApJ 698:895 (2009)
- drw_utils.get_drw_torch(t_rest, tau, z, SF_inf, xmean=0)[source]#
Generate a damped random walk light curve This uses a damped random walk model to generate a light curve similar to that of a QSO [1]_. Taken with minor modification from https://github.com/astroML/astroML/blob/main/astroML/time_series/generate.py
- t_restarray_like
rest-frame time. Should be in increasing order
- taufloat
relaxation time in days
- zfloat
redshift
- xmeanfloat (optional)
mean value of random walk; default=0
- SF_inffloat (optional
Structure function at infinity, in mag; default=0.3
- random_stateint
random seed or random number generator
- xndarray
the sampled values corresponding to times t_rest
- The differential equation is (with t = time/tau):
dX = -X(t) * dt + sigma * sqrt(tau) * e(t) * sqrt(dt) + b * tau * dt
- where e(t) is white noise with zero mean and unit variance, and
Xmean = b * tau SFinf = sigma * sqrt(tau / 2)
- so
dX(t) = -X(t) * dt + sqrt(2) * SFint * e(t) * sqrt(dt) + Xmean * dt
- 1
Kelly, B., Bechtold, J. & Siemiginowska, A. (2009) Are the Variations in Quasar Optical Flux Driven by Thermal Fluctuations? ApJ 698:895 (2009)