From 33a8801723f4e248c19165c9ffd63ca7c5af314a Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Wed, 8 Nov 2023 13:35:12 -0500 Subject: [PATCH] BUG: Fix bug with default alpha and axes --- mne/viz/_3d.py | 2 +- mne/viz/backends/_pyvista.py | 2 +- tutorials/forward/20_source_alignment.py | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mne/viz/_3d.py b/mne/viz/_3d.py index 0063aa37bdd..41d6f0476b7 100644 --- a/mne/viz/_3d.py +++ b/mne/viz/_3d.py @@ -984,7 +984,7 @@ def _handle_sensor_types(meg, eeg, fnirs): fnirs=dict(channels="fnirs", pairs="fnirs_pairs"), ) sensor_alpha = { - key: 0.25 if key == "meg_helmet" else 0.8 + key: dict(meg_helmet=0.25, meg=0.25).get(key, 0.8) for ch_dict in alpha_map.values() for key in ch_dict.values() } diff --git a/mne/viz/backends/_pyvista.py b/mne/viz/backends/_pyvista.py index 1b4bfe6c37b..221672d9915 100644 --- a/mne/viz/backends/_pyvista.py +++ b/mne/viz/backends/_pyvista.py @@ -733,7 +733,7 @@ def quiver3d( mesh=mesh, color=color, opacity=opacity, - scalars=mesh_scalars, + scalars=mesh_scalars if colormap is not None else None, colormap=colormap, show_scalar_bar=False, backface_culling=backface_culling, diff --git a/tutorials/forward/20_source_alignment.py b/tutorials/forward/20_source_alignment.py index 292e5346415..83ad252bfda 100644 --- a/tutorials/forward/20_source_alignment.py +++ b/tutorials/forward/20_source_alignment.py @@ -66,8 +66,7 @@ # to their equivalent locations in another. The three main coordinate frames # are: # -# * :blue:`"meg"`: the coordinate frame for the physical locations of MEG -# sensors +# * :blue:`"meg"`: the coordinate frame for the physical locations of MEG sensors # * :gray:`"mri"`: the coordinate frame for MRI images, and scalp/skull/brain # surfaces derived from the MRI images # * :pink:`"head"`: the coordinate frame for digitized sensor locations and