The details in the paper are quite sparse but just to make sure: you probably don't want to draw 9 different Windows but rather 9 different stimuli within the same (full screen) window. So I'd do something like this:
import random
from psychopy import visual
win = visual.Window()
# Create 9 dotstims
stims = []
for xPos in range(-1, 2):
for yPos in range(-1, 2):
stims += [visual.DotStim(win, fieldPos=(xPos, yPos), fieldShape='circle', dotLife=30, speed=0.01, fieldSize = 0.2, nDots=50, dir=random.randint(0, 359))]
# Draw for 120 frames
for frame in range(120):
for stim in stims:
stim.draw()
win.flip()
You may want to change the dir
values to something more systematic than just random values as the above example and fieldPos
as well. Performance-wise this is a bit borderline on my laptop as the maximum duration of the draw
s are 11.5 ms. This is dangerously close to 16.667 ms but you can test it for yourself on your stimulus computer. Just put
from psychopy import core
timerClock = core.Clock()
in the beginning of the script and then have use the following to loop over frames:
for frame in range(120):
timerClock.reset()
for stim in stims:
stim.draw()
print timerClock.getTime() # should be consistently below 0.016 seconds on a 60 Hz monitor.
win.flip()