use maxwell filter to interpolate bad channels

Hi, dear MNE-Python team,

I noticed that MNE maxwell filter removes the channels marked as ‘bad’ from the output. The alternative MEGIN maxfilter routine uses the power of the estimated model for the measured magnetic field to interpolate the broken channels. Such a repairment does not provide more information, of course, but it makes the preprocessed data set simpler to process during later stages, because all filtered files have a complete set of channels.

Why did you decide for the removal? Is there a way to let maxwell filter interpolate broken channels?

many thanks for your time and help,
cheers, Burkhard

@burkhardmaess it shouldn’t remove it, it should interpolate it as you say. For example:

>>> import mne
>>> raw = mne.io.read_raw_fif(mne.datasets.sample.data_path() / "MEG" / "sample" / "sample_audvis_raw.fif")
>>> raw.info["bads"]
['MEG 2443', 'EEG 053']
>>> raw_sss = mne.preprocessing.maxwell_filter(raw)
>>> raw_sss.info["bads"]
['EEG 053']
>>> raw.ch_names == raw_sss.ch_names
True
>>> raw_sss.get_data("MEG 2443").shape
(1, 166800)

If you have some code where it does get removed feel free to share, it’s probably a bug