rednoise

rednoise(a, ntime=100, nsamples=1, mean=0, stdev=1, state=None)[source]

Return one or more artificial red noise time series with prescribed mean and standard deviation. The time series are generated with the following equation:

\[x(t) = a \cdot x(t - \Delta t) + b \cdot \epsilon(t)\]

where a is the lag-1 autocorrelation and b is a scaling term.

Parameters
  • a (float) – The autocorrelation.

  • ntime (int, optional) – Number of timesteps.

  • nsamples (int or list of int, optional) – Axis size or list of axis sizes for the “sample” dimension(s). Shape of the output array will be (ntime,) if nsamples is not provided, (ntime, nsamples) if nsamples is scalar, or (ntime, *nsamples) if nsamples is a list of axis sizes.

  • mean, stdev (float, optional) – The mean and standard deviation for the red noise time series.

  • state (numpy.RandomState, optional) – The random state to use for generating the data.

Returns

data (array-like) – The red noise data.

See also

rednoisefit