PsychoPy version 3
Problem requiring manual O override for every instance of a set of trials
We have set up an eyetracking experiment in PsycoPy to run with an EyeLink1000 machine with partner in China. We designed the test in UK (running no problems) and I have arrived in China to run the experiment which is now not working. The technical RA members of the team back in the UK suggest something is putting the tracker into ‘drift correct’/admin mode.
The script is set up to present a screen of instructions, then a screen with a visual picture (of a Chinese character), then the fixation cross, then the English word translation.
Each screen should be generated by pressing the space bar.
However, at the moment, it’s dropping the connection to the EyeLink after the instructions. So we can only generate the Chinese character for every trial by pressing O override, not the spacebar. But the space bar works to generate the fixation cross and English word translation screens.
I don’t know if it’s in the part of the script for running trials (see below)
# Loop through trials for thisTrial in trials: # Define the CHN word pics and its ENG translations chnWord = visual.ImageStim(win=win, image=thisTrial['pics']) engWord = visual.TextStim(win=win, text=thisTrial['eng'], font='Arial', height=100.0, color='black') # take the tracker offline tk.setOfflineMode() pylink.pumpDelay(50) # send the standard "TRIALID" message to mark the start of a trial # [see Data Viewer User Manual, Section 7: Protocol for EyeLink Data to Viewer Integration] tk.sendMessage('TRIALID') # record_status_message : show some info on the host PC tk.sendCommand("record_status_message 'Task: %s'"% thisTrial['chn']) # drift check win.flip() try: err = tk.doDriftCorrect(scnWidth/2, scnHeight/2,1,1) if err != 27: tk.applyDriftCorrect() break except: print("Exception") tk.doTrackerSetup() win.flip() # start recording, parameters specify whether events and samples are # stored in file, and available over the link tk.startRecording(1,1,1,1) pylink.pumpDelay(100) # wait for 100 ms to make sure data of interest is recorded # show the image of the CHN word chnWord.draw() win.flip() # this message marks the onset of the stimulus # [see Data Viewer User Manual, Section 7: Protocol for EyeLink Data to Viewer Integration] tk.sendMessage('image_onset') # Message to specify where the image is stored relative to the EDF data file, please see the # "Protocol for EyeLink Data to Data Viewer Integration -> Image" section of the Data Viewer manual tk.sendMessage('!V IMGLOAD FILL %s' % ('..'+ os.sep + thisTrial['pics'])) # clear the host display, this command is needed if you are backdropping images # to the host display (not demonstrated in this script) tk.sendCommand('clear_screen 0')
Clare Wright University of Leeds