[visionegg] Re: Stimuli updates not rendering
- From: Mark Halko <mhalko@xxxxxx>
- To: visionegg@xxxxxxxxxxxxx
- Date: Fri, 26 Oct 2007 14:20:43 -0400
Not having the code that generates the stimulus or the code that
updates the stimuli, it's hard to tell what's going on.
Check your scope - occasionally if you change a "global" list (or
other object) within a function, it will make a new local copy, but
keep the "global" copy the same:
http://www.network-theory.co.uk/docs/pytut/
PythonScopesandNameSpaces.html
Otherwise, all variables found outside of the innermost scope are
read-only (an attempt to write to such a variable will simply
create a new local variable in the innermost scope, leaving the
identically named outer variable unchanged)
If you made your own stimulus object, it should contain the parameter
"on" and in the draw method if "on" is False, not draw the object.
Mark
On Oct 26, 2007, at 8:11 AM, 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