Units#

class pypillometry.sim.Units(median=1000.0)[source]#

Bases: SimStep

Units of the tracker: the pupil is \(\text{median} \cdot e^{y / 100}\) for the signal \(y\) in log-%.

Parameters:

median (float) – median pupil size in the units of the tracker (per eye with a dict); default 1000

Notes

Ground truth per eye: size (the true pupil size) and pupil (the pupil as measured without noise, i.e. with the foreshortening).

Methods

apply

change the arrays of the running simulation run

eyes_in

the eyes of the simulation the step applies to

from_dict

the step from to_dict()

generate

the events and the duration (ms), for steps of stage "events"

to_dict

name and parameters of the step (numbers, strings, lists, dicts)

Details

static from_dict(d)#

the step from to_dict()

Return type:

SimStep

apply(run, rng)[source]#

change the arrays of the running simulation run

Return type:

None

eyes_in(run)#

the eyes of the simulation the step applies to

Return type:

tuple[str, ...]

generate(rng)#

the events and the duration (ms), for steps of stage "events"

Return type:

tuple[dict[str, ndarray], float]

to_dict()#

name and parameters of the step (numbers, strings, lists, dicts)

Return type:

dict[str, Any]