This documentation is for astroML version 0.2

This page


astroML Mailing List

GitHub Issue Tracker


Scipy 2012 (15 minute talk)

Scipy 2013 (20 minute talk)


If you use the software, please consider citing astroML. astroML.time_series.generate_power_law

astroML.time_series.generate_power_law(N, dt, beta, generate_complex=False, random_state=None)

Generate a power-law light curve

This uses the method from Timmer & Koenig [R20]

Parameters :

N : integer

Number of equal-spaced time steps to generate

dt : float

Spacing between time-steps

beta : float

Power-law index. The spectrum will be (1 / f)^beta

generate_complex : boolean (optional)

if True, generate a complex time series rather than a real time series

random_state : None, int, or np.random.RandomState instance (optional)

random seed or random number generator

Returns :

x : ndarray

the length-N


[R20](1, 2) Timmer, J. & Koenig, M. On Generating Power Law Noise. A&A 300:707