Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: read raw eyelink file that switches from binocular to monocular mode #12847

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

scott-huberty
Copy link
Contributor

This is an issue as PR.

A file from one of our studies causes read_raw_eyelink to break. The file starts recording binocular data and switches to monocular data mid-way through the recording. This is something that EyeLink acquisition software allows.

Although I can't share the file, I’ve created a test that simulates the error. I'm still investigating a fix.

Potential Solutions

  • Add a Check for this scenario (binocular to monocular switch or vice versa) and raise a more informative error. The user can then regenerate their ASCII file, outputting monocular data only, which in theory should then be readable by MNE. I think this minimizes technical debt for us.
  • Devise a workaround to handle this situation, such as adding a parameter to read_raw_eyelink that reads data for one eye only. This is probably (a lot?) more development work.
  • Try to convince EyeLink (SR Research) to open-source a python reader for their format 😆

CC @anomalosepia

@scott-huberty scott-huberty changed the title TST: Make it break BUG: read raw eyelink file that switches from binocular to monocular mode Sep 12, 2024
@scott-huberty scott-huberty marked this pull request as draft September 12, 2024 19:44
@larsoner
Copy link
Member

To me naively the easiest solution is actually to treat the data as binocular, but set one of the eyes to nan when it switches to monocular. Then if you want a "monocular instance" you just raw.drop_channels(["eye_right"]) or whatever (assuming left is the one that was on the whole time).

@scott-huberty
Copy link
Contributor Author

To me naively the easiest solution is actually to treat the data as binocular, but set one of the eyes to nan when it switches to monocular. Then if you want a "monocular instance" you just raw.drop_channels(["eye_right"]) or whatever (assuming left is the one that was on the whole time).

Hmm yeah could do.. I'll give it a try and will see how much complexity it adds.

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