Adding instructions
So far, we just focused on the stimuli, random treatment order and response registration. Now we will add an instruction, so that subjects understand what the task is. An instruction is just another set of text pictures and screen locations to display:
First we define an additional feedback text
PICTURE Title T
Choice Reaction Time Task
PICTURE Inst1 T
You will see the words ‘left’ or ‘right’
Press the corresponding response key
X-key for right
Y-key for left
PICTURE Prompt T
Press a response key to start the task
Now, we need three screen positions for presenting the text. We will reuse the center, but add screen positions for title and prompt
POSITION Top P 0, -50
POSITION Bottom P 0, 40
Now, we are ready to define a trial which is displaying the instruction
TRIAL Instruct
SP Title Top
&SP Inst1 Center
&SP Prompt Bottom
WK ResKeys
Title, text, and prompt are combined into one single display by adding the ‘&’ to the ShowPicture (SP) trial commands. The WK trial command waits for a key press for the keys defined in ‘ResKeys’
Let’s now invest in some nicer text font to make the instruction appear in a larger font size:
FONT Big Arial 10 1 bold
FONT Std Arial 6
FONT Small Arial 4
Font size is defined in mm height. To activate the font we insert SetFont (SF) trial commands before the respective SP command
TRIAL Instruct
SF Big
SP Title Top
SF Std
&SP Inst1 Center
SF Small
&SP Prompt Bottom
WK ResKeys
SF Std
We end the trial with an SF command activating the ‘Std’ font so that our stimuli will be shown in 6mm font size
To present an instruction, we must add an RUNTRIAL command to the Session definition before the actual Block will be executed:
SesSION My First Experiment
RUNTRIAL Instruct ; Execute trial ‘instruct’
RUNBLOCK ChoiceRT 10 ; Execute block ‘ChoiceRT’ with 10 trials in random order
Trials execute with the RUNTRIAL command are not recorded and will not appear in the result file.
For the final script, we are replacing the text elements of the trial by variable arguments to be able to reuse this trial for multiple instruction pages.
FONT Big Arial 10 1 bold
FONT Std Arial 6
FONT Small Arial 4
PICTURE Title T
Choice Reaction Time Task
PICTURE Inst1 T
You will see the words ‘left’ or ‘right’
Press the corresponding response key
X-key for right
Y-key for left
PICTURE Start T
Press a response key to start the task
POSITION Top P 0,-50
POSITION Bottom P 0,40
POSITION Center P 0,0
KEY ResKeys
X M ; Define a Key Set consisting of’ ‘X and ‘M’
PICTURE Correct N
PICTURE Wrong N
PICTURE Late N
POSITION FBpos P
0,30
TRIAL Instruct
SF Big
SP ? Top
SF Std
&SP ? Center
SF Small
&SP ? Bottom
WK ResKeys
SF Std
PICTURE Left N
PICTURE Right N
TRIAL ShowWord
CS 2000 ; Clear Screen and wait for 1000 ms
RK ResKeys 3000 ; Activate Response Registration with MaxRt = 3000
SP ? Center 1 0 1 ; Show a variable Picture until response is done or end of MaxRt
FB ? ; Compare the response against the correct key
1:SP Wrong FBpos 1 1000 ; Show ‘Wrong’ for 1s if response is wrong
2:SP Correct FBpos 1 1000 ; Show ‘Correct’ for 1s if response is correct
3:SP Late FBpos 1 1000 ; Show ‘Late’ for 1s if response is correct
BLOCK ChoiceRT 2
1 ShowWord Left X ; Run Trial with ‘Left’ as the Picture and X as correct key
1 ShowWord Right M ; Run Trial with ‘Right’ as the Picture and M as correct key
SesSION My First Experiment
RUNTRIAL Instruct Title Inst1 Start ; Execute trial ‘instruct’ and insert the pictures as instructions
RUNBLOCK ChoiceRT 10 ; Execute block ‘ChoiceRT’ with 10 trials in random order
Copyright 2021 - BeriSoft Inc.
All rights reserved