Duration time presentation stimuli
Hello !
I have prepare a Stroop modified task. I wish to reccord reaction time of participants. When the stimulus appears on the screen, participant have to choose between 4 keys on the keypad. Open Sesame reccords correct responses and reaction time.
My problem is that in the keyboard-response, the duration is "keypress". That means the stimulus disappear after the participant gives is answer. So, the presentation time of each stimuli change according the reaction time.
What I want is to have the same presentation time for each stimuli (1000ms).
Here is my code :
Sketchpad :
set duration 0
set description "Displays stimuli"
draw textline center=1 color="[Color_word]" font_bold=yes font_family=mono font_italic=no font_size=32 html=yes show_if=always text="[Word]" x=0 y=0 z_index=0
Keyboard_response :
set timeout 3000
set flush "yes"
set duration "keypress"
set description "Collects keyboard responses"
set correct_response "[Correct_response]"
set allowed_responses "q;s;l;m"
I tried to set duration in keyboard response as "1000" ms but it crashes (the task doesn't run).
Can somebody help me with this error ?
Thank you very much !
Céline
Comments
Hi Céline,
This sounds like a situation for the coroutines plug-in, which is described here (and needs to be installed separately):
Essentially, you want to do two things simultaneously:
In the coroutines plug-in, this would look as follows:
Does that make sense?
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
I had a similar problem and used your solution:
instead of a "sequence" I added a "coroutine" but now I always get an error message!
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item.py", line 235, in getattr
raise AttributeError(u'%s not found' % var)
AttributeError: canvas not found
I really don't get the problem. What did I do wrong?
Thanks in advance
@vvogel Until recently there was a bug with
feedbackitems within acoroutines. So that's what you're running into. I would either:sketchpaditems instead offeedbackitems; orCheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
I have a problem related to the topic here. I also want to present visual stimuli for a certain time and at the same time capture the reaction time measured by a keypress. I already tried to use Corountines, but in the files only the duration of the keypress itself appears, I guess, because it is always around 0.5-0.7 ms. So how is it possible to capture the time between the start of the stimulus presentation and the following keypress?
Thank you!
Anna
Hi @Anna_Schellhorn ,
The
response_timealways reflects the interval between the start of thekeyboard_responseand the moment that a key was actually pressed. If you're using acoroutinesitem, this means that the start time of thekeyboard_response(in thecoroutines) should coincide with the start time of thesketchpad(in thecoroutines) that contains the stimulus. Does that clear things up?— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
thank you for your answer. So, the response time reflects the interval between the start time of the visual stimuli and the actual keypress and so, if i pressed the key always after approximately 5 seconds the response_time should display something around 5000ms, but in the excel file the response_time_keyboard_response displays values around 0.5(ms) and I don't understand why that is. Could you comment on that again?
Thanks again,
Anna
Hi @Anna_Schellhorn ,
Without knowing the details of how you implemented the experiment, this is impossible to say. Could you attach the experiment file here?
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
of course. Attached you should find the Example experiment file.
Anna
Hi Sebastiaan,
sorry, apparently it didn't work to attach the open sesame file. Attached you can find now some screenshots, which should demonstrate the implemented experiment.
@Anna_Schellhorn The start and the end time of the
keyboard_responseare both set to 0. So this means that key presses are only polled once, at the very start of thecoroutines. If you to poll continuously, then you have to set the end time to 9995 (in your case, i.e. the duration of thecoroutines). Does that clear things up?Check out SigmundAI.eu for our OpenSesame AI assistant!