Adding interactive plotting of magnetic field lines to Brain#11676
Adding interactive plotting of magnetic field lines to Brain#11676wmvanvliet wants to merge 6 commits intomne-tools:mainfrom
Conversation
|
Looks nice! This is definitely something that I've missed from A few high level thoughts/ideas offhand:
Even if (3) seems like a better way of accomplishing this (and it might not!) then it doesn't necessarily have to stand in the way of this PR. But if you were motivated to work on getting the event system started... :) |
|
(3) sounds like the way to go if we want to add even more capabilities to |
Agreed. I think an event system could make it much easier to provide xfit-like interactive dipole fitting for example... Should we start building an event system to allow this sort of stuff (maybe over the next month or so?), then see if we can get the equivalent functionality of this PR, or would you rather get some version of this PR in as is? I don't want to make perfect the enemy of good here, what you have is already cool and usable! |
|
See #11678 |
|
Closing for now. I'll re-implement this when the ui-event system is operational. |
Picking up from #8382 from way back, I've been working on a supercharged version of
mne.viz.plot_evoked_fieldthat uses our interactiveBrainplotting object. Check it out:The API for this is a new
add_field()method for theBrainobject:The above plot is a bit busy though. I find things are easier to interpret when we skip the EEG field patterns and we also don't plot the field density "blobs", just the contour lines:
The above is achieved by passing
ch_type='meg'tomne.make_field_mapandshow_density=FalsetoBrain.add_field, andbackground=whitetostc.plot.Screenshot of the GUI, notice the "Field strength" section in the dock:
Example: Fixes #8382
Todo:
Brain.add_field[ ] Find a way to plot just the field lines without an MRI[ ] Makehemi='split'work[ ] Refactor oldmne.viz.plot_evoked_fieldfunction