Brownian Noise (Random Walk, Red Noise)

New in version 0.4.

This function generates Brownian noise series. The noise is produced by integration of white noise (gaussian or uniform).

This function uses numpy.random.normal and numpy.random.uniform

Example Usage

The following example produce 1000 samples of brownian noise starting in value 10 (start=10). The noise is produced by integration of white gaussian noise (source=”gaussian”) with standard deviation of 1 (std=1). To keep in noise in some reasonable range, it is used 10% leaky integration (leak=0.1).

import signalz
x = signalz.brownian_noise(1000, leak=0.1, start=10, std=1, source="gaussian")

Function Documentation

signalz.generators.brownian_noise.brownian_noise(n, leak=0.0, start=0, std=1.0, source='gaussian')[source]

This function produces Browninan noise.

Args:

  • n - length of the output data (int) - how many samples will be on output

Kwargs:

  • leak - leakage during integration (float), this should prevent signal from wander off. Possible value is 0 <= leak < 1
  • start - offset on the start (float)
  • std - standard deviation of source white noise (float), in case of uniform distribution it is the difference between min and max value.
  • source - distribution of source white noise (str). Options are gaussian or uniform

Returns:

  • vector of values representing the noise (1d array)