[visionegg] Re: Display and keyboard with pylink

  • From: "Suganthan Subramaniam" <suganthan@xxxxxxxxxxxxxxx>
  • To: <visionegg@xxxxxxxxxxxxx>
  • Date: Wed, 16 Nov 2005 14:31:45 -0500

Hi,


> Is it possible to do this without opening and closing a new screen
> for each trial?

Yes, in the new version of pylink.

In the previous version of the pylink, you cannot do this, since it uses SDL 
for camera setup, calibration and drift correct graphics. However, in the 
new version that you can download from 
https://www.sr-support.com/forums/showthread.php?t=14, you can use any 
graphics environment provided you write some of the call back functions to 
draw the graphics.

The new pylink come with examples of SDL, PyGame and VisionEgg graphics. 
The directory examples\VisionEgg\EyeLinkCoreGraphicsVE.py implements the 
functions for drawing eyelink camera setup, calibration and drift correction 
screens. You do not need to modify this file. The eye_gabor_2d.py is an 
example that uses EyeLinkCoreGraphicsVE.  On eye_gabor_2d.py you can insert 
tracker.doDriftCorrect(screen.size[0]/2,screen.size[1]/2,1,1) anywhere after 
initialization of EyeLinkCoreGraphics and not in recording loop.  An ideal 
place would be just before the call to start recording.


eg.
#The following does drift correction at the begin of each trial
while 1:
 # Does drift correction and handles the re-do camera setup situations
 error=tracker.doDriftCorrect(screen.size[0]/2,screen.size[1]/2,1,1)
 if error != 27:
  break
 else:
  tracker.doTrackerSetup()


error = tracker.startRecording(1,1,1,1)

Suganthan 

Other related posts: