Fixation, then stimulus
Show a fixation cross, then a single timed stimulus with a keyboard response.
When to use it
Section titled “When to use it”Use this whenever gaze and attention should be settled at a known point before the stimulus appears, which is the default hygiene for most RT tasks with brief or precisely timed stimuli. The intuitive route of writing a duration into fixation fails silently: the number is read as a pixel size, not a time, so no cross ever appears. Pairing the period keyword with an ITI duration is the supported way to get a timed cross. If what you need before the stimulus is unpredictability rather than stability, jitter the interval as in the jittered RT recipe.
Trial file
Section titled “Trial file”| type | stimFormat | stim1 | ITI | fixation | presTime | keyboard | key |
|---|---|---|---|---|---|---|---|
| test | .jpg | face_happy_01 | 800 | ITI;40 | 1000 | e i | e |
| test | .jpg | face_sad_01 | 800 | ITI;40 | 1000 | e i | i |
| test | .jpg | face_happy_02 | 800 | ITI;40 | 1000 | e i | e |
| test | .jpg | face_sad_02 | 800 | ITI;40 | 1000 | e i | i |
type,stimFormat,stim1,ITI,fixation,presTime,keyboard,key test,.jpg,face_happy_01,800,ITI;40,1000,e i,e test,.jpg,face_sad_01,800,ITI;40,1000,e i,i test,.jpg,face_happy_02,800,ITI;40,1000,e i,e test,.jpg,face_sad_02,800,ITI;40,1000,e i,i
How it works
Section titled “How it works”The pre-stimulus fixation period is built from two columns doing separate jobs. fixation is a period selector, not a duration: the token ITI shows the built-in cross during the inter-trial interval, and the duration of that interval comes from the ITI column (800 ms here). Writing a number such as 500 into fixation does not give a 500 ms fixation; any token starting with digits is read as a size in pixels, and with no period keyword the cross never shows. The 40 after the semicolon in this file is exactly that: a 40 px size token riding along with the ITI keyword.
Two syntax rules from the fixation page matter: keyword tokens are case sensitive (iti is silently dropped) and tokens must not carry spaces (ITI; 40 loses the size). The cross hides the moment the stimulus appears, so the participant gets a clean 800 ms fixation followed by the face.
presTime then keeps each face up for exactly 1000 ms. Because responseWindow is not set, responses stay open after the stimulus is hidden, so slow participants are not cut off; keyboard collects E or I and key scores the emotion judgement.
Variations
Section titled “Variations”- Jitter the fixation period with
ITIset to500_1200; the value is re-drawn every time the trial is presented. - Keep the cross on screen with the stimulus by adding the
withStimtoken tofixation. - Add a deadline with
responseWindow, for example2000, so a missed trial recordstimeoutinstead of waiting forever. - Drop the size token from
fixationto let the cross inherit the page text size.