-
Notifications
You must be signed in to change notification settings - Fork 0
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
Option to plot locations of significant channels in expression_plots #209
Option to plot locations of significant channels in expression_plots #209
Conversation
…figure-alongside-expression-plots
@neukym I'm beginning by working on plotting hexel locations: sensor topomaps can come later. I've got the general function written, I think, but I'm having a problem getting mne to actually plot the image. My approach is to construct a fake To do this I'm using stc = SourceEstimate(...)
minimap_axis.imshow(stc.plot(hemi="split", colormap=colormap).to_image()) (see here) However mne is giving me an error:
Does mne really need actual files on disk to plot data on a brain picture? If so, is there a different package we could use? |
…de-expression-plots # Conflicts: # tests/test_plotting.py
Ah, darn... Yes, mne assumes (for some of its functions involving meshes) that you have freesurfer installed and the SUBJECTS_DIR directory (where freesurfer outputs its meshes, including the fsaverage one) is set so it knows where to find these meshes. perhaps we can set it with os.environ["SUBJECTS_DIR"] = config['dataset_directory_name'] / config['mri_structurals_directory']`? |
also fixes bug in _hexel_minimap_data
I got the above plot by hard-coding the location for the structural data and the participant name - but my commit does a rough job of correcting for this and you might have to do some more changes before it will work for you. |
…de-expression-plots
2702724
to
b374d78
Compare
…de-expression-plots
…de-expression-plots
(view is not correct yet)
No problem - I'll fix this separately over the weekend. |
d634578
to
18f614d
Compare
18f614d
to
224e04d
Compare
…, because it's more impressive in the default lateral view.
This looks good - can we chat about it next week though as I want to check some things with you. |
…de-expression-plots # Conflicts: # demos/demo_plotting.ipynb # kymata/config/dataset3.yaml # kymata/datasets/sample.py # kymata/plot/plot.py
Current bug in pycharm where when not plotting in tools window, the plot isn't created. When plotting in the tools window, it works. |
Also works when stepping through |
Works when debugging!!?? |
8c7793e
to
2f5dcc9
Compare
Fixed. |
Looks good. Merging. |
This adds a new
minimap: bool
argument toexpression_plot()
. PassTrue
to plot the locations of the significant hexels.This PR is for a simple case of plotting function-coloured dots for hexels which are above threshold.
Details
minimap_view: str
argument which changes the view (see mne docs for allowed values).minimap_surface: str
argument to change the surface (see mne docs for allowed values).minimap=True
plotting argument, it will download thefsaverage
surfaces usingmne
(this only needs to be done once).Example
Notes
main
prior to this PR: Expression plot legends can spill off the end of the image #215