[visionegg] Re: ephys_gui

Hi Joe,

Imran Ali and Lachlan Dowd in the David O'Carroll lab at the University of Adelaide have just implemented exactly what you've asked for and recently sent the changes to me off-list. I think this is a HUGE improvement to the ephys_gui/ephys_server, and I'll be making a loader announcement about it soon, but since you asked...

I've checked all their code into CVS, and I'd like to write up some documentation on the new features. In the meantime, you're welcome to play with it, but this code hasn't been extensively tested by myself yet, and I'm still getting the occasional update from Adelaide. But, in the meantime, the basic idea is that you can now load any Vision Egg demo script into the ephys_gui. What's more, you can have automatic control of the variables through the use of some "magic" comments. Here's an example. The "#%f temporal_freq_hz" comment at the bottom means there is a floating point variable called "temporal_freq_hz" which can be altered in the GUI.

#!/usr/bin/env python
"""Sinusoidal grating calculated in realtime."""

############################
#  Import various modules  #
############################

import VisionEgg
VisionEgg.start_default_logging(); VisionEgg.watch_exceptions()

from VisionEgg.Core import *
from VisionEgg.FlowControl import Presentation
from VisionEgg.Gratings import *

#####################################
#  Initialize OpenGL window/screen  #
#####################################

screen = get_default_screen()

######################################
#  Create sinusoidal grating object  #
######################################

stimulus = SinGrating2D(position = ( screen.size[0]/2.0, screen.size[1]/2.0 ),
anchor = 'center',
size = ( 300.0 , 300.0 ),
spatial_freq = 10.0 / screen.size[0], # units of cycles/pixel
temporal_freq_hz = 1.0,
orientation = 45.0 )


###############################################################
#  Create viewport - intermediary between stimuli and screen  #
###############################################################

viewport = Viewport( screen=screen, stimuli=[stimulus] )

########################################
#  Create presentation object and go!  #
########################################
x = 5.0
p = Presentation(go_duration=(x,'seconds'),viewports=[viewport])
p.go()

#%f temporal_freq_hz
#%f orientation
#%f x

On Oct 8, 2004, at 7:03 AM, joe voss wrote:

Hi again,

I just updated to Windows 98 SE and now everything works fine (exept that there is a little graphical mess on the screen when I switch between the EphysServer and the EphysGUI window - but I think that is due to the fact that it is build to run on different PCs)
As far as I explored the ephysGUI first of all I can present the stimuli provided in the "stimulus" bar (and I am really enthusiastic about it) targets and gratings are more or less all I need.
Is there the option of loading parameters of other demofiles into the EphysGUI?
E.g how can I extend the "Target stimulus" with a random dot background? Do I have to write a whole new .py-file or can I load it somewhere from the demo files?


Thank you again for your help.
     Cheers
                Joe


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

Other related posts: