Images rotation

Hi everyone.

In my experiment I have two images: one displayed to the left (-0.4) and one to the right (0.4) of the screen.
I want them to have the same OR different orientation (45,90,135 degrees ect) in a randomized way.

I have an excel file with multiple columns. In the 1 I’ve specified the name of the left stimuli.png, in the 2 I’ve specified the name of the right stimuli.png and then I have other two columns (one for the left and one for the right image) that specify the rotation degree. In the “layout” properties I’ve set the orientation on “set every repeat” but the stimuli have randomized orientation between trials BUT always the same orientation between them within each trial.

How can I fix this problem? Anyone can help?



Would you like to have the same conditions across participants?
If not, you can randomize it completely.

For example:

# Begin Experiment
orientation_array = [0, 45, 90, 135, 180, 225, 270, 315]
img_right_orientation = 0
img_left_orientation = 0

# Begin Routine

img_right_orientation = orientation_array[0]
img_left_orientation = orientation_array[1]
# or
img_right_orientation, img_left_orientation = orientation_array[:2]

Then, set the orientation of the left image to orientation_array[0] and the right image to orientation_array[1]. Set it to every repeat as you already did.

Let me know if it helps,

If you don’t have any experience with code components and you can’t understand my suggestion, please share your experiment files :slight_smile:


Hi Chen,

Thanks a lot for your kind reply.

You solved the problem!

Have a good day


1 Like

Happy to help!

Have a nice day as well,