Skip to content
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

[BUG, MRG] Don't modify info in place for transform points #11612

Merged
merged 3 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes/latest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Bugs
- Fix bug in :func:`mne.export.export_raw` when exporting to EDF with a physical range set smaller than the data range (:gh:`11569` by `Mathieu Scheltienne`_)
- Fix bug in :func:`mne.concatenate_raws` where two raws could not be merged if the order of the bad channel lists did not match (:gh:`11502` by `Moritz Gerster`_)
- Fix bug where :meth:`mne.Evoked.plot_topomap` opened an extra figure (:gh:`11607` by `Alex Rockhill`_)
- Fix bug where :func:`mne.transforms.apply_volume_registration_points` modified info in place (:gh:`11612` by `Alex Rockhill`_)


API changes
Expand Down
5 changes: 3 additions & 2 deletions mne/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1911,6 +1911,7 @@ def apply_volume_registration_points(info, trans, moving, static, reg_affine,
montage2 = make_dig_montage(**montage_kwargs)

trans2 = compute_native_head_t(montage2)
info.set_montage(montage2) # converts to head coordinates
info2 = info.copy()
info2.set_montage(montage2) # converts to head coordinates

return info, trans2
return info2, trans2