Magdalena Wutte
unread,Aug 22, 2011, 11:57:41 AM8/22/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to psychopy-users, magdale...@univ-provence.fr
Dear all,
I am using a random dot stimulus (circle), unfortunately, at the long
dot-lifetime that is necessary for my stimulus (>200ms), the
distribution of dots gets inhomogeneous.
As an easy hack I thought to just use the .Aperture function and show
only the homogeneous part of my stimulus; But while .Aperture works
fine for moving stimuli like the gabor-patch, I cannot get it to work
with DotStim. Below the code snippet how I tried to to use .Aperture
on DotStim (in parallel to what worked for the moving garbor).
It might be not the best way to approach this problem, but if you have
any suggestion how I could get it to work, or an alternative solution
how I could get a circle of homogeneous distributed random dots with a
lifetime of >200ms, I would be quite thankful.
Ta!
---------------------------------------------------------------------------------------------
Code:
from psychopy import visual, event, core
#create a window to draw in
myWin =visual.Window((600,600), allowGUI=False,
bitsMode=None, units='norm', winType='pyglet')
#initialize dot stimulus
dotPatch =visual.DotStim(myWin, color=(1.0,1.0,1.0), dir=270,
nDots=500, fieldShape='square', fieldPos=(0.0,0.0),fieldSize=1,
dotLife=5, #number of frames for each dot to be drawn
signalDots='same', #are the signal and noise dots 'different' or
'same' popns (see Scase et al)
noiseDots='direction', #do the noise dots follow random- 'walk',
'direction', or 'position'
speed=0.01, coherence=0.9)
#initialize aperture
aperture = visual.Aperture(myWin, size=0.5,pos=[0.0,
0.0],shape='circle')
aperture.enable()
trialClock =core.Clock()
while True:#forever
dotPatch.draw()
myWin.flip()#redraw the buffer
#handle key presses each frame
for key in event.getKeys():
if key in ['escape','q']:
print myWin.fps()
myWin.close()
core.quit()
event.clearEvents('mouse')#only really needed for pygame windows