Skip to main content
. Author manuscript; available in PMC: 2020 Jul 15.
Published in final edited form as: J Neurosci Methods. 2019 May 6;323:13–21. doi: 10.1016/j.jneumeth.2019.05.002

Figure 1.

Figure 1.

Detection of eye fixation in the previous scripting method and the scene framework. A. In the previous scripting method, the stimulus (fixation point) is turned on and off by toggleobject() and the target behavior (eye fixation) is monitored by eyejoytrack(). During eyejoytrack(), behavior samples are checked every millisecond. eyejoytrack() ends as soon as the fixation is detected, but the fixation point may not be turned off until the end of the next frame. B. In the scene framework, the presentation of the fixation point and the detection of eye fixation are processed in parallel by run_scene(). run_scene() repeats a cycle of analyzing behavior samples, drawing visual stimuli on a background buffer and presenting the buffer every frame. All the samples collected during the previous frame are analyzed together at the beginning of each frame. Therefore, the occurrence of the fixation may not be known until the next frame, although the time of the fixation can still be calculated online accurately.