Issue in head coordinates: asked to contact MNE developers

Tried to interpolate the bad AR8 channel for the film task of Subj 01 in this dataset. My code went:

import mne
import mne_bids
BIDS_Constant = {'subject':'01',
                                    'session':'iemu',
                                    'run':'1',
                                    'datatype':'ieeg',
                                    'acquisition':'clinical',
                                    'root':'Dataset',
                                    'task':'film'}

raw = mne_bids.read_raw_bids(bids_path=mne_bids.BIDSPath(**BIDS_Constant, suffix='ieeg', extension='.vhdr'))
raw.load_data()


eeg_data = raw_film.copy().pick(mne.pick_channels_regexp(raw.ch_names, regexp='AR[1-9]'))
eeg_data_interp = eeg_data.copy().interpolate_bads(reset_bads=False)

Error message:

RuntimeError: Digitization points dig_kinds=[4 (FIFFV_POINT_EXTRA), 3 (FIFFV_POINT_EEG)] not in head coordinates, contact mne-python developers

I had to edit your code snippet to get it to work. I did this:

import mne
import mne_bids
BIDS_Constant = {'subject':'01',
                 'session':'iemu',
                 'run':'1',
                 'datatype':'ieeg',
                 'acquisition':'clinical',
                 'root':'/data/ds003688',  # edited for my system
                 '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]')
#          โ†“โ†“โ†“ changed variable from raw_film to raw
eeg_data = raw.copy().pick(picks).load_data()  # delayed loading data until after picking
eeg_data_interp = eeg_data.copy().interpolate_bads(reset_bads=False)

and I get the same RuntimeError that you got. Can you open an issue on GitHub - mne-tools/mne-python: MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python please? Include my edited code snippet, and also this so that other devs can easily get the dataset downloaded for testing:

openneuro-py download --dataset=ds003688 --include=sub-01
1 Like

cross-ref to GitHub issue: Failure to interpolate bad channels ยท Issue #11331 ยท mne-tools/mne-python ยท GitHub

2 Likes