The lines of binocular and monocular eyelink recordings vary, as they have more data fields for each eye tracker sample.
Description of a solution
Currently only the regex for monocular samples is defined as EYE_TRACKING_SAMPLE in utils.parsing.
This should be renamed into EYE_TRACKING_SAMPLE_MONOCULAR and a new EYE_TRACKING_SAMPLE_BINOCULAR for binocular data should be created.
There is a regex implemented in #674 which checks sampling rate and which eye is tracked:
r'SAMPLES\s+GAZE\s+(?P<tracked_eye>LEFT|RIGHT)\s+RATE\s+(?P<sampling_rate>[-]?\d*[.]\d*)\s+TRACKING\s+....
In case of a binocular recording, the file will contain two lines for each tracked eye.
The metadatafield tracked_eye will currently only have LEFT or RIGHT, but in the binocular case it should be set to BOTH internally.
You should check early on which of the two regular expressions for the eye tracking samples should be used for the remaining file.
The parsing will have to be changed a bit then, by parsing header information first and only after having read the SAMPLES\s+GAZE\s+... line(s) the eye tracking sample would be checked too (EYE_TRACKING_SAMPLE_MONOCULAR or EYE_TRACKING_SAMPLE_BINOCULAR).
A simpler alternative is to always check for both samples, but I guess this would be much slower for one of the two cases (e.g. in case EYE_TRACKING_SAMPLE_MONOCULAR is matched first, binocular files would parse slower as the line has to be matched a second time with EYE_TRACKING_SAMPLE_BINOCULAR).
Minimum acceptance criteria
[ ] parse binocular eyelink data
[ ] for binocular data replace the tracked_eye metadata with BOTH
[ ] add eyelink binocular test example file to repository
Description of the problem
The lines of binocular and monocular eyelink recordings vary, as they have more data fields for each eye tracker sample.
Description of a solution
Currently only the regex for monocular samples is defined as
EYE_TRACKING_SAMPLE
inutils.parsing
. This should be renamed intoEYE_TRACKING_SAMPLE_MONOCULAR
and a newEYE_TRACKING_SAMPLE_BINOCULAR
for binocular data should be created.There is a regex implemented in #674 which checks sampling rate and which eye is tracked:
r'SAMPLES\s+GAZE\s+(?P<tracked_eye>LEFT|RIGHT)\s+RATE\s+(?P<sampling_rate>[-]?\d*[.]\d*)\s+TRACKING\s+....
In case of a binocular recording, the file will contain two lines for each tracked eye.
The metadatafield
tracked_eye
will currently only haveLEFT
orRIGHT
, but in the binocular case it should be set toBOTH
internally.You should check early on which of the two regular expressions for the eye tracking samples should be used for the remaining file.
The parsing will have to be changed a bit then, by parsing header information first and only after having read the
SAMPLES\s+GAZE\s+...
line(s) the eye tracking sample would be checked too (EYE_TRACKING_SAMPLE_MONOCULAR
orEYE_TRACKING_SAMPLE_BINOCULAR
).A simpler alternative is to always check for both samples, but I guess this would be much slower for one of the two cases (e.g. in case
EYE_TRACKING_SAMPLE_MONOCULAR
is matched first, binocular files would parse slower as the line has to be matched a second time withEYE_TRACKING_SAMPLE_BINOCULAR
).Minimum acceptance criteria
tracked_eye
metadata withBOTH