[visionegg] making a stimulus flicker at a frequency

  • From: <getmark@xxxxxxxxxxxx>
  • To: <visionegg@xxxxxxxxxxxxx>
  • Date: Tue, 12 Aug 2003 2:18:32 -0400

Hi Andrew,

I've just moved from a 667 Mhz down to a 500 Mhz machine, and the controller I 
wrote to flicker the 
stimulus is starting to stutter.  It flickers just fine, and then does just a 
little noticable hiccup about once 
a second (I have a feeling that (once a second) should tell me something, but 
it's eluding me).

I wrote a controller like so:

def on_or_off(t):
        return(   int(   (t-int(t)) * 16.0   )      % 2)

which returns either a 1 or 0.   [*footnote]

(The controller proper being something like:

flicker_controller = FunctionController(during_go_func =on_or_off )


I'm feeling this is a bit of a kludge, but I haven't thought of any 

I'm trying to figure out if there's a more accurate or efficient way of 
flickering a stimulus at a particular 
frequency than this (a way which still uses the Presentation class).  Any 
thoughts and/or pointers in the 
right direction?



(** footnote: If you want to know, this strips off the second from the time 
(t-int(t)) ( ie. 2.223242 s -> 
0.223242 ) and then uses the resulting decimal fraction to create a number 
between 0 and 16.  The 
mod tells us whether the int of that number between 0 and 16 is even or odd, 
which should return 
evenly temporally spaced 0's and 1's -- eight 1's and eight 0's in a second.  
At least, that's the idea. )

The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: