counterTrial
Experiments
counterTrial puts an on-screen trial counter of the form i/n (for example 3/20) on practice, test, and learn trials. Consecutive trials sharing the same non-empty counterTrial value and the same type form a segment; within a segment the display counts 1/n, 2/n… n/n where n is the segment length.
Use it when participants should see how far through a block of trials they are. It has no effect on trial selection, ordering, or scoring.
Syntax
Section titled “Syntax”Put the same value, for example 1, in the counterTrial cell of every trial you want counted together, and leave the cell empty on trials that should show no counter. Those trials then display 1/n, 2/n up to n/n.
A run of neighbouring trials sharing one value is a single counted segment, and the counter restarts at 1 for each new segment. A segment ends when, in the order the participant sees the trials:
- the value changes to a different value (so two segments can sit side by side with no empty row between them);
- the cell is left empty;
- or the value stays the same but
typechanges, for example frompracticetotest.
A segment still open at the end of the trial file closes on the last trial, unless that last trial is an instructions screen.
Options
Section titled “Options”| Value | Effect |
|---|---|
| empty cell (or column absent) | Trial excluded from counting; no i/n label |
any other value (e.g. 1, block1, a) | Trial counted; the value only marks which trials belong together, and is never displayed or read as a number |
The first number is always the position within the segment and the second the segment length. The value in the cell is never used as a starting number.
Defaults & missing values
Section titled “Defaults & missing values”If the column is absent, or every cell in it is left empty, no counters are shown anywhere.
Empty cells inside an otherwise counted file simply split segments: the trial itself shows no counter, and the counter restarts at 1/... on the next trial that has a value.
Works with
Section titled “Works with”type: the counter is only ever shown onpractice,testandlearntrials, and a change of type splits a segment even when the value stays the same.subjectGroup: segments are built from the trials this participant actually gets, so a counter never counts trials another group is seeing.counterPart: the companionPart i of nlabel for instructions screens. The two are worked out independently.randomPick: unsupported in combination withcounterTrial, see Tips & gotchas.
Examples
Section titled “Examples”Counter over a test block, none during practice:
| type | counterTrial | target |
|---|---|---|
| practice | p1.png | |
| practice | p2.png | |
| test | 1 | t1.png |
| test | 1 | t2.png |
| test | 1 | t3.png |
type,counterTrial,target practice,,p1.png practice,,p2.png test,1,t1.png test,1,t2.png test,1,t3.png
The practice trials show no counter; the test trials show 1/3, 2/3, 3/3.
Two counted blocks separated by a value change (no empty gap needed):
| type | counterTrial | target |
|---|---|---|
| test | A | x1.png |
| test | A | x2.png |
| test | B | y1.png |
| test | B | y2.png |
| test | B | y3.png |
type,counterTrial,target test,A,x1.png test,A,x2.png test,B,y1.png test,B,y2.png test,B,y3.png
Displays 1/2, 2/2, then 1/3, 2/3, 3/3. The tokens A/B themselves never appear on screen.
Counter restart via type change with a constant value:
| type | counterTrial |
|---|---|
| practice | 1 |
| practice | 1 |
| test | 1 |
| test | 1 |
type,counterTrial practice,1 practice,1 test,1 test,1
Practice shows 1/2, 2/2; test restarts at 1/2, 2/2 (split by the type change).
Tips & gotchas
Section titled “Tips & gotchas”- The value in the cell is never shown to the participant and never read as a number. It is a label that groups trials together, not a counter value you set, so you cannot use it to start a block at
5/20. - Writing
1on every trial of the file does not give you one long counter: any change oftypestill starts a new count. - If the only trials carrying a value are ones this participant never gets (for example because
subjectGroupremoved them), no counters appear, which is harmless.