Using conditions file to set position of a stimuli (image or text)

I am trying to specify the position of where I would like to show my text stimuli using the conditions column. For my experiment the side that the image and text are placed are the conditions (two images, one image on the left and one on the right but the location switches depending on condition).

I tried putting the name of my column in my conditions file to set the x,y coordinates (0.5,0.0) or (-0.5, 0.0). But I am getting this error:

Traceback (most recent call last):
File “/Users/joywyckoff/Desktop/testconditions/regfitexp1_lastrun.py”, line 310, in
Optimal.setPos(LocationO)
File “/Applications/PsychoPy2 2.app/Contents/Resources/lib/python2.7/psychopy/visual/basevisual.py”, line 1319, in setPos
setAttribute(self, ‘pos’, val2array(newPos, False), log, operation)
File “/Applications/PsychoPy2 2.app/Contents/Resources/lib/python2.7/psychopy/tools/arraytools.py”, line 168, in val2array
value = numpy.array(value, float)
ValueError: could not convert string to float: (-0.5, 0.0)

I also tried to put ($mycolumnname, 0.0) in the builder but that didn’t work either.

I am probably making a silly mistake but would really appreciate any help I can get!

Hi,

There’s actually two issues here:

  1. You need to replace the parentheses with square brackets: e.g., [0.5,0.0] → this is what is currently causing the error message
  2. You also need to write $suboptimal → this will avoid the next error message :slight_smile:

Hope this helps.

Jan

1 Like