User`s guide
E-Prime User’s Guide
Chapter 3: Critical Timing
Page 120
You may download TimingParadigm5 from the PST website (www.pstnet.com) for an example of
how an image cache may be created. This experiment uses script to compute and log some of
the timing variables and to manipulate the target onset times for each stimulus using the
SetNextTargetOnsetTime command in E-Basic. Using script allows inspection of timing variables
as the experiment is progressing, as well as the calculation and logging of timing data that is not
saved by E-Prime by default (e.g., the disk read time is not normally logged in E-Prime).
3.4.3 Step 3. Cache stimulus files being loaded from
disk to minimize read times
If the experiment is presenting stimuli at a high rate, it may be necessary to read the stimuli into
memory for quick access. This often becomes a necessity when presentation times are below
100ms duration, or when presenting complex graphics or reading images from the disk. As
illustrated by Timing Paradigm 5 above, with the proper computer configuration, E-Prime can
often present a new stimulus as fast as a single refresh cycle (640x480 resolution, 60Hz refresh
rate). Loading stimuli into memory is referred to as caching the stimuli, and can occur for visual
displays and sound files. For example, if you need to present a quickly changing stimulus, by
putting the sequence of images into the display cache you can change a stimulus within a single
refresh. Similarly, you might cache the auditory wave files of spoken letters of the alphabet so
the computer can speak any letter with no disk access delay. Caching of stimuli also greatly
reduces the amount of memory allocation that occurs as stimuli are generated. Since memory
allocation is the major source of the operating system taking cycles in order to perform virtual
memory management, caching can help to reduce operating system related timing delays.
3.4.4 Step 4. Test and check the timing data of the
paradigm
As described above, obtaining precise timing of computer displays is a complex process when
pushing the envelope to present very complex stimuli at fast rates. Since experiments often
present stimuli at rates beyond the speed with which humans can process stimuli, you must
collect and output timing data in a form that can be easily interpreted via post processing. You
want to be able to look at data and easily verify that the timing is precise. Whether the error is
due to user miscoding of the intended method, computer hardware bugs, non-optimal machine
configuration, or network traffic, you want to be able to know about the errors before sending the
data for publication. It is important to take a few minutes to analyze the timing data for the
experiment. This should be done during both the pilot testing and full analysis phases of the
research.
If an experiment involves precise timing, always run time audit analyses before submitting
data. Remember, many factors influence high performance stimulus presentation (e.g., video
card, machine speed, the amount of physical memory available, display settings, disk I/O, virtual
memory management, etc.). In most modest display situations (durations > 100ms), E-Prime will
accurately present the stimulus precisely, independent of configuration, as long as the
presentations are specified with respect to the refresh rate of the video card that will be used to
collect the data. E-Prime uses Time Audit facilities to log and report timing data and errors, and
those results can be displayed in a quantitative and/or graphical manner.
In Figure 26, the white line indicates the stimulus onset delay. As long as that is below the
expected duration of a single refresh, the display occurred on time. This was the case for
examples in the previous section reading images from disk up to the rate of one image every
24ms, at which point the image delay increased, typically from 6 to 17ms (at image 845) and to
30ms (at image 945). In contrast, when reading images from the cache, the delay was always