noise_producer
frog.hardware.noise_producer
¤
Provides a class for producing random noise.
Classes¤
NoiseParameters(mean=0.0, standard_deviation=1.0, seed=42)
dataclass
¤
A compact way of expressing arguments to NoiseProducer.
NoiseProducer(mean=0.0, standard_deviation=1.0, type=float, seed=42)
¤
A callable object which produces normally distributed noise.
Create a new NoiseProducer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mean
|
float
|
The distribution's mean |
0.0
|
standard_deviation
|
float
|
The distribution's standard deviation |
1.0
|
type
|
type
|
The type of the returned value |
float
|
seed
|
int | None
|
Initial random seed (None for random) |
42
|
Source code in frog/hardware/noise_producer.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
Functions¤
__call__(*args, **kwargs)
¤
Return some noise.
Returns:
Type | Description |
---|---|
Any
|
A random number of the specified type. |
Source code in frog/hardware/noise_producer.py
34 35 36 37 38 39 40 |
|
from_parameters(parameters, type=float)
classmethod
¤
Create a NoiseProducer from a NoiseParameters object.
Source code in frog/hardware/noise_producer.py
42 43 44 45 46 47 |
|