How to use
This is the main source code for the experiment. If you want to use it, you should copy the actual zip file to your own PsyToolkit account, because often there are other files included for stimuli.
The source code for ior
# every line starting with # is comment
options
bitmapdir stimuli # the folder that contains the stimuli bitmaps
escape
# the following section defines the bitmaps. the default format for
# bitmaps is "png" if you use png files, you do not need to use the
# extension.
bitmaps
cuesignal # this refers to the file cuesignal.png
gosignal
fixpoint1 # small
fixpoint2 # medium
fixpoint3 # large
box
instruction
afterwords
mistakefeedback
fonts
arial 20
# the table section contains 4 rows, one for each of the four
# conditions the stuff in quatation marks is human readable
# information, the program doesn't really need it.
table iortable
"cueleft targetleft cued 0" -200 -200 1
"cueleft targetright uncued 1" -200 200 2
"cueright targetleft uncued 1" 200 -200 1
"cueright targetright cued 0" 200 200 2
# the task describes exactly one trial. On each each trial, one of the
# rows of the cue table is chosen at random
task iortask
table iortable
keys a l
delay 500 # time between trials
show bitmap fixpoint1
show bitmap box -200 0
show bitmap box 200 0
delay 75
show bitmap fixpoint2
delay 75
show bitmap fixpoint3
delay 75
clear 4 5
show bitmap fixpoint2
delay 75
clear 6
show bitmap fixpoint1
delay 200
show bitmap cuesignal @2 0 # now show the cue
delay 200
clear -1
delay 800
show bitmap gosignal @3 0 # show target (go) 700 ms later
readkey @4 1500
clear -1
if STATUS != CORRECT
show bitmap mistakefeedback 0 200
delay 2000
clear -1
fi
save @1 RT STATUS # this saves the data to an output file
block iorblock
bitmap instruction
wait_for_key
tasklist
iortask 100 # do the task 100 times
end
bitmap afterwords
wait_for_key
feedback
set &RTcued mean c5 ; prefix "Cued conditions:" ; select c6 == 1 && c4 == 0
set &RTuncued mean c5 ; prefix "Uncued conditions:" ; select c6 == 1 && c4 == 1
set &IOReffect expression &RTcued - &RTuncued
text 0 0 "Response time (ms)"
text 0 50 &RTcued ; prefix "Cued conditions: " ; postfix " ms"
text 0 100 &RTuncued ; prefix "Uncued conditions:" ; postfix " ms"
text 0 150 &IOReffect ; prefix "IOR effect (cued - uncued):" ; postfix " ms"
text 0 250 "Press space bar to continue"
end