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.
Syntax
Section titled “Syntax”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 example150_250), a random duration drawn once when the experiment loads, endpoints includeda|b|c(for example200|400|800), one of the listed durations picked at random when the experiment loadsV*N(for example150*3), the valueVrepeated forNscreens
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”.
Options
Section titled “Options”| Value | Behavior |
|---|---|
| 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. |
0 | On 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 integer | Screen 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 entry | Not 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*N | Expands to N copies of V, concatenated into the per-screen list. |
Defaults & missing values
Section titled “Defaults & missing values”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.
Works with
Section titled “Works with”ISI: creates the extra screens whenstimScreensdoes not, andpresTimethen applies per screen. Every screen except the last needs a positivepresTime, otherwise the sequence stops there and the remaining screens are never shown.stimScreens: on trials without atarget, a validstimScreensgrouping decides the screen count instead ofISI, and thepresTimevalues then apply one perstimScreensscreen. WithstimScreensscreens and an emptypresTime, the 1000 ms per-screen default described above kicks in. On a trial with atargetthestimScreenscounts are ignored.presTime2andpresTimeS2: 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 firstpresTimevalue times it.mask: single-screen image trials with a mask show the mask afterpresTimeinstead of just hiding. In sequential trials the mask appears during theISIgap.type=learn: afterpresTimethe trial auto-advances.type=instructions: only a plain integer works there; when positive the screen auto-advances afterpresTimeplusITIms and, when nobutton1orkeyboardapplies, the NEXT button is hidden.test=CFPT:presTimedivided by 1000 becomes the CFPT sorting countdown in seconds, and stimuli are not hidden on a timer.responseWindowstarting atlastStim: when the last screen’spresTimeand 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:
presTimedoes 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 withpresTime_f(frame counts) andpresTime_fDuration(mean frame duration). Onlytesttrials record these, and feedback screens do not.
Examples
Section titled “Examples”- Fixed 1 second display, then wait for a keypress:
| type | stimFormat | stim1 | presTime | keyboard | key |
|---|---|---|---|---|---|
| test | .jpg | face01 | 1000 | f j | f |
type,stimFormat,stim1,presTime,keyboard,key test,.jpg,face01,1000,f j,f
- Two-screen sequence (needs ISI to create the second screen): stim1 for 200 ms, 100 ms blank, then stim2 for 500 ms:
| type | stimFormat | stim1 | stim2 | presTime | ISI |
|---|---|---|---|---|---|
| test | .jpg | prime | probe | 200;500 | 100 |
type,stimFormat,stim1,stim2,presTime,ISI test,.jpg,prime,probe,200;500,100
- Jittered display time between 150 and 250 ms, drawn once per trial row when the experiment loads:
| type | stimFormat | stim1 | presTime | keyboard | key |
|---|---|---|---|---|---|
| test | .jpg | word | 150_250 | a l | a |
type,stimFormat,stim1,presTime,keyboard,key test,.jpg,word,150_250,a l,a
Tips & gotchas
Section titled “Tips & gotchas”- Random values are drawn once when the experiment loads. Repeating the same trial row (through
repeat,staircaseor loops) reuses the same drawn duration, unlikeITI, which re-rolls on every presentation. - Frames notation is not in effect yet: a value like
30fcurrently 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
responseWindowanchored onafterStimstarts when the stimuli hide, so it never starts at all ifpresTimeis empty, or if it is0on the last screen of a SEQUENTIAL trial. On a single-screen trial withpresTime0it starts immediately, except on a single-screen trial with amask, where anafterStimwindow never starts. - On a single-screen trial, a
presTimecell that is filled in but holds no usable duration (for exampleabc, or plain0) hides the stimulus immediately. Leave the cell empty instead when you want the stimulus to stay up. presTime_msin the results is the duration actually measured, not the value you wrote, and appears only for trials that have apresTimevalue.
Common combinations
Section titled “Common combinations”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.