[solved] Displaying/Recording Responses at the same time as pictures
Hiya
I've been looking through the forum and discussions and haven't managed to find a thread that relates to my difficulty yet (may have just missed it).
The experiment that I would like to run displays a picture then the participant has to choose which emotion they are feeling. Ideally I would like the participant to see the picture and options (emotions) at the same time. Then either through touch response or via mouse click for them to choose the appropriate emotion. How do I do this? I've managed to upload all the pictures (and then run fine) and then tried to put in multiple choice response but don't know how to put them together.
I'm new to opensesame so if there is a tutorial that would be amazing.
Hope I've made sense
Best wishes
Ollie
Comments
Hi Ollie,
It sounds like you would be best off using a custom form:
For example, the script below, which should be placed in a
form_baseplug-in item, presents a picture and three clickable checkboxes. The picture is taken from a file in the file pool, defined by the variablepicture. The response is stored in the variableemotion.This is one way to collect responses, but you could also use buttons, buttons with images (a smiley face for happy, etc.), or a rating scale. All of this is explained on the page linked to above.
Hope this helps!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
Thanks very much that looks really helpful.
Will let you know how i get on.
Best wishes
Ollie
Hi again,
How do you change the size of the picture at the moment its really small (i'm using the python code version).
I tried form.set_widget(image, (0,2),colspan=4) thinking that it would span the 4 columns but this was not the case,
then tried image.set_rect(rect) but that also did not work.
I'm sure its relatively simple.
Also I was wondering whether you have to create a new script for each new photo or whether you can code it so that it randomises it from the file pool somehow?
Best wishes
Ollie
Hi Ollie,
The size of the picture is adapted to fit the cell it's placed in. Because you only changed the column span but not the row span, the size of the picture didn't change. Does changing the row span as well solve your problem?
Sure! You can retrieve all trial information from your block loop in an inline_script item by using the built-in experiment function self.get(). For example:
For more information, see:
Eventually, your inline code should probably look something like this:
Does this help?
Best,
Lotje
Did you like my answer? Feel free to

Hi Lotje,
That's really helpful thank you very much.
Best wishes
Ollie
Hello,
I am having trouble recording responses.
I have created a inline script experiment that asks what emotion the person is showing and how much they empathise with that person however:
I need the experiment to record response and target response, which if I choose just those variables it doesn't record, however if I choose record all it records all the responses but not the target response (and creates a very messy table) any suggestions?
Best wishes
Ollie
Hi Ollie,
Could you be a bit more specific? How exactly are you collecting responses, which variables do you want to log and which variables are missing?
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
Thanks for the reply,
I've created a multiple choice form (with yours guys help) where the participant clicks on the emotion that they think matches the picture.
what I would ideally like is the experiment to record the response (emotion chosen) and what emotion they should have chosen (target emotion).
Is there a way to send you the expt so you guys could look over it?
This is what the inline script looks like at the moment:
There is also a rating of emotion:
Hope that helps
Ollie
Looking at your scripts, I think the problem is simply that you have not used
exp.set()to make the variableResponseavailable elsewhere in the experiment, such as in theloggeritem.Basically, you can set the form response as the experimental variable
my_form_responselike this:Practically speaking, this will give you a column in your logfile that is called
my_form_responseand contains the text on the clicked button. Of course, you will need to use different variable names for the two forms, otherwise they will overwrite each other.Does that clear things up?
You can upload your experiment through one of the services listed above the reply box.
Cheers!
Check out SigmundAI.eu for our OpenSesame AI assistant!
still wont work for me
Have you tried turning it off and on again?
But seriously, you will need to be a bit more specific about 1) what you want, 2) what you did, and 3) what went wrong specifically (preferably accompanied by an error message). By simply telling us it doesn't work for you, we don't have a clue about where to start troubleshooting!
nvm edwin i figured it out .. xoxo thanks