Skip to content

trialTextPos

Experiments

trialTextPos controls the VERTICAL position of the trial text (the text set by trialText). It is read every time the text is shown, so one value per trial applies to all text phases of that trial. Use it to move the text below the stimuli, force it to the vertical center, or offset it by pixels from the center. There is no horizontal control (see Tips & gotchas).

Write below to put the text under the stimuli, center to put it in the vertical middle of the screen, or a number of pixels to offset it from that middle. Leave the cell blank and the text sits above the stimuli, which is also what any value the column does not recognize gives you.

A number is an offset from the vertical center: positive moves the text DOWN, negative UP, so -80 places it 80 px above the middle. below puts the text just under the lowest stimulus, with a small gap on image, video and survey trials and a larger one on the others. The gap and the numeric offset both scale with the participant’s screen-size calibration.

Above the stimuli means just above the topmost one, with the same spacing. On CFPT trials the text is placed relative to the CFPT display instead, on video trials it is lowered to the top of the video when that sits higher, and on audio trials, where there is nothing to measure, it falls back to the middle of the screen.

A two-part value such as 120_40 is read as the number alone; the second part does nothing (see Tips & gotchas).

ValueBehavior
empty (default), above, or any unrecognized stringAbove the stimuli block
number, e.g. 120, -80That many pixels from the vertical center; positive is below center, negative above
<number>_<anything>, e.g. 120_40Same as the number alone; the second value has no effect
belowBelow the lowest stimulus plus stim-type spacing
centerVertical center of the display area

Leave the cell blank, or leave the column out, and the text is placed above the stimuli.

The value is read again every time the text is shown, so the single value on a row applies to all of that trial’s text phases; there is nothing to validate and no error for an unusable value, it simply lands above the stimuli.

  • Applies to whatever trialText and trialTextOptions put on screen; every phase of the same trial uses the same position.
  • Texts shown between stimuli or between trials (the ISI, ITI and afterStim phases) are centered vertically, so a blank cell or above makes no difference to them. A number, a two-part value or below still applies.
  • below also pushes the response buttons down by the height of the text, so they clear it. Only the exact value below does that: a variant such as below_10 does not.
  • Numeric offsets and the below gap scale with the participant’s screen-size calibration, so the same value lands slightly differently on differently calibrated screens.
  1. Text under the images instead of above:
stim1stimFormattrialTexttrialTextPos
face1.jpgRate this facebelow
  1. Fixed offset 150 px below the vertical center (e.g. to clear a video):
stim1stimFormattrialTexttrialTextPos
clip1.mp4Watch carefully150
  1. Centered instruction on a text-only trial:
stim1trialTexttrialTextPostrialTextOptions
Take a short breakcenterallTrial
  • A two-part value only makes sense with a number in front. Something like below_x cannot be turned into a position, and the text simply stays wherever it was last placed. Prefer the plain forms.
  • 0 is a real value, not the same as a blank cell: it puts the text exactly on the vertical center.
  • center is vertical only; the text’s horizontal placement comes from the page styling and is not affected by this column.
  • below_10 is not below: the text is left wherever it was, as described above, and the response buttons are not moved down to make room either.

trialTextPos appears in these worked recipes:

  • Task switching: Alternate between two judgement tasks on the same stimuli in a controlled AABB pattern, so switch and repeat trials can be compared.