-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Take units (m or mm) into account when showing fieldmaps on top of brains #13101
Conversation
windows pip-pre job: odd failure in test_search_light:
ubuntu conda 3.12 had a segfault during |
Ugh probably some |
There was a problem hiding this 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...)
Thanks for the great debugging @larsoner! |
Plotting evoked fieldlines on top of distributed source estimates is very cool:
But,
mne.viz.Brain
can use eitherunits="m"
orunits="mm"
. Theplot_evoked_field
function 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.