meegsim.waveform.one_over_f_noise#

meegsim.waveform.one_over_f_noise(n_series, times, *, slope=1, random_state=None)[source]#

Generate time series of 1/f noise with desired slope.

Parameters:
n_seriesint

The number of time series to generate.

timesarray

Array of time points (each one represents time in seconds). Only the size of the array is used for noise generation.

slopefloat, optional

Exponent of the power-law spectrum. By default, it is equal to 1.

random_stateNone (default) or int

Seed for the random number generator. If None (default), results will vary between function calls. Use a fixed value for reproducibility.

Returns:
outarray, shape (n_series, n_times)

Generated 1/f noise.