Post by clau on Feb 8, 2021 9:44:53 GMT
Hey all
I am new to Psytoolkit and in the coding world. I am trying to code a fixed ISI (inter-stimulus interval) for my Serial Reaction Time Task in Psytoolkit.
Here my problem:
I want to create a Serial Reaction Time Task, where the Interstimulus interval (ISI) is fixed (500 ms) at each trial, while the response-stimulus interval (RSI) will change based on when the participants will answer to the stimulus presentation.
I need to record the participants' answers during the fixed ISI.
I tried to code the fixed ISI:
- here I tried to use many different readkey (like has been suggested in a post on the forum). However, if my answer is faster than 500 ms (and our hypothesis is that the RTs will be faster and faster after each trial) the stimulus disappears before 500 ms.
task training
table familiarization
keys t y g h
show bitmap p0
delay 100
show bitmap @1 @2 @3
readkey @4 100
clear -1
set $tmprt RT
set $total_rt RT
set $final_rt RT
set $tem_status STATUS
set $tem_status2 STATUS
if STATUS == TIMEOUT
readkey @4 200
clear -1
set $total_rt expression RT + $tmprt
fi
if STATUS == TIMEOUT
readkey @4 200
clear -1
set $final_rt expression RT + $total_rt
fi
save BLOCKNAME @1 @4 KEY $final_rt STATUS
- In this example, the RTs do not seem to be reliable.
task learning
table learning
keys t y g h
set &my_delay 500
show bitmap p0
timestamp begintime
timestamp now
set $remaining_time &my_delay
set $d timestamp-diff begintime now
while $d < &my_delay
show bitmap @1 @2 @3
readkey @4 $remaining_time
timestamp now
set $remaining_time expression &my_delay - $d
set $d timestamp-diff begintime now
save "RT = " RT "d = " $d " ; remaining_time = " $remaining_time
while-end
save BLOCKNAME @4 KEY STATUS RT
Someone can help? I would really appreciate any help
I am new to Psytoolkit and in the coding world. I am trying to code a fixed ISI (inter-stimulus interval) for my Serial Reaction Time Task in Psytoolkit.
Here my problem:
I want to create a Serial Reaction Time Task, where the Interstimulus interval (ISI) is fixed (500 ms) at each trial, while the response-stimulus interval (RSI) will change based on when the participants will answer to the stimulus presentation.
I need to record the participants' answers during the fixed ISI.
I tried to code the fixed ISI:
- here I tried to use many different readkey (like has been suggested in a post on the forum). However, if my answer is faster than 500 ms (and our hypothesis is that the RTs will be faster and faster after each trial) the stimulus disappears before 500 ms.
task training
table familiarization
keys t y g h
show bitmap p0
delay 100
show bitmap @1 @2 @3
readkey @4 100
clear -1
set $tmprt RT
set $total_rt RT
set $final_rt RT
set $tem_status STATUS
set $tem_status2 STATUS
if STATUS == TIMEOUT
readkey @4 200
clear -1
set $total_rt expression RT + $tmprt
fi
if STATUS == TIMEOUT
readkey @4 200
clear -1
set $final_rt expression RT + $total_rt
fi
save BLOCKNAME @1 @4 KEY $final_rt STATUS
- In this example, the RTs do not seem to be reliable.
task learning
table learning
keys t y g h
set &my_delay 500
show bitmap p0
timestamp begintime
timestamp now
set $remaining_time &my_delay
set $d timestamp-diff begintime now
while $d < &my_delay
show bitmap @1 @2 @3
readkey @4 $remaining_time
timestamp now
set $remaining_time expression &my_delay - $d
set $d timestamp-diff begintime now
save "RT = " RT "d = " $d " ; remaining_time = " $remaining_time
while-end
save BLOCKNAME @4 KEY STATUS RT
Someone can help? I would really appreciate any help