-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[MRG, ENH] Find aseg labels near montage #9545
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
Conversation
|
@larsoner, I think it might be best to change the default back to |
|
This is ready for review too, but this PR has to merge first mne-tools/mne-misc-data#9 |
|
Even after fetch_fsaverage is called? We can also update the sample dataset pretty easily, so I wouldn't let it be a limiting factor |
Yes but good to know, maybe we should update that then |
|
This also updates the seeg tutorial which was out-of-date because of the new data format |
I just did so |
larsoner
left a comment
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.
Can anything be refactored with mne.label.find_pos_in_annot?
I didn't see that one, yeah looks like it. I think it might have to be refactored to accept multiple positions though since you wouldn't want to be loading the aseg file over and over. |
Yep, mine must have just been way out-of-date. |
|
Ok so I changed one thing that I was very unsure about: Other than that, I tried to refactor to use the function but realized after doing so that it actually would be really inefficient because each channel of the montage is looped over so the aseg would have to be loaded in every time to use that function. I did refactor a bit into a If all that is okay, should be good to go. |
Agreed this naming is better, I'll look at the refactoring now |
|
Actually I'll wait until #9544 is merged and this is rebased, feel free to ping me once that's done @alexrockhill |
I took that part out and put it in a separate PR, this should be good to go as well after I rebase |
The refactoring PR should be merged first, then, right? |
They are actually independent/use the exact same |
to show Eric revert all Brain API changes, for another PR in progress pare down in progress in progress in progress work in progress but conceptually finished forgot to use the aseg wip wip working version with cool visualization, I think fix tests fix gallery number fix tests use circular layout forgot parens keep channel order, convert to OrderedDict change default fix default wip refactored label, cleaned up ordering of plot, shared some code fix doc fix name error wip remove aseg refactoring shared from label forgot to remove one more refactoring more fixes
|
Looks good to merge by me! |
|
Thanks @alexrockhill ! |
* upstream/main: [MRG, ENH] Find aseg labels near montage (mne-tools#9545) Add label to colorbar in GAT plot [skip actions] (mne-tools#9582) [ENH, MRG] Encapsulate warp elec image in function (mne-tools#9544) [DOC, MRG] Add "info" to `docdict` (mne-tools#9574) [MRG] Add `units` parameter to get_data for Evoked (mne-tools#9578) [MRG, ENH] Get annotation description from snirf stim name (mne-tools#9575) [MRG] ENH, FIX: Add tmin/tmax parameters to get_data methods, fix bug in find_bads_ecg (mne-tools#9556)
|
@alexrockhill The doc build failed on this PR, and it looks related, see https://app.circleci.com/pipelines/github/mne-tools/mne-python/9131/workflows/e0f6c14c-27ff-43dd-90c2-939a03863e81/jobs/31255 |
|
@alexrockhill can you add a fix to #9540 ? I think that's very close to merge |
Sure right on it |


The idea here is to find which voxels are nearby an electrode contact in order to know which surfaces to plot and for analysis.
This shares internal functions with #9544 and is a good reason to make
mne.surfaces._find_voxel_neighborsprivate so that it can be used in both scenarios without confusion and user-facing function.