Take units (m or mm) into account when showing fieldmaps on top of brains#13101
Merged
larsoner merged 13 commits intomne-tools:mainfrom Feb 5, 2025
Merged
Take units (m or mm) into account when showing fieldmaps on top of brains#13101larsoner merged 13 commits intomne-tools:mainfrom
larsoner merged 13 commits intomne-tools:mainfrom
Conversation
Member
|
windows pip-pre job: odd failure in test_search_light: ubuntu conda 3.12 had a segfault during |
Member
Ugh probably some |
larsoner
approved these changes
Feb 4, 2025
Member
larsoner
left a comment
There was a problem hiding this comment.
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
reviewed
Feb 4, 2025
Contributor
Author
|
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plotting evoked fieldlines on top of distributed source estimates is very cool:
But,
mne.viz.Braincan use eitherunits="m"orunits="mm". Theplot_evoked_fieldfunction always assumed it would be kept at the defaultunits="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 adeepcopy()is made first.