Affective Stop Signal Task
in OpenSesame
Hello !
I am doing experiments for my thesis and I am quite stuck ! I am trying hard to understand and do it well but even after read 653 posts on forum and seen 76 video about opensesame and python (thank you so much for all of these really helpfull material!) I am still struggling.
So, I am doing an Affective Stop Signal Task; affective because we have pictures with faces (fear or neutral) and participant have to respond if the person on the picture is a women or a man.
But my problems are :
- Jittered fixation dot : 1200 - 1500 : I have been trying with the advanced_delay but before every Stop signal, the fixation dot stay longer than in target.
- I tried the adaptive procedure that prolongs the stop_signal delay SSD (seen on the forum, +50ms if success, -50ms if unsuccess) but not sure it works.
- I have some trouble to adapt the size of the images, like it is really bigger than the frame, so how to do that ?
- I wrote every tries, one by one so there are 320 tries (!!) I am sure there is a solution to have less lines. My variables : GO; Stop_signal // fear, neutral // images (with 120 go fear, 120 go neutral, 40 stop fear, 40 stop neutral) // correct_response : f;h.
Hopefully it makes sense.
Thank you again for all your tutorial!
Priscillia.
Comments
Hi @Prisc,
It sounds like you're having trouble with a number of independent issues. Could you upload the actual task to the forum (not the script as a PDF)? It'd be easier for someone to take a look.
from your description, it sounds as if you've created every trial manually instead of using a loop. Any specific reason for this?
Best,
Fabrice.
Hi @Fab
thank you for your prompt response!
I can't uploadthe task, it is too big. How can i do ?
Yes I am having trouble with a number of independent issues.
The reason for created every trial manually was because the only guy I could reach to helped me, told me to do that. I am sure 100% that loop is possible : I thought about doing a loop with the go_signal (fear and neutral) an other loop with the stop_signal (fear and neutral) and these two loops on a big one. Something like this. To repeat them, for the first part, 60 times the go loop, and 20 times the stop loop. Break 1 min. An other similar loop. To have 160 tries on each part (total 320 tries).
@Fab !
I removed the images so you can take a look on the task.
I have two tasks in fact...
I have the python script for Matlab for both of them.
https://osf.io/hdm4a : here the script for my first task (affective Stop Signal Task) I already told you about.
https://osf.io/f3v5j : here the script for my second task (affective Delay Discounting Task)
I am working on having the Matlab script in a python one...
@Fab
Hi @Prisc,
Not sure what the Matlab scripts are for. Are you programming your tasks in Open Sesame or in Matlab?
I can't try running your stop signal task as the pictures are missing, but a first sight, there is at least one thing that caught my eye. You calculate the SSD duration based on whether the response is correct or not... before the response has actually been registered in that trial. My guess is that the code therefore always considers the response to be incorrect (the response can never be correct if it has not be recorded yet).
As for the size of the pictures., you should also check the experiment's screen resolution. I noticed that you set it to 480 x 720, which is tiny. Most monitors today work with a 1920 x 1080 resolution. make sure that your pictures' size is inferior to the resolution you set for your experiment, otherwise you won't see the full picture on the screen. If your pictures a re enormous, you should consider editing them to a smaller resolution (alternatively, you can play with the scale property of the image object on your slide, by going to the slide's script, by reducing it, but note that this does not change the actual file size of the image, just how large it looks on the screen).
One more piece of advice: output markers or the variables' content to the console and run your task in window mode. That way you can monitor in the console how the task is unrevealing. It can be very useful to debug problems (e.g., wrote to the console the SSD value and whether the response is correct or not inside your stop_signal_coroutine will help you see whether the task is doing what it is supposed to do. If it is not).
Best,
Fabrice.
Hi @Fab
the MATLAB scripts are from the study where I found the tasks. They did on MATLAB and I want to do on OpenSesame (python).
Concerning experiment's screen resolution : I changed it before to send it to you, thinking it would help to decrease the size of the script. I obviously did the change after.
I am not sure to understand this : "output markers or the variables' content to the console and run your task in window mode." can you be more explicit ?
How could I have less lines , like if there is a solution to have less variables (for my 320 pictures)?
thank you
Priscillia
Hi @Prisc,
Printing to the console can be done in Python from an
inline_script
object or in Javascript from aninline_javascript
object.By default, the console is visible in the lower part of OS:
If it is not visible on your screen, go to View -> Show console, or press CTRL+D.
If you run your task in a browser, the console is available from your browser (in Chrome, press CTRL+SHIFT+i).
The console is often very useful in case of errors, because it displays information that can help you track the origin of the problem.
It is also very useful to help yo track the state of your variables as the task runs. For example, the following code in Python would print the content of the response variable:
The equivalent in Javascript would be:
Regarding screen resolution, the length of the script has not relation with the resolution of the screen.
I'm not sure what you are referring to regarding the 320 variables. You don't have 320 variables, you have 320 trials in a loop. I'm not sure why you'd want to reduce it. If your task requires these 320 trials, there is no reason to reduce it. If you wanted to implement another method of presenting these 320 trials, you could use a reduced number of rows four rows (3 for PEUR-GO, 1 for PEUR-STOP, 3 for NEUTRE-GO and 1 for NEUTRE-STOP trials), set the loop's number of cycles to 40, and then introduce code to implement a counter for each condition and set the image filenames dynamically (since you're using picture filenames that only very in number suffix). The result would be the same as what you're planning to use now, though, so I'm not sure you'd gain anything by it.
Best,
Fabrice.
Thank you @fab for your time.
I will keep doing what I can.