mne-tools / mne-tools/mne-python

Interpolate bridged electrodes silently interpolates using bads

Open
#14,263 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The issue:
The behavior of mne.preprocessing.interpolate_bridged_electrodes is to compute the interpolation matrix based on all available non-bridged electrodes, independently of their presence in info["bads"]. This silent behavior can lead to data from "bads" being mixed into the data if the user is not aware of this. Since there is no note of this in the documentation, the user has to either identify the issue visually (with which minor bad channel issues may be imperceptible) or read through the code.

A solution:
While this can be avoided by the user by manually dropping those channels from the interpolation, a more natural behavior would be for interpolate_bridged_electrodes to handle this itself. Either by default, by providing an option, or at least by warning the user and documenting this behavior.

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 at mne.preprocessing.interpolate_bridged_electrodes and inspect how interpolation sources are selected relative to info["bads"]. Determine whether the intended behavior is a default change, an option, or a warning, then add focused tests and documentation covering bad channels. Done means the behavior is explicit and no bad-channel data is silently mixed without user awareness.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.