Skip to content

presTime

Experiments

presTime sets how long stimuli stay on screen, in milliseconds. For image and word trials it sets how long each stimulus screen is shown. For instruction trials it auto-advances the screen. For CFPT trials it is repurposed as a countdown timer. Use it whenever a stimulus must disappear on its own instead of waiting for a response.

Put a single number in the cell, in milliseconds: presTime 1000 keeps the stimuli on screen for one second and then hides them.

For a trial with several screens, give one duration per screen, separated by semicolons. Each value can be:

  • a plain number of milliseconds, such as 500
  • min_max (for example 150_250), a random duration drawn once when the experiment loads, endpoints included
  • a|b|c (for example 200|400|800), one of the listed durations picked at random when the experiment loads
  • V*N (for example 150*3), the value V repeated for N screens

presTime never decides how many screens a trial has. On trials without a target, a valid stimScreens grouping decides that, otherwise ISI does. Durations beyond the number of screens are ignored.

Writing exactly one duration fewer than there are screens is the usual way to say “the last screen stays up until the participant responds”.

ValueBehavior
empty (or column absent)Stimuli are never hidden on a timer. They stay until the trial ends by response or responseWindow. EXCEPTION: when stimScreens builds two or more screens, an empty presTime becomes 1000 ms per screen, so every screen except the last hides after 1000 ms and only the last stays until response.
0On SEQUENTIAL trials nothing is timed and the screen stays up. On SINGLE-SCREEN trials the stimulus is hidden (or replaced by the mask) essentially immediately. Either way the column counts as “defined” for results recording.
positive integerScreen is hidden after that many ms. Values at or below half a frame (~8 ms at 60 Hz) hide immediately.
negative result (e.g. from min_max)Treated as 0.
non-numeric entryNot a number, so the entry is silently dropped from the list. There is no waitStimEnd value for presTime; that is a separate column.
Nf (frames notation)A value like 30f is read as the number 30, so it currently behaves as 30 ms and not as 30 frames. See Tips & gotchas.
list t1;t2;...Per-screen times, first value for screen 1 (with a target, screen 1 is the target screen).
V*NExpands to N copies of V, concatenated into the per-screen list.

Leave the cell empty, or leave the column out, and nothing is hidden on a timer: the stimuli stay on screen until the participant responds or the trial’s responseWindow closes.

The exception is a trial whose screens come from stimScreens. There, an empty presTime gives every screen except the last 1000 ms, and only the last screen waits for a response. An empty ISI on the same trial likewise gives 500 ms gaps.

In the results, presTime_ms, presTime_f and presTime_fDuration are filled in only for test trials that have a presTime value, and left empty otherwise.

  • ISI: creates the extra screens when stimScreens does not, and presTime then applies per screen. Every screen except the last needs a positive presTime, otherwise the sequence stops there and the remaining screens are never shown.
  • stimScreens: on trials without a target, a valid stimScreens grouping decides the screen count instead of ISI, and the presTime values then apply one per stimScreens screen. With stimScreens screens and an empty presTime, the 1000 ms per-screen default described above kicks in. On a trial with a target the stimScreens counts are ignored.
  • presTime2 and presTimeS2: legacy columns that override the second screen’s time, see their pages.
  • target: with a target, the target has the first screen to itself and the first presTime value times it.
  • mask: single-screen image trials with a mask show the mask after presTime instead of just hiding. In sequential trials the mask appears during the ISI gap.
  • type=learn: after presTime the trial auto-advances.
  • type=instructions: only a plain integer works there; when positive the screen auto-advances after presTime plus ITI ms and, when no button1 or keyboard applies, the NEXT button is hidden.
  • test=CFPT: presTime divided by 1000 becomes the CFPT sorting countdown in seconds, and stimuli are not hidden on a timer.
  • responseWindow starting at lastStim: when the last screen’s presTime and the response window’s timeout are the same value, the screen is kept up for one extra frame so the window is not missed.
  • Audio and video stimuli: presTime does not limit media playback, which lasts as long as the media itself.
  • Results: the display time actually measured for each screen is saved as presTime_ms (semicolon-joined per screen), together with presTime_f (frame counts) and presTime_fDuration (mean frame duration). Only test trials record these, and feedback screens do not.
  1. Fixed 1 second display, then wait for a keypress:
typestimFormatstim1presTimekeyboardkey
test.jpgface011000f jf
  1. Two-screen sequence (needs ISI to create the second screen): stim1 for 200 ms, 100 ms blank, then stim2 for 500 ms:
typestimFormatstim1stim2presTimeISI
test.jpgprimeprobe200;500100
  1. Jittered display time between 150 and 250 ms, drawn once per trial row when the experiment loads:
typestimFormatstim1presTimekeyboardkey
test.jpgword150_250a la
  • Random values are drawn once when the experiment loads. Repeating the same trial row (through repeat, staircase or loops) reuses the same drawn duration, unlike ITI, which re-rolls on every presentation.
  • Frames notation is not in effect yet: a value like 30f currently behaves as 30 ms, not as 30 frames.
  • In a single-screen image trial with a mask, the mask is drawn on top of the stimulus rather than replacing it.
  • A responseWindow anchored on afterStim starts when the stimuli hide, so it never starts at all if presTime is empty, or if it is 0 on the last screen of a SEQUENTIAL trial. On a single-screen trial with presTime 0 it starts immediately, except on a single-screen trial with a mask, where an afterStim window never starts.
  • On a single-screen trial, a presTime cell that is filled in but holds no usable duration (for example abc, or plain 0) hides the stimulus immediately. Leave the cell empty instead when you want the stimulus to stay up.
  • presTime_ms in the results is the duration actually measured, not the value you wrote, and appears only for trials that have a presTime value.

presTime appears in these worked recipes:

  • Go/no-go task: Score a press as correct on go trials and a withheld response as correct on no-go trials.
  • Fixation, then stimulus: Show a fixation cross, then a single timed stimulus with a keyboard response.
  • Jittered RT task: Measure choice reaction times with an unpredictable interval before each stimulus.
  • Two-interval forced choice: Present two stimuli one after the other and ask which interval contained the target.
  • Masked priming: Flash a prime briefly, mask it, then time a choice response to a probe.