-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
MRG: Recreate our helmet graphic #8116
Merged
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
083499e
WIP: Recreate our helmet
larsoner 277057f
Fix roll
GuillaumeFavelier 671abd8
Use https://github.com/mne-tools/mne-python/pull/7147\#issuecomment-5…
GuillaumeFavelier bd784b3
Change width slightly
GuillaumeFavelier 78b2016
Merge branch 'master' into field
GuillaumeFavelier b292071
Add polygon_offset parameter to surface()
GuillaumeFavelier 33ba0c2
Add polygon_offset parameter to mesh()
GuillaumeFavelier cead745
Use polygon_offset to resolve coincident topology
GuillaumeFavelier 535db6a
Fix contour()
GuillaumeFavelier d1d9aa2
Use lines instead of tubes
GuillaumeFavelier a1ce998
Fix pickable issue
GuillaumeFavelier 416bfd0
Merge branch 'master' into field
GuillaumeFavelier 1efefe4
Fix cropped helmet with pyvista
GuillaumeFavelier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
""" | ||
Plot the MNE brain and helmet | ||
============================= | ||
|
||
This tutorial shows how to make the MNE helmet + brain image. | ||
""" | ||
|
||
import os.path as op | ||
import mne | ||
|
||
sample_path = mne.datasets.sample.data_path() | ||
subjects_dir = op.join(sample_path, 'subjects') | ||
fname_evoked = op.join(sample_path, 'MEG', 'sample', 'sample_audvis-ave.fif') | ||
fname_inv = op.join(sample_path, 'MEG', 'sample', | ||
'sample_audvis-meg-oct-6-meg-inv.fif') | ||
fname_trans = op.join(sample_path, 'MEG', 'sample', | ||
'sample_audvis_raw-trans.fif') | ||
inv = mne.minimum_norm.read_inverse_operator(fname_inv) | ||
evoked = mne.read_evokeds(fname_evoked, baseline=(None, 0), | ||
proj=True, verbose=False, condition='Left Auditory') | ||
maps = mne.make_field_map(evoked, trans=fname_trans, ch_type='meg', | ||
subject='sample', subjects_dir=subjects_dir) | ||
time = 0.083 | ||
fig = mne.viz.create_3d_figure((256, 256)) | ||
mne.viz.plot_alignment( | ||
evoked.info, subject='sample', subjects_dir=subjects_dir, fig=fig, | ||
trans=fname_trans, meg='sensors', eeg=False, surfaces='pial', | ||
coord_frame='mri') | ||
evoked.plot_field(maps, time=time, fig=fig, time_label=None, vmax=5e-13) | ||
mne.viz.set_3d_view( | ||
fig, azimuth=40, elevation=87, focalpoint=(0., -0.01, 0.04), roll=-100, | ||
distance=0.45) |
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
21 was the mayavi default?
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.
yes, IIRC
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.
My bad, it's actually 10 but 21 was the default number of contours used in the function.
I will change that