diff --git a/docs/source/v1.5.md.inc b/docs/source/v1.5.md.inc index 1213193f8..eebf44a0e 100644 --- a/docs/source/v1.5.md.inc +++ b/docs/source/v1.5.md.inc @@ -24,6 +24,7 @@ - Ensure `memory_file_method = "hash"` is tested (#768 by @larsoner) - Enable [pre-commit.ci](https://pre-commit.ci) (#774 by @larsoner) - Use `pooch` for web downloads (#775 by @larsoner) +- Ensure compatibility with MNE-Python 1.6 (#800 by @hoechenberger) ### :bug: Bug fixes diff --git a/mne_bids_pipeline/_import_data.py b/mne_bids_pipeline/_import_data.py index 9782f1fea..ca52c59e1 100644 --- a/mne_bids_pipeline/_import_data.py +++ b/mne_bids_pipeline/_import_data.py @@ -449,7 +449,7 @@ def import_er_data( cfg=cfg, bids_path_bads=bids_path_er_bads_in, ) - raw_er.pick_types(meg=True, exclude=[]) + raw_er.pick("meg", exclude=[]) # Don't deal with ref for now (initial data quality / auto bad step) if bids_path_ref_in is None: diff --git a/mne_bids_pipeline/steps/sensor/_05_decoding_csp.py b/mne_bids_pipeline/steps/sensor/_05_decoding_csp.py index 14087fba7..09a124224 100644 --- a/mne_bids_pipeline/steps/sensor/_05_decoding_csp.py +++ b/mne_bids_pipeline/steps/sensor/_05_decoding_csp.py @@ -81,15 +81,12 @@ def prepare_epochs_and_y( *, epochs: mne.BaseEpochs, contrast: Tuple[str, str], cfg, fmin: float, fmax: float ) -> Tuple[mne.BaseEpochs, np.ndarray]: """Band-pass between, sub-select the desired epochs, and prepare y.""" - epochs_filt = epochs.copy().pick_types( - meg=True, - eeg=True, - ) + epochs_filt = epochs.copy().pick(["meg", "eeg"]) # We only take mag to speed up computation # because the information is redundant between grad and mag if cfg.datatype == "meg" and cfg.use_maxwell_filter: - epochs_filt.pick_types(meg="mag") + epochs_filt.pick("mag") # filtering out the conditions we are not interested in, to ensure here we # have a valid partition between the condition of the contrast.