WhiteNoise#
- class pypillometry.sim.WhiteNoise(sd=0.2, scale='log%', eyes=None)[source]#
Bases:
SimStepWhite measurement noise on the pupil.
- Parameters:
Examples
Two seconds with noise of 0.5 log-%:
>>> import pypillometry as pp >>> import matplotlib.pyplot as plt >>> d = pp.sim.Simulation("2 s", fs=500, seed=1, name="WhiteNoise").pupil().units(800).noise(0.5).run() >>> fig, ax = plt.subplots(figsize=(8, 3), layout="constrained") >>> ax = d.plot.plot_truth(ax=ax)
Methods
change the arrays of the running simulation run
the eyes of the simulation the step applies to
the step from
to_dict()the events and the duration (ms), for steps of stage
"events"name and parameters of the step (numbers, strings, lists, dicts)
Details
- generate(rng)#
the events and the duration (ms), for steps of stage
"events"