-
Notifications
You must be signed in to change notification settings - Fork 90
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] Fix ACPC Coordinates in surface RAS when they should be in scanner RAS #990
Conversation
I'm wondering if this shouldn't better be implemented as methods of DigMontage upstream in MNE? What am I missing? |
Yes, that would be nice if they were but then we'd have to require the development version of MNE. I can do a PR now to add to MNE-Python and then we can change it next MNE-Python release. EDIT: I looked into it and |
@larsoner If you have a few minutes, could you please share your thoughts on this one? |
Codecov Report
@@ Coverage Diff @@
## main #990 +/- ##
==========================================
+ Coverage 95.07% 95.11% +0.04%
==========================================
Files 25 25
Lines 3713 3744 +31
==========================================
+ Hits 3530 3561 +31
Misses 183 183
Continue to review full report at Codecov.
|
LGTM? |
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.
I would also 1) avoid the scale
stuff by being careful about units, instead, and either way 2) use combine_transforms
and apply once. But the given approach seems okay as is so +1 for merge after fixing the test collection bloat issue
Yes to avoid the scale you have to either:
At least I think this is the case, feel free to try it... |
Looks like it worked pretty much like you said. |
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.
LGTM +1 for merge
Thanks @alexrockhill! |
Fixes #989.
It's a bit inelegant but I encapsulated the ugly parts behind helper functions. MNE uses m and surface RAS and nibabel/BIDS uses mm (generally) and scanner RAS which makes a lot of headaches. I think this is about as clean as possible but let me know if there are things that should be fixed. This is a pretty high priority also because
main
is wrong will cause incorrectly formatted datasets.