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 2.

Figure 2.

An example task written with the scene framework. This is a working example that is executable in ML2. A video clip of this task and the complete task files are available at NIMH MonkeyLogic website. A. The fixation timer task. The total duration of fixation is indicated by the annulus-shaped counters that continuously change over time. The counter stops when the fixation is broken but resumes if the fixation is re-acquired within 4 s. B. The script for the fixation timer task. Three adapters are used and combined into a chain. Each adapter can be manipulated by changing its properties. The chain is executed via create_scene() and run_scene(). C. The cycle during run_scene(). Each adapter has two member functions: analyze() and draw(). run_scene() calls analyze() and draw() of the top-most adapter, the adapter given as an input argument to create_scene(), which triggers the iteration of all linked adapters. run_scene() repeats this cycle until analyze() of the top-most adapter returns false.