Skip to content

Commit 99d297e

Browse files
committed
Merge remote-tracking branch 'upstream/main' into base-GED
2 parents 6bbc459 + ed69487 commit 99d297e

5 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
- run: pip install --upgrade towncrier pygithub gitpython numpy
2222
- run: python ./.github/actions/rename_towncrier/rename_towncrier.py
2323
- run: python ./tools/dev/ensure_headers.py
24-
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef
24+
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
# Ruff mne
33
- repo: https://github.com/astral-sh/ruff-pre-commit
4-
rev: v0.11.12
4+
rev: v0.11.13
55
hooks:
66
- id: ruff
77
name: ruff lint mne

doc/changes/devel/13280.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed bug where :func:`mne.preprocessing.maxwell_filter_prepare_emptyroom` would not reliably identify meg channel types for matching bads across emptyroom and task, by `Harrison Ritz`_.

mne/preprocessing/maxwell.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,12 @@ def maxwell_filter_prepare_emptyroom(
172172
elif bads == "keep":
173173
bads = raw_er_prepared.info["bads"]
174174

175-
bads = [ch_name for ch_name in bads if ch_name.startswith("MEG")]
175+
# Filter to only include MEG channels
176+
meg_ch_names = [
177+
raw_er_prepared.ch_names[pick]
178+
for pick in pick_types(raw_er_prepared.info, meg=True, exclude=[])
179+
]
180+
bads = [ch_name for ch_name in bads if ch_name in meg_ch_names]
176181
raw_er_prepared.info["bads"] = bads
177182

178183
# handle dev_head_t

mne/preprocessing/tests/test_fine_cal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def test_fine_cal_systems(system, tmp_path):
231231
err_limit = 12600
232232
n_ref = 28
233233
corrs = (0.19, 0.41, 0.49)
234-
sfs = [0.5, 0.7, 0.9, 1.55]
234+
sfs = [0.5, 0.7, 0.9, 1.65]
235235
corr_tol = 0.55
236236
elif system == "fil":
237237
raw = read_raw_fil(fil_fname, verbose="error")

0 commit comments

Comments
 (0)