mne-tools / mne-tools/mne-python
Eyetracking data: Need a function to identify epochs with excessive blinks
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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