Problem writing markers to the eyetracking log (EDF / ASC)
Dear Forum,
For my eye tracking experiment, I would like to write certain messages to the eye tracking data log to simplify the analysis of the data. For example, I would like to mark the stimulus onset as well as when a participant has made a choice during the experiment.
In order to do so, I am using the following code:
eyetracker_variables = ("TRIAL_START_DATA" + " " + str(var.block) + " "
+ str(var.eyetracker_phase) + " "
+ str(var.trial_count_eyetracker) + " "
+ str(var.position_helper) + " "
+ str(var.initial_safe_amount) + " "
+ str(var.upper_lottery_amount) + " "
+ str(var.lower_lottery_amount) + " "
+ str(var.step_size) + " "
+ str(var.exit_rule) + " "
+ str(var.exit_rule))
eyetracker.log(eyetracker_variables)
as well as:
eyetracker.log("CHOICE_MADE")
Unfortunately, none of these messages appear in the eye tracking log file and apparently the logging of messages does not work yet.
Do you have any recommendations / tips what I could do to solve this issue?
Thanks a lot in advance!
Best,
Sarah
Comments
Hi Sarah,
Do you log the data while the recording it still on? I think logged variables won't appear after you have stopped the recording. Other than that the code looks fine. Back in the day (Opensesame 3.2), I used:
exp.pygaze_eyetracker.log("")to send log messages, but maybe your code also is fine.By the way, be aware that depending on your tracker, there might be a limit of how long your messages can be. The Eyelink is limited to 128 (or 255) characters I believe.
Eduard
Hi Eduard,
Thanks a lot for your reply and tips :)
Yes, I log the data when the recording is on. Regarding the code used, I as well did some research here in the forum and already tried exp.pygaze_eyetracker.log(""), however this did not work either.
Thanks a lot for the tip with the character limitation, we have an Eyelink tracker. This might affect especially the first part I am trying to log since it is quite long, however the second message eyetracker.log("CHOICE_MADE") should not be affected by this. Unfortunately, neither of the two messages has been logged successfully until now.
When I run the experiment in the advanced dummy mode, in the output it says "the following message would have been logged to the EDF".
What I was wondering: In the lab, we still have an older version of Open Sesame (3.2.7) with Python 2, while I programmed my experiment in the latest version OS version (3.3.12) with Python 3. Are there any differences in how to log messages to the EDF between the two Open Sesame versions?
Thanks in advance & best,
Sarah
Mh, then I don't really know either. I would need access to an eye tracker to debug and find out what is going on. That you see that message is also a good sign actually.
Are there any differences in how to log messages to the EDF between the two Open Sesame versions?
Quite sure that this wouldn't be a problem. Perhaps the Pylink version (Python api provided by Eyelink)? But that shouldn't be a problem either given that it used to work fine.
Not sure whether it helps, you could try looking at the code of one of my older projects, and see what code should work (provided the setup is fine). Here is the link: https://osf.io/349xz
Thanks a lot! I will take a look at that and hopefully somehow figure out what the issue might be :)