pathsim.blocks.noise module¶
- class pathsim.blocks.noise.WhiteNoise(spectral_density=1, sampling_rate=None)[source]¶
Bases:
BlockWhite noise source with uniform spectral density. Samples from distribution with ‘sampling_rate’ and holds noise values constant for time bins.
If no ‘sampling_rate’ (None) is specified, every simulation timestep gets a new noise value. This is the default setting.
- Parameters:
- reset()[source]¶
Reset the blocks inputs and outputs and also its internal solver, if the block has a solver instance.
- class pathsim.blocks.noise.PinkNoise(spectral_density=1, num_octaves=16, sampling_rate=None)[source]¶
Bases:
BlockPink noise (1/f) source using the Voss-McCartney algorithm.
Samples from distribution with ‘sampling_rate’ and generates noise with a power spectral density inversely proportional to frequency.
- Parameters:
- octaves_values¶
internal random numbers for octaves in the Voss-McCartney algorithm
- Type:
array[float]
- reset()[source]¶
Reset the blocks inputs and outputs and also its internal solver, if the block has a solver instance.