EDF messages lost during eye tracking recordings
In a bistable motion experiment we are currently running, we're experiencing a problem with logging specific events to the EDF file. We log messages to the EDF using
exp.pygaze_eyetracker.log(). To log the start and end of a trial, we send the messages:
exp.pygaze_eyetracker.log(‘trial %d started at %f’ %(count_block, self.time()))
exp.pygaze_eyetracker.log(‘trial %d stopped at %f’ %(count_block, self.time()))
In dummy mode, all the trial start/stop messages are neatly printed in the Opensesame terminal. However, when we run the experiment recording eye measurements as well, specific trial start or stop messages are not properly send to the EDF file, as becomes clear when inspecting the EDF .msg file:
As suggested by Daniel, we've tried to add clock.sleep(10) inside our code to decrease the number of EDF messages that are being sent after each other, however this did not solve our problem.
The error always occurs when we send the stop message for trial 2, but sometimes other trial start/stop messages are lost as well...
I am hoping someone could have a look at our experiment or give us advice about possible solutions to this problem!
I've added the experimental script of one of our sessions. The experiment can be run after changing the directory variable
location to a local directory.
Thanks a lot!!