-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MRG, BUG: Fix M/EEG topomap plotting #7066
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
|
That is indeed a lot of refactoring! Great work, I will test it during the weekend! |
|
Also I realized the most consistent API is to have a "sphere" argument allowing you to specify the origin and radius of the sphere. We have this elsewhere and I think in auto mode for digitized EEG locations it will look better. But feel free to test that things are fixed. The sphere functionality would be a superset of this functionality, and I don't think the defaults will change from what's there now (essentially 0, 0, 0 origin and 9.5cm radius). |
Codecov Report
@@ Coverage Diff @@
## master #7066 +/- ##
==========================================
- Coverage 89.74% 88.46% -1.29%
==========================================
Files 444 444
Lines 79229 79213 -16
Branches 12707 12676 -31
==========================================
- Hits 71107 70078 -1029
- Misses 5314 6340 +1026
+ Partials 2808 2795 -13 |
|
Here are the https://16870-1301584-gh.circle-artifacts.com/0/dev/index.html One There are several examples that are broken, though, so I'll fix those. I think it has to do with loading a |
|
Okay, docs built https://16891-1301584-gh.circle-artifacts.com/0/dev/index.html CIs happy other than a small problem with Travis that I just pushed a commit to fix |
|
this example looks a bit weird: |
|
BTW is extrapolate |
Even worse, I had some debugging cruft in there that made it always use |
|
Many many thanks for tackling this. A few comments:
note that I didn't come close to looking at all the tutorials or examples so don't consider this a thorough review. I can make time to do that if it's needed. |
|
also strangely this ERP plot is now flat, whereas it's not on master |
No electrodes have I don't aesthetically like this contraction, but it seems to be a more true depiction of the channel positions. Using
This is intentional. The idea is that:
Whatever old defaults there were should remain unchanged in this PR (that's the goal anyway!). What I did was that, regardless of which skirt you choose, it will always plot at least out to all the electrode positions. So for things like MEG sensors, even if you do
Fixed by commit I just pushed. It was actually unrelated to this PR, and had non-deterministic behavior. It seemed to have to do with doing
It would be helpful, even if you just opened each one and quickly flipped through to look to see if anything is obviously wrong. |
|
Updated full build: https://16912-1301584-gh.circle-artifacts.com/0/dev/index.html |
|
It looks as if the center of the head outline was not where the center of the of the circular aperture is. Because of this we see where the extrapolation box ends - it is not ocvered by the aperture. |
|
oops sorry I didn't mean to push directly to your branch @larsoner (though the changes are relevant to this PR) |
|
No problem, I was tweaking those a little bit so further adjustment is fine by me. In the meantime I'll look into the box-cutting-off-circle issue (I think @mmagnuski is right about the issue), hopefully that's the last one :) |
|
Okay, clipping should be fixed. Made code more DRY and modified a min/max check in the last commit I pushed to fix it. The Circle full build will currently fail because we need #7099 or some similar variant for it to succeed. Hopefully we can get one merged today and I'll rebase and force-push. @agramfort I trust you'll have free time over the weekend that you want to dedicate to looking through every example :) |
|
maybe this one is still broken https://16984-1301584-gh.circle-artifacts.com/0/dev/auto_examples/visualization/plot_evoked_arrowmap.html#sphx-glr-auto-examples-visualization-plot-evoked-arrowmap-py also the EEG topos now look weird on sample. I would like to know if it's still comparable topos to fieldtrip on the same data. @dengemann had spent a lot of time years ago to have the topomaps looking at fieldtrip results. |
|
See comment above, I think it's a more accurate representation of the 3D coordinates for sample. They are actually all 2cm or more above z=0 line. sphere='auto' is a better choice for actually digitized data (and it's better for sample), but it's not a good default because it behaves not so nicely for montages because it's affected by channel subsection in that case. |
|
thx @larsoner |
|
🎊 🚀 ! |
* MAINT: Refactor to route through _find * BUG: Fix plotting of sensors relative to head * FIX: Remove problematic workaround * FIX: Org * FIX: Comparison * ENH: Use sphere [circle full] * FIX: Units [circle full] * API: Cleaner deprecation [circle full] * FIX: Debugging cruft [ci skip] * FIX: Example * FIX: Eradicate layout [circle full] * FIX: Standardize [circle full] * FIX: Fix for Travis * BUG: Fix projs topomap [circle full] * FIX: Fix for sphere and draw [circle full] * FIX: Warning * revise sensor locations tutorial * fix crossref * FIX: Better min/max [circle full] * FIX: Fix default [circle full] * FIX: Test * FIX: Pass info [circle full] * FIX: Fix animation * FIX: Example * FIX: Example * DOC: Many fixes [circle full] * FIX: Fix for changed example [skip travis]
* MAINT: Refactor to route through _find * BUG: Fix plotting of sensors relative to head * FIX: Remove problematic workaround * FIX: Org * FIX: Comparison * ENH: Use sphere [circle full] * FIX: Units [circle full] * API: Cleaner deprecation [circle full] * FIX: Debugging cruft [ci skip] * FIX: Example * FIX: Eradicate layout [circle full] * FIX: Standardize [circle full] * FIX: Fix for Travis * BUG: Fix projs topomap [circle full] * FIX: Fix for sphere and draw [circle full] * FIX: Warning * revise sensor locations tutorial * fix crossref * FIX: Better min/max [circle full] * FIX: Fix default [circle full] * FIX: Test * FIX: Pass info [circle full] * FIX: Fix animation * FIX: Example * FIX: Example * DOC: Many fixes [circle full] * FIX: Fix for changed example [skip travis]



Closes #3987
Closes #4880
Closes #5190
Closes #5471
Closes #5472
Closes #6304
Todo:
plot_sensorsbe in physical coordinatestransforminmontage,outlines, ...sphererather thanhead_radiusfor consistency and flexibilitysetup_volume_source_spacefor consistencyinfo['dev_head_t']plot_topomap,plot_sensors,montage.plotexamples viacircle fullsetup_volume_source_spaceparam andlayoutdeprecation to API section oflatest.inccc @jona-sassenhagen @sappelhoff @cbrnr you might be interested in this plan.
After this, due to using physical units for the head, #5471 should be simpler.