psychopy.org | Reference | Downloads | Github

Blurred visual.circle object

Dear all,

I would like to blurred looming circle generated by visual.circle.
To blurred the circle i would like to apply scipy.ndimage.filters.gaussian_filter()

here you could find my code for the looming circle. What i need is “just” to transform my windows into a numpy array !!!

from psychopy import visual
from psychopy import core, event,gui,monitors
import time
from win32api import GetSystemMetrics
import scipy

Generate a windows of the screen Size

scr=[GetSystemMetrics(0),GetSystemMetrics(1)]
mywin=visual.Window(monitor=‘HP’,size=scr,color=[0,0,0],waitBlanking=True,units=“pix”,fullscr=True,allowGUI=True)
RadiusOriginal=100

Create a round object

Round=visual.Circle(mywin, radius=RadiusOriginal, edges=32,fillColor=‘black’,lineColor=‘black’)
Round.draw()
mywin.flip()
core.wait(1)

General infomration for looming

RadiusEnd=200
FrameRate=30
Time=0.5

StepRadius=(RadiusOriginal-RadiusEnd)/(FrameRateTime)
WaitTime=Time/(FrameRate
Time)

for i in range(FrameRate/2):
tic=time.time()
RadiusNew=RadiusOriginal-(i+1)*StepRadius
Round.setRadius(RadiusNew)
Round.draw()
#################
##Blurred All windows here ???
################
mywin.flip()
el=time.time()-tic
#print(el)
core.wait(WaitTime-el)
core.wait(2)
mywin.close()

Thanks

best
JFK

Thanks

JFK