Issues in loading and visualising the calibration data in EyeLink .asc files

Platform Windows-11-10.0.26100-SP0
Python 3.13.5
Core

  • mne 1.10.1 (latest release)
  • numpy 2.1.3 (MKL 2023.1-Product with 14 threads)
  • scipy 1.15.3
  • matplotlib 3.10.0 (backend=qtagg)

Hello!

I collected eye-tracking data using the Eyelink 1000 raw and then converted it with EDF2ASC using the default settings.

Following this tutorial (Working with eye tracker data in MNE-Python — MNE 1.10.1 documentation), I tried to check the calibration from EyeLink .asc files. However, when I run this code:

cals = read_eyelink_calibration(et_fpath)

I get this error:

IndexError                                Traceback (most recent call last)
Cell In[225], line 1----> 1 cals = read_eyelink_calibration(et_fpath)
File ~\anaconda3\Lib\site-packages\mne\preprocessing\eyetracking\calibration.py:222, in read_eyelink_calibration(fname, screen_size, screen_distance, screen_resolution)
220 logger.info(f"Reading calibration data from {fname}")
221 lines = fname.read_text(encoding=“ASCII”).splitlines() 
→ 222 return _parse_calibration(lines, screen_size, screen_distance, screen_resolution)
File ~\anaconda3\Lib\site-packages\mne\io\eyelink_utils.py:829, in _parse_calibration(lines, screen_size, screen_distance, screen_resolution)
827 if “!CAL VALIDATION” in subline:
828     continue  # for bino mode, skip the second eye’s validation summary 
→ 829 subline_eye = subline.split(“at”)[0].split()[-1].lower()  # e.g. ‘left’
830 if subline_eye != this_eye:831     continue  # skip the validation lines for the other eye

IndexError: list index out of range

I don’t understand whether the issue comes from the .asc file or the code.

I hope you can help me!

Thank you.

Hey @martalp are you able to share the problematic data file via email?

1 Like

Hello, @scott-huberty!

Thanks for the quick reply.
Yes, sure! Could you please write down the address to which you’d like to receive the file?
Best,

scottehuberty@gmail.com

Hello, @scott-huberty !
I hope you are well.
I sent you the file approximately a month ago - not sure if you received it.

Hey @martalp Sorry for the delay - Issue / PR opened here: FIX: Handle an Eyelink File with blank lines injected throughout file by scott-huberty · Pull Request #13469 · mne-tools/mne-python · GitHub

This issue has been fixed. @martalp are you able to use the development version of MNE? A new release won’t be published to pip/conda for a couple months probably.