Skip to content

Commit 0a160a3

Browse files
authored
Merge branch 'main' into fix-issue-11267
2 parents 440215e + 8df70ae commit 0a160a3

File tree

9 files changed

+17
-5
lines changed

9 files changed

+17
-5
lines changed

.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`_.

doc/changes/devel/13286.bugfix.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fixed almost-white (barely visible) channel traces when using
2+
``spatial_colors=True`` in :meth:`mne.io.Raw.plot_psd`,
3+
:meth:`mne.Epochs.plot_psd`, and related PSD-plot helpers, by :newcontrib:`Mojackhak`.

doc/changes/names.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@
206206
.. _Milan Rybář: https://milanrybar.cz
207207
.. _Mingjian He: https://github.com/mh105
208208
.. _Mohammad Daneshzand: https://github.com/mdaneshzand
209+
.. _Mojackhak: https://github.com/Mojackhak
209210
.. _Moritz Gerster: https://github.com/moritz-gerster
210211
.. _Motofumi Fushimi: https://github.com/motofumi-fushimi/motofumi-fushimi.github.io
211212
.. _Nabil Alibou: https://github.com/nabilalibou

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")

mne/viz/evoked.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ def _rgb(x, y, z):
226226
rgb = np.array([x, y, z]).T
227227
rgb -= np.nanmin(rgb, 0)
228228
rgb /= np.maximum(np.nanmax(rgb, 0), 1e-16) # avoid div by zero
229+
# Reduce RGB intensity for overly light colors
230+
rgb[rgb.sum(axis=1) > 2.5] = rgb[rgb.sum(axis=1) > 2.5] - 0.3
229231
return rgb
230232

231233

tutorials/evoked/20_visualize_evoked.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Copyright the MNE-Python contributors.
1717

1818
# %%
19-
19+
# test
2020
import numpy as np
2121

2222
import mne

0 commit comments

Comments
 (0)