WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 08-06-2014, 08:07 AM
chris2307 chris2307 is offline
Join Date: Nov 2013
Posts: 36
Unable to draw EyeLink drift correction to screen

Hi all,

I am running an experiment in a loop. When a new trial begins, I would like to call the EyeLink 2 drift correction function. I've been able to call the menu for calibration before starting the experiment just fine.

The problem is that my function does run and the drift correction routine is initialised (I can see this from the EyeTracker PC). However, I am unable to get the eye tracker to override the screen in order to display the drift correction dot.

Instead, the experiment continues to be displayed on the screen, although is blocked whilst it waits for the drift correction routine to be exited.

import viz	
import os
import vizact
import viztask
import math
#import pyxid
import win32api
import win32con

sys.path.append(os.getcwd() + '/functions')

import LoadLevel
import screen
import Lights
import Physics
import EyeTracker
from text import Text
from movement import Movement
from toDataFile import toDataFile
from StaticVisualSearchTask import StaticVisualSearchTaskExperiment

userMovement = Movement(10)
text = Text()


experiment = StaticVisualSearchTaskExperiment()
toFile = toDataFile(experiment.getParticipantID())

def runExperiment():
	yield experiment.prepareTrial(experiment.currentPhase())
	toFile.newTrial(experiment.getTrialData(), experiment.getTrialNumber())

	while True:
		if(experiment.hasTrialEnded() == False):
			if(experiment.isNewPhase() == True):
				yield experiment.prepareTrial(experiment.currentPhase())
				toFile.asRaw("<phase_number>" + str(experiment.currentPhase()) + "</phase_number>")
			if(experiment.currentPhase() == 1):
				yield experiment.runPhase1(JOY_YES = userMovement.returnButtonYES(), JOY_NO = userMovement.returnButtonNO())
			elif(experiment.currentPhase() == 2):
				yield experiment.runPhase2(JOY_YES = userMovement.returnButtonYES(), JOY_NO = userMovement.returnButtonNO())
			elif(experiment.currentPhase() == 3):
				yield experiment.runPhase3(JOY_YES = userMovement.returnButtonYES(), JOY_NO = userMovement.returnButtonNO())
			if(experiment.hasExperimentEnded() == False):
				yield EyeTracker.driftCorrection() # <------------------------------------------------- Here is where I attempt to carry out a drift correction
				yield experiment.nextTrial()
				yield experiment.prepareTrial(experiment.currentPhase())
				toFile.newTrial(experiment.getTrialData(), experiment.getTrialNumber())
				yield experiment.finish()


I'm hoping it is something obvious but if it's not, please let me know and I'll get more information put up on here.

Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 06:41 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC