MNE Version 1.5.0
Windows 10
Spyder (MNE)
Issue: The interpolate_bads function is not being recognized as I follow along the “Handling bad channels” page of the MNE documentation. Here is the code that I pulled from it to use in my project and this is the error I get.
I am using bdf files and am loading them in.
By “not being recognized”, I mean that it is not showing up as a built in function when I type the “.inter…”.
Code:
import numpy as np
import pandas as pd
import seaborn as sns
from copy import deepcopy
import matplotlib.pyplot as plt
import mne as mne
from mne.io import read_raw
import os
import os.path as op
import psutil
p01_raw.info["bads"].extend(["P9", "Fp2", "AFz", "F4", "F6",
"F8", "FT8", "PO4"])
p01_events = mne.find_events(p01_raw, verbose=True)
# Interpolate
p01_data = p01_raw.copy().pick_types(eeg=True, exclude=[])
p01_data_interp = p01_data.copy().interpolate_bads(reset_bads = False)
Error:
RuntimeError: Cannot fit headshape without digitization , info["dig"] is None