Skip to content

Conversation

@wmvanvliet
Copy link
Contributor

@wmvanvliet wmvanvliet commented Feb 4, 2025

Plotting evoked fieldlines on top of distributed source estimates is very cool:

image

But, mne.viz.Brain can use either units="m" or units="mm". The plot_evoked_field function always assumed it would be kept at the default units="mm". This PR makes it actually pay attention to the unit. Another bug fixed is that when plotting in millimeters, the helmet surface would be modified in place: surf["rr"] *= 1000. This causes trouble as now the surface will forever be upscaled and should you plot it again, it will be upscaled again. In this PR a deepcopy() is made first.

@drammock
Copy link
Member

drammock commented Feb 4, 2025

windows pip-pre job: odd failure in test_search_light:

mne/decoding/tests/test_search_light.py::test_search_light_basic ERROR   [ 21%]
C:\hostedtoolcache\windows\Python\3.12.8\x64\Lib\site-packages\pyarrow\compute.py:211: RuntimeWarning: Python binding for RankQuantileOptions not exposed
  warnings.warn("Python binding for {} not exposed"
C:\hostedtoolcache\windows\Python\3.12.8\x64\Lib\site-packages\pyarrow\compute.py:211: RuntimeWarning: Python binding for RankQuantileOptions not exposed
  warnings.warn("Python binding for {} not exposed"

ubuntu conda 3.12 had a segfault during test_3d.py, not sure if related.

@larsoner
Copy link
Member

larsoner commented Feb 4, 2025

windows pip-pre job: odd failure in test_search_light:

Ugh probably some sklearn thing, I'll push a quick ignore

Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking for merge-when-green, thanks in advance @wmvanvliet

(I think the conda segfault is unrelated, I think we just get those sometimes but we'll see...)

@larsoner larsoner enabled auto-merge (squash) February 4, 2025 18:06
@larsoner larsoner merged commit afd69af into mne-tools:main Feb 5, 2025
30 checks passed
@wmvanvliet
Copy link
Contributor Author

wmvanvliet commented Feb 6, 2025

Thanks for the great debugging @larsoner!

larsoner added a commit to larsoner/mne-python that referenced this pull request Feb 11, 2025
* upstream/main:
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13110)
  ENH: add interpolate_to method (mne-tools#13044)
  add overwrite and verbose params to info.save (mne-tools#13107)
  Add support for n-dimensional arrays in `_tfr_from_mt` (mne-tools#13104)
  Skip first "New Segment" BrainVision marker (mne-tools#13100)
  MAINT: Use statsmodels pre and fix CircleCI (mne-tools#13106)
  Take units (m or mm) into account when showing fieldmaps on top of brains (mne-tools#13101)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13099)
  MAINT: Update code credit (mne-tools#13093)
  Fix EEGLAB import (nodatchans) (mne-tools#13097)
  MAINT: Fix CircleCI [circle deploy] (mne-tools#13089)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13088)
  Fix signature of some more _close() methods [circle deploy] (mne-tools#13087)
  Fix _close() on MNEAnnotationsFigure and MNESelectionFigure [circle deploy] (mne-tools#13086)
  BUG: Fix bug with Mesa 3D detection (mne-tools#13082)
@wmvanvliet wmvanvliet deleted the evoked-field-units branch August 30, 2025 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants