-
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
WIP: Add plot method to digitization #6412
Conversation
For so small modifications, I'm surprised to have such a strange error: |
mne/digitization/base.py
Outdated
meg=None, eeg='original', | ||
dig=False, ecog=True, src=None, mri_fiducials=False, | ||
bem=None, seeg=True, show_axes=False, fig=None, | ||
interaction='trackball', verbose=None): |
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.
@GuillaumeFavelier if you require all the same things as plot_alignment then I don't see the point.
dig.plot() should just work.
or if you wnat to couple with a subject:
dig.plot(trans, subject, subjects_dir)
Codecov Report
@@ Coverage Diff @@
## master #6412 +/- ##
==========================================
- Coverage 89.27% 89.26% -0.01%
==========================================
Files 411 411
Lines 74477 74480 +3
Branches 12312 12312
==========================================
- Hits 66487 66485 -2
- Misses 5133 5137 +4
- Partials 2857 2858 +1 |
mne/digitization/base.py
Outdated
|
||
Parameters | ||
---------- | ||
trans : str | 'auto' | dict | None |
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.
docstring does not cover the "auto" and "dict" usage. Also this docstring should be made
a template in doc.py to be shared among functions that need a trans param
Is the docstring better now @agramfort ? |
@@ -103,3 +103,29 @@ def __eq__(self, other): # noqa: D105 | |||
return False | |||
else: | |||
return all([ss == oo for ss, oo in zip(self, other)]) | |||
|
|||
def plot(self, trans=None, subject=None, subjects_dir=None): | |||
"""Plot head, sensor, and source space alignment in 3D. |
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.
this is no source space here.
please also add a tiny test
is None, an identity matrix is assumed. | ||
subject : str | None | ||
The subject name corresponding to FreeSurfer environment | ||
variable SUBJECT. Can be omitted if ``src`` is provided. |
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.
src is not an option here.
this can be closed as DigMontage plot should rather be improved. |
Reference issue
Fixes #6411.
What does this implement/fix?
Reuse the
plot_alignment()
function in theplot()
method of theDigitization
class.