Fixations#
- class pypillometry.sim.Fixations(mean='300 ms', sd='100 ms', screen=None)[source]#
Bases:
SimStepGaze as a sequence of fixations at random places on the screen (the same for all eyes).
- Parameters:
mean (
str) – mean and standard deviation of the duration of the fixations (plain numbers are ms; at least 50 ms); default 300 and 100 mssd (
str) – mean and standard deviation of the duration of the fixations (plain numbers are ms; at least 50 ms); default 300 and 100 msscreen (
tuple|None) – width and height of the screen in pixels; default: the screen of the experimental setup of the simulation, or (1920, 1080)
Examples
The gaze position during three seconds:
>>> import pypillometry as pp >>> import matplotlib.pyplot as plt >>> d = pp.sim.Simulation("3 s", fs=200, seed=1).pupil().gaze().run() >>> fig, ax = plt.subplots(figsize=(8, 3), layout="constrained") >>> _ = ax.plot(d.tx / 1000, d["left_x"], label="x") >>> _ = ax.plot(d.tx / 1000, d["left_y"], label="y") >>> _ = ax.set(xlabel="time (sec)", ylabel="gaze (px)") >>> _ = ax.legend()
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"