[open] Continuous Flash Supression Experiment.
I am programing an Continuous Flash Supression experiment (CFS).
The basic idea is to present on one eye an image (face or car or whatever) and on the other eye overlapping circular patches that are random in color and size and switching at around 13 Hz.
Here you can see to have an idea (Taken from Martin Hebart website).
I created an inline python script to present the flashing circles:
from psychopy.visual import GratingStim, event, core,SimpleImageStim,TextStim, Circle import numpy as np Sq_area= 250 circ_area=0 while circ_area<(8*(Sq_area*Sq_area)): myTex = np.random.random(3) Opac = np.random.uniform(0.3, 1, size=1) Posx = np.random.uniform(-(Sq_area/2), (Sq_area/2), size=1) Posy = np.random.uniform(-(Sq_area/2), (Sq_area/2), size=1) Rad = np.random.uniform(10, (Sq_area/5), size=1) myStim = Circle(win,units='pix', radius=Rad, opacity=Opac, pos=(Posx,Posy), lineWidth=0) myStim.setFillColor(myTex, 'rgb') myStim.setLineColor(myTex, 'rgb') myStim.draw() circ_area= circ_area + ((Rad*Rad)*np.pi) win.flip() core.wait(0.05)
Of course this is extremely inefficient and memory demanding, so it is impossible to get a reliable flashing rate, since the computer get stuck sometimes.
Does anybody has another more efficient idea how to do this?
Is the only other option to create several images (jpg) and load them randomly?
Thanks a lot in advance for any feedback.