Skip to content

Commit

Permalink
BUG: Fix STC limit bug (mne-tools#8202)
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner authored and marsipu committed Oct 14, 2020
1 parent ce1649f commit 4d1c398
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions doc/changes/latest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ Bug

- Fix bug with :func:`mne.viz.plot_vector_source_estimates` using the PyVista backend with ``time_viewer=True`` when updating the arrow colormaps by `Eric Larson`_

- Fix bug with :func:`mne.viz.plot_vector_source_estimates` where ``clim='auto'`` and ``clim=dict(..., kind='percent')`` did not take into account the magnitude of the activation, by `Eric Larson`_

- The default plotting mode for :func:`mne.io.Raw.plot` and :ref:`mne browse_raw` has been changed to ``clipping=3.`` to facilitate data analysis with large deflections, by `Eric Larson`_

- PSD plots will now show non-data channels (e.g., ``misc``) if those channels are explicitly passed to ``picks``, by `Daniel McCloy`_.
Expand Down
2 changes: 1 addition & 1 deletion examples/inverse/plot_vector_mne_solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
It can also be instructive to visualize the actual dipole/activation locations
in 3D space in a glass brain, as opposed to activations imposed on an inflated
surface (as typically done in :meth:`mne.SourceEstimate.plot`), as it allows
you to get a better sense of the true underlying source geometry.
you to get a better sense of the underlying source geometry.
"""
# Author: Marijn van Vliet <w.m.vanvliet@gmail.com>
#
Expand Down
3 changes: 2 additions & 1 deletion mne/viz/_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,8 @@ def _plot_stc(stc, subject, surface, hemi, colormap, time_label,
time_label, times = _handle_time(time_label, time_unit, stc.times)

# convert control points to locations in colormap
mapdata = _process_clim(clim, colormap, transparent, stc.data,
use = stc.magnitude().data if vec else stc.data
mapdata = _process_clim(clim, colormap, transparent, use,
allow_pos_lims=not vec)

stc_surf, stc_vol, src_vol = _triage_stc(
Expand Down
4 changes: 3 additions & 1 deletion mne/viz/_brain/_brain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,9 @@ def _update_glyphs(self, hemi, vectors):
glyph_mapper = hemi_data['glyph_mapper']
if add:
glyph_actor = _create_actor(glyph_mapper)
glyph_actor.GetProperty().SetLineWidth(2.)
prop = glyph_actor.GetProperty()
prop.SetLineWidth(2.)
prop.SetOpacity(vector_alpha)
self._renderer.plotter.add_actor(glyph_actor)
hemi_data['glyph_actor'].append(glyph_actor)
else:
Expand Down
7 changes: 4 additions & 3 deletions tutorials/source-modeling/plot_visualize_stc.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
"""
.. _tut_viz_stcs:
Visualize source time courses
=============================
Visualize source time courses (stcs)
====================================
This tutorial focuses on visualization of stcs.
This tutorial focuses on visualization of
:term:`stcs <source estimates (abbr. stc)>`.
.. contents:: Table of Contents
:local:
Expand Down

0 comments on commit 4d1c398

Please sign in to comment.