Image position - randomly select position

256 views Asked by At

How to create a program in PsychoPy that will display an image, randomly on the left or right side of the screen, in builder view?

1

There are 1 answers

0
Michael MacAskill On

Assuming you want it random but balanced, then create a conditions file that looks like this:

x
-0.5
-0.5
0.5
0.5

With as many rows as there are trials. Connect it to the Loop dialog and set it to sample from the file in random order.

Then in the dialog box for your image stimulus, simply put this in its position field:

[x, 0]

Which will display the image randomly to the left or right but at a constant vertical position. The units in the conditions file need to match the units of the stimulus or window (e.g normalised units int this case, or pixels, cm, degrees, etc as required).