Simulated data: pp.sim#
Simulated recordings with their ground truth: a Simulation is
built by chaining steps, Simulation.run() returns a
SimEyeData object. See Simulated data for an
introduction and Simulated data for examples.
Recipe of a simulated recording. |
|
Simulated eye-tracking data together with the ground truth (made by |
|
Plotting methods of a |
Tasks and events#
Design of an experiment: blocks of trials with stimuli and responses. |
Distribution of times from its specification. |
Ready-made tasks: pp.sim.tasks#
Psychomotor vigilance task: a visual target at random intervals, which stays until the response. |
|
Sustained attention to response task: digits followed by a mask; press for every digit except 3 (no-go). |
|
Finger-tapping random-sequence generation task: tap with the left or right finger in synchrony with a beep, in a random sequence, with thought probes at random intervals. |
|
n-back task: a letter every soa; respond to every letter with "match" (same letter as level letters before) or "nomatch". |
Steps#
The steps run in a fixed order of stages: events of the task, latent pupil size (log-%), gaze, foreshortening, units of the tracker, blinks (occlusion), noise, losses of the tracker and comb artifacts (missing samples).
Latent pupil size from the timescale model (see |
|
Gaze as a sequence of fixations at random places on the screen (the same for all eyes). |
|
Pupil foreshortening: the camera sees the pupil at the angle \(\alpha\) between the directions from the eye to the camera and to the gaze position, so that the measured size is \(A_0 \cos\alpha\). |
|
Units of the tracker: the pupil is \(\text{median} \cdot e^{y / 100}\) for the signal \(y\) in log-%. |
|
Blinks: the lid covers the pupil, which the tracker loses while the covered fraction is above visibility. |
|
White measurement noise on the pupil. |
|
Losses of the pupil by the tracker: stretches of missing samples at random times, without a transient. |
|
Comb artifacts: bursts of teeth, short dropouts of the pupil with a too-small value on each side, or short drops without missing samples, so that the signal looks like a comb. |
Occluded fraction of the pupil during a blink (0: open, 1: covered). |
|
Rate of events per ms from |
From a fitted model#
The fitted model as steps of a simulation (see |
|
Simulate a new recording from the fitted model. |