[visionegg] Re: Stimuli updates not rendering
- From: Andrew Straw <astraw@xxxxxxxxxxx>
- To: visionegg@xxxxxxxxxxxxx
- Date: Fri, 26 Oct 2007 08:45:57 -0700
Hi Thorsten,
It's difficult to determine what's going on without a complete program.
However, you can try setting the parameter using a function that does
error checking -- set(). So, try "stimulus.set(on=True)". If this
doesn't at least point you in the right direction, I'd be happy to look
at a more complete code sample.
-Andrew
Thorsten Pfister wrote:
Hi,
I am working on getting some visual stimuli flickering on screen. To
achieve this I wrote
a routine which, depending on certain circumstances, either sets each
stimulis' 'on'
parameter to 'True' or 'False'. This works insofar as the parameter is
set (which I can
confirm via __getattribute__), but unfortunately the output on the
screen tells me otherwise.
To further test this I changed my code to always disable the 'on'
parameter (i.e. 'False'), ''hoping''
to see a black screen afterwards - however the stimuli are still being
drawn. Below you'll find
the piece of code that handles these ideas (I stripped out stuff that
is not relevant for the problem).
I am quite new to VisionEgg, but after countless hours of crawling the
archives and google I am
also somewhat lost. =)
#-----------------------CODE---------------------------
def frequency_logic(self, t):
# here is some code that succesfully sets each stimulis' 'on'
paramter to 'False'
return self.stimulis # a list of stimulis
def exec_stimulator(self, ...):
# some more code that is not related to the problem comes before
self.viewport = Viewport(screen=self.screen,\
stimuli=self.stimulis)
frequency_controller = FunctionController(\
during_go_func = self.frequency_logic,\
eval_frequency = Controller.EVERY_FRAME,\
temporal_variables = \
Controller.TIME_SEC_SINCE_GO)
presentation = Presentation( go_duration=(5.0,'seconds'),\
viewports=[self.viewport])
presentation.add_controller(self.viewport, 'stimuli',\
frequency_controller)
presentation.go()
#-----------------------CODE---------------------------
I'd really appreciate some tips or a pointer to the flaw in this
logic. Thank you all in advance!
Regards,
Thorsten Pfister
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
- References:
- [visionegg] Stimuli updates not rendering
- From: Thorsten Pfister
Other related posts:
- » [visionegg] Stimuli updates not rendering
- » [visionegg] Re: Stimuli updates not rendering
- » [visionegg] Re: Stimuli updates not rendering
- » [visionegg] Re: Stimuli updates not rendering
- » [visionegg] Re: Stimuli updates not rendering
- » [visionegg] Re: Stimuli updates not rendering
Hi,I am working on getting some visual stimuli flickering on screen. To achieve this I wrote a routine which, depending on certain circumstances, either sets each stimulis' 'on' parameter to 'True' or 'False'. This works insofar as the parameter is set (which I can confirm via __getattribute__), but unfortunately the output on the screen tells me otherwise.
To further test this I changed my code to always disable the 'on' parameter (i.e. 'False'), ''hoping'' to see a black screen afterwards - however the stimuli are still being drawn. Below you'll find the piece of code that handles these ideas (I stripped out stuff that is not relevant for the problem). I am quite new to VisionEgg, but after countless hours of crawling the archives and google I am
also somewhat lost. =) #-----------------------CODE--------------------------- def frequency_logic(self, t):# here is some code that succesfully sets each stimulis' 'on' paramter to 'False'
return self.stimulis # a list of stimulis
def exec_stimulator(self, ...):
# some more code that is not related to the problem comes before
self.viewport = Viewport(screen=self.screen,\
stimuli=self.stimulis)
frequency_controller = FunctionController(\
during_go_func = self.frequency_logic,\
eval_frequency = Controller.EVERY_FRAME,\
temporal_variables = \
Controller.TIME_SEC_SINCE_GO)
presentation = Presentation( go_duration=(5.0,'seconds'),\
viewports=[self.viewport])
presentation.add_controller(self.viewport, 'stimuli',\
frequency_controller)
presentation.go()
#-----------------------CODE---------------------------
I'd really appreciate some tips or a pointer to the flaw in this
logic. Thank you all in advance!
Regards, Thorsten Pfister ====================================== The Vision Egg mailing list Archives: http://www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html
- [visionegg] Stimuli updates not rendering
- From: Thorsten Pfister