Skip to content

Two-interval forced choice

Present two stimuli one after the other and ask which interval contained the target.

Use a 2IFC design for detection or discrimination near threshold, where asking “which interval held the signal” sidesteps the response bias that yes/no judgements invite. Presenting the intervals in sequence also suits stimuli that cannot sensibly share a screen, such as two contrast levels of the same patch. Prefer a single-interval yes/no trial when session length matters more than bias, and a side-by-side layout when simultaneous comparison is the point.

typestimFormatstim1stim2presTimeISIkeyboardkey
test.pnggrating_lownoise_patch250;2505001 21
test.pngnoise_patchgrating_low250;2505001 22
test.pnggrating_midnoise_patch250;2505001 21
test.pngnoise_patchgrating_mid250;2505001 22
test.pnggrating_highnoise_patch250;2505001 21
test.pngnoise_patchgrating_high250;2505001 22

ISI is what turns one trial into two intervals: the single entry 500 puts stim1 on the first screen, inserts a 500 ms blank, and pushes stim2 onto the second screen. Without it, both images would share one screen.

presTime lists one duration per screen, so 250;250 gives two fixed 250 ms intervals. Both entries matter: with exactly one duration missing, the last screen falls back to staying up until the participant responds, which quietly destroys the fixed-length second interval. Avoid a trailing semicolon in ISI too; a trailing empty entry still counts as a break and silently drops the last stimulus.

keyboard set to 1 2 accepts the two digit keys, and digits match both the top row and the numpad. key names the interval that held the grating, so it is 1 on rows where stim1 is the signal and 2 on the swapped rows; the response is scored into the correct results column.

The response window is left at its default: it opens when the second screen appears and stays open after the grating is hidden, so the participant can answer at leisure once both intervals have played. Reaction time is counted from the moment the window opens, which here is second-interval onset.

  • Delay responses until the second interval has ended with responseWindow set to afterStim; the window then opens at interval 2 offset and RT is measured from there.
  • Fill the gap between intervals with a noise image via mask; the mask is shown during each ISI gap on sequential trials.
  • Randomise the gap with an ISI entry such as 400|600; the value is drawn once per row when the experiment loads, so put per-presentation jitter in ITI between trials instead.
  • Tag each row with condition1 labels such as the signal contrast, so the results file carries the level alongside the score.