[visionegg] Re: blinking stimulus objects

  • From: Andrew Straw <astraw@xxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Tue, 22 Sep 2009 10:00:14 -0700

bgoll001@xxxxxxxxxxxxxxx wrote:
> Hi,
>
> Is there a way to make shapes (i.e. FilledCircle) blink?  Something like a 
> sleep function that can temporarily stop a stimulus from displaying and takes 
> a time value as an argument?
>   

Hi Benny,

I've modified the color_grating.py demo to do something like what you're
asking for. See attached.

-Andrew

-- 
Andrew D. Straw, Ph.D.
California Institute of Technology
http://www.its.caltech.edu/~astraw/

diff --git a/demo/color_grating.py b/demo/color_grating.py
index 4c22a07..9ee561b 100755
--- a/demo/color_grating.py
+++ b/demo/color_grating.py
@@ -35,15 +35,14 @@ mask = Mask2D(function='circle',   # also supports 'circle'
 
 stimulus = SinGrating2D(color1           = (0.5, 0.25, 0.5), # RGB (alpha 
ignored if given)
                         color2           = (1.0, 0.5,  0.1), # RGB (alpha 
ignored if given)
-                        contrast         = 0.2,
-                        pedestal         = 0.1,
+                        contrast         = 1000.0, # flip completely from one 
color to the other
                         mask             = mask, # optional
                         position         = ( screen.size[0]/2.0, 
screen.size[1]/2.0 ),
                         anchor           = 'center',
                         size             = ( 300.0 , 300.0 ),
-                        spatial_freq     = 20.0 / screen.size[0], # units of 
cycles/pixel
+                        spatial_freq     = 0.0, # a solid color
                         temporal_freq_hz = 1.0,
-                        orientation      = 270.0 )
+                        )
 
 def pedestal_func(t):
     # Calculate pedestal over time. (Pedestal range [0.1,0.9] and

Other related posts: