mne-tools / mne-tools/mne-python

Eyetracking data: Need a function to identify epochs with excessive blinks

Open
#13,537 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ENH
Dominant language
Python
Stars
3.5k
Forks
1.6k
Avg merge
1d 6h
Merged PRs (30d)
100

Description

Describe the new feature or enhancement

In eyetracking experiments we often have participants that, for reasons such as fatigue and higher sensitivity to stimuli, blinked excessively in some trials. In some cases, if a participant blinks for more than 40% of the trial's total duration, the entire trial becomes unusable even after interpolation and need to be excluded.

It'd be much more convenient if we can have a function that automate trial exclusion, or add in the mne.Epochs() function an additional reason to drop epochs with too many missing data.

Describe your proposed implementation

Additional feature in mne.Epochs(), where trials with a given percentage of total duration marked as missing data (e.g. 'BAD_blink' or 'blink') are automatically rejected

Describe possible alternatives

A new function like reject_missing_data() that operates on Epoched data

Additional context

Currently after epoching, each epoch has its own timestamp relative to its baseline (if a baseline is given), but the annotations still keep their timestamps in raw format. This adds to the workload when users need a customised function that achieves blink-based trial rejection as most users are not very proficient in MNE-Python's underlying data structure

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing mne.Epochs() and the proposed reject_missing_data() alternative, focusing on how epoch timestamps and raw annotation timestamps relate. Clarify the API and behavior for percentage-based blink or missing-data rejection, then define completion around automatically excluding trials that exceed the chosen threshold.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.