Skip to content

Conversation

@scott-huberty
Copy link
Contributor

@scott-huberty scott-huberty commented Nov 5, 2023

This PR Fixes a problem with reading an Eyelink file that was raised on the Discussion forum: https://mne.discourse.group/t/issue-with-read-raw-eyelink/7787

The problematic file provided by the researcher had a line that only contained a newline character, which broke the parser.
This branch checks for and skips empty lines, fixing the problem.

I did a quick performance check to see how much longer file reading takes with the additional checks:

import mne
fname = mne.datasets.eyelink.data_path() / "eeg-et" / "sub-01_task-plr_eyetrack.asc"
%timeit mne.io.read_raw_eyelink(fname)

on main:

860 ms ± 30.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

on this branch:

997 ms ± 139 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

@mscheltienne mscheltienne merged commit b988e67 into mne-tools:main Nov 6, 2023
@mscheltienne
Copy link
Member

Thanks @scott-huberty!

larsoner added a commit to larsoner/mne-python that referenced this pull request Nov 6, 2023
* upstream/main:
  MAINT: Add branch coverage (mne-tools#12174)
  OpenSSF (mne-tools#12175)
  fix docstring in 60_sleep.py (mne-tools#12171)
  FIX: skip empty lines in read_raw_eyelink (mne-tools#12172)
  FIX: Fix bug with coreg scalars (mne-tools#12164)
  Changed casting rule in np.clip to allow reading of raw GDF files (mne-tools#12168)
larsoner added a commit to JD-Zhu/mne-python that referenced this pull request Nov 7, 2023
* upstream/main:
  ENH: Enable sensor-specific OPM coregistration in mne coreg (mne-tools#11405)
  Tweak README.rst (mne-tools#12166)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#12177)
  MAINT: Add branch coverage (mne-tools#12174)
  OpenSSF (mne-tools#12175)
  fix docstring in 60_sleep.py (mne-tools#12171)
  FIX: skip empty lines in read_raw_eyelink (mne-tools#12172)
larsoner added a commit to pablomainar/mne-python that referenced this pull request Nov 8, 2023
* upstream/main:
  BUG: Fix bug with spectrum warning (mne-tools#12186)
  Add argument splash to disable splash-screen from Qt-browser (mne-tools#12185)
  BUG: Fix bug with logging and n_jobs>1 (mne-tools#12154)
  Use gray logo (works in light and dark modes) (mne-tools#12184)
  Tweak logo for dark mode (mne-tools#12176)
  ENH: Improve Covariance.__repr__ (mne-tools#12181)
  ENH: Enable sensor-specific OPM coregistration in mne coreg (mne-tools#11405)
  Tweak README.rst (mne-tools#12166)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#12177)
  MAINT: Add branch coverage (mne-tools#12174)
  OpenSSF (mne-tools#12175)
  fix docstring in 60_sleep.py (mne-tools#12171)
  FIX: skip empty lines in read_raw_eyelink (mne-tools#12172)
  FIX: Fix bug with coreg scalars (mne-tools#12164)
  Changed casting rule in np.clip to allow reading of raw GDF files (mne-tools#12168)
  [DOC] Add documentation for setting montage order (mne-tools#12160)
  Fix inferring fiducials from EEGLAB (mne-tools#12165)
snwnde pushed a commit to snwnde/mne-python that referenced this pull request Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants