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 alternatives.
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?
Thanks!
Mark
(** 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. )
flicker_rate = 16 # cycles per second def flicker(t): return int(t*flicker_rate*2.0) % 2
Cheers! Andrew
====================================== The Vision Egg mailing list Archives: //www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html