Skip to content

Fixation, then stimulus

Show a fixation cross, then a single timed stimulus with a keyboard response.

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.

typestimFormatstim1ITIfixationpresTimekeyboardkey
test.jpgface_happy_01800ITI;401000e ie
test.jpgface_sad_01800ITI;401000e ii
test.jpgface_happy_02800ITI;401000e ie
test.jpgface_sad_02800ITI;401000e ii

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.

  • Jitter the fixation period with ITI set to 500_1200; the value is re-drawn every time the trial is presented.
  • Keep the cross on screen with the stimulus by adding the withStim token to fixation.
  • Add a deadline with responseWindow, for example 2000, so a missed trial records timeout instead of waiting forever.
  • Drop the size token from fixation to let the cross inherit the page text size.