I am trying to build an experiment in Psychopy that is called decentering/centering task. Participants see a face and have the task to move the eyes with the help of a scale/slider (whatever works). We got pictures for many angles in 1° steps (e.g. they are called A-20.jpg, A-15.jpg, A-05.jpg, A0.jpg, A17.jpg; Number indicates the angle the eyes are moved). in the centering task, they start with a person looking to the right or left (20°). Participants are using a slider to move the person’s eyes to that point where they have the impression the face is looking at them (let’s say 10°). So with every step they are moving the slider, the picture should change to the specific picture (slider value: -8°, picture to be shown: A-08.jpg s. In the other task, it starts in the center (0°) and it is the other way around.
I watched many youtube-videos and tried to figure out a way to realize that task in Psychopy, I Tried it with this code (each Frame):
“if Angle == -20:
Pic = ‘A-20.jpg’
elif Angle == -19:
Pic = ‘A-19.jpg’
elif Angle == -18:
Pic = ‘A-18.jpg’
elif Angle == -17:
Pic = ‘A-17.jpg’
Scale ist called “Angle” and the Image to be shown is defined as “Pic”
Do any of you have an idea what could be wrong with this code or how I could get this thing running? I would be so thankful for any idea you have!
I am using the builder view on a window 10 computer