mne-tools / mne-tools/mne-python
Failure to interpolate bad channels
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
Description of the problem
Failure to interpolate a bad channel (AR8); logging this as a bug pursuant to a discussion with @drammock.
Steps to reproduce
import mne
import mne_bids
BIDS_Constant = {'subject':'01',
'session':'iemu',
'run':'1',
'datatype':'ieeg',
'acquisition':'clinical',
'root':'/data/ds003688',
'task':'film'}
bids_path = mne_bids.BIDSPath(**BIDS_Constant, suffix='ieeg', extension='.vhdr')
raw = mne_bids.read_raw_bids(bids_path=bids_path)
picks = mne.pick_channels_regexp(raw.ch_names, regexp='AR[1-9]')
eeg_data = raw.copy().pick(picks).load_data()
eeg_data_interp = eeg_data.copy().interpolate_bads(reset_bads=False)
Link to data
openneuro-py download --dataset=ds003688 --include=sub-01 #Download the data.
Expected results
A successful interpolation -?
Actual results
RuntimeError: Digitization points dig_kinds=[4 (FIFFV_POINT_EXTRA), 3 (FIFFV_POINT_EEG)] not in head coordinates, contact mne-python developers
Additional information
Platform: Windows-10-10.0.22000-SP0
Python: 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)]
Executable: C:\Users\DarthSaddest\AppData\Local\Programs\Python\Python39\python.exe
CPU: Intel64 Family 6 Model 140 Stepping 1, GenuineIntel: 8 cores
Memory: 7.7 GB
mne: 1.2.1
numpy: 1.22.3 {unknown linalg bindings (threadpoolctl module not found: No module named 'threadpoolctl')}
scipy: 1.9.3
matplotlib: 3.6.2 {backend=module://matplotlib_inline.backend_inline}
sklearn: Not found
numba: Not found
nibabel: Not found
nilearn: Not found
dipy: Not found
openmeeg: Not found
cupy: Not found
pandas: 1.5.1
pyvista: Not found
pyvistaqt: Not found
ipyvtklink: Not found
vtk: Not found
qtpy: Not found
ipympl: Not found
pyqtgraph: Not found
pooch: v1.6.0
mne_bids: 0.11.1
mne_nirs: Not found
mne_features: Not found
mne_qt_browser: Not found
mne_connectivity: Not found
mne_icalabel: Not found
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 reproducing the failure with the provided Python script, the ds003688 dataset, and mne 1.2.1. Investigate the interpolate_bads entry point and how it handles the reported digitization points and head coordinates. Done means the AR8 bad channel interpolates successfully without the RuntimeError, with regression coverage for this dataset or equivalent channel setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100