Having an issue with manipulating the quantity of dots. I believe the issue is referring to the lines of code below.
The error message l am currently getting is: ValueError: operands could not be broadcast together with shapes (20,) (5,)
Lines of code:
target = visual.DotStim(
win, nDots=(expInfo['refnDots']), dotSize=randrange(5.0, 10.0),
speed=0, dir=0.0, coherence=0.5,
fieldPos=(-8.0, 0.0), fieldSize=8.0,fieldShape='circle',
signalDots='same', noiseDots='position',dotLife=0,
color=[-1.000,-1.000,-1.000], colorSpace='rgb', opacity=1,
depth=-1.0)
for thisIncrement in staircase: # will continue the staircase until it terminates!
# set location of stimuli
targetSide= random.choice([-1,1]) # will be either +1(right) or -1(left)
foil.setFieldPos([-5*targetSide, 0]) # possibly be setSize
target.setFieldPos([5*targetSide, 0]) # in other location
# set dot quantity of probe
target.nDots=(expInfo['refnDots'] + thisIncrement) # change foil.setOri(expInfo['refOrientation'] + thisIncrement) also was origninally foil
# draw all stimuli
foil.draw()
target.draw()
fixation.draw()
win.flip()
Thanks