Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Eyetracking post-calibration problem with re-entering expyriment

Hello everyone,

I'm using expyriment together with pygaze. A snippet of my script looks like this.

from expyriment import design, control, stimuli, misc,io
import constants
from pygaze import libscreen, eyetracker, libgazecon
import pygame

disp        =   libscreen.Display(disptype=constants.DISPTYPE, dispsize=constants.DISPSIZE, fgc=constants.FGC, bgc=constants.BGC, screennr=constants.SCREENNR)
tracker     =   eyetracker.EyeTracker(disp, trackertype=constants.TRACKERTYPE, resolution=constants.DISPSIZE, saccvelthres=constants.SACCVELTHRESH, saccaccthresh=constants.SACCACCTHRESH)

expName="Encoding"
exp         =   design.Experiment(name=expName, filename_suffix=expName)
control.initialize(exp)

def calibrator(tracker):

        instro = stimuli.BlankScreen()
        stimuli.TextLine(u'Kalibrierung notwendig.', position = (0, 100), text_size = 40, text_bold = False).plot(instro)
        stimuli.TextLine(u'Mit "Leertaste" weiter', position = (0, 50 - exp.screen.size[1]/2), text_size = 25, text_bold = False).plot(instro)
        instro.present(clear = False)
        exp.keyboard.wait(misc.constants.K_SPACE) # Wait for space

        tracker.calibrate() # <--Calibration is executed here

calibrator(tracker) 
...

My problem: When I start the calibration (= calibrator function), a new window opens up where the calibration is performed. Afterwards I see the desktop but the pygame window of expyriment is not visible. If I go to the task manager, double click on the pygame window application, and then press enter, the expyriment window becomes visible on the screen with the ready screen (I'm quite sure that the enter-press is confirming the subject ID, though not visibly). The experiment then runs fluently and eye tracking works.
Thus, it seems that expyriment is continuing its processing after the calibration but does not automatically show the exp.screen surface.

Some info on my system:
I'm using Windows 7;
pygaze environment (http://www.pygaze.org/downloads/)
expyriment version 0.6.3
smi eye tracker

Sign In or Register to comment.