Skip to content

ENH: plot_topo layout creation #3987

Closed

Description

@larsoner

It seems like we keep hitting issues with topo scaling confusing people. I think we probably shouldn't change where (0., 0., 0.) is in any given channel layout, and instead ensure that our internal layouts are actually in head coordinates. I wonder if we could also just assume a head is e.g. 90 cm. That would make subselections of electrodes appear correct. A normalize=True (default) | False argument in functions that do such topologies could do it.

@jaeilepp WDYT?

Activity

  1. jaeilepp commented on Feb 14, 2017

    @jaeilepp
    Contributor

    Yeah, that sounds like a good idea. I was already experimenting with this, but it seems that _check_outlines may require some tweaking to make it work well with topomaps.

  2. larsoner commented on Feb 14, 2017

    @larsoner
    MemberAuthor

    This would fix #3814

  3. jaeilepp commented on Feb 22, 2017

    @jaeilepp
    Contributor

    I'm thinking that maybe the head coordinates should only apply when the layout is custom made. After all, the locations are only used in layout plots and they're not actual sensor locations. I noticed that vectorview locations for instance are not centered to 0. So some kind of adjustment would be needed anyway.
    legend

  4. agramfort commented on Feb 22, 2017

    @agramfort
    SponsorMember
  5. larsoner commented on Feb 22, 2017

    @larsoner
    MemberAuthor
  6. jaeilepp commented on Feb 22, 2017

    @jaeilepp
    Contributor

    Why would it go away? These are just the sensor locations from the layout file.

  7. larsoner commented on Feb 22, 2017

    @larsoner
    MemberAuthor
  8. jaeilepp commented on Feb 22, 2017

    @jaeilepp
    Contributor

    But these are static locations from the layout file. Why would it help to transform them?

  9. larsoner commented on Feb 22, 2017

    @larsoner
    MemberAuthor

    If we are plotting sensors on top of a head, it would be best to plot the sensors with the same (or at
    least similar) geometrical relationship they actually had with the head during the recording. For MEG sensors this means using dev_head_t to get them to head coordinates.

  10. larsoner commented on Feb 22, 2017

    @larsoner
    MemberAuthor

    ... so maybe not for plot_topo (and even then I'm not sure), but for plot_topomap it seems like we should always do things in head coordinates. Concretely the proposal would be:

    1. Convert MEG sensors to head coords
    2. Assume (0, 0, 0) is meaningful: don't re-center
    3. Assume the head is about 90cm in diameter: don't rescale sensor positions
    4. Any built-in EEG layouts that don't give "sensor locations in head coordinates" should be put through a function that effectively makes them be in head coordinates

    This will give us much more realistic geometry than our current procedure, which is just to center based on extrema and scale everything to hit the boundaries.

  11. jaeilepp commented on Mar 2, 2017

    @jaeilepp
    Contributor

    Any built-in EEG layouts that don't give "sensor locations in head coordinates" should be put through a function that effectively makes them be in head coordinates

    Even some of our built-in MEG layouts don't give head coordinates (like KIT-AD). I'm not sure it's worth the effort to change this. After all, in most cases our layouts work fine and the change would require overhaul of all the plotting functions that use layouts. Also, topomaps use layouts so it might be dangerous to change this.

  12. larsoner commented on Mar 2, 2017

    @larsoner
    MemberAuthor
  13. jaeilepp commented on Mar 2, 2017

    @jaeilepp
    Contributor

    The layouts should still be used at least for topo-plots since the sensor triplets have identical positions.

  14. larsoner commented on Mar 2, 2017

    @larsoner
    MemberAuthor

    Ahh right. Forgot about that :)

    And I guess there is some logic to the "unwrapping" transformation we normally do, since it's just one way (of many possibilities) to do a projection of spherical data.

    Maybe just disabling norm and/or centering is enough

  15. added this to the 0.15 milestone on Apr 18, 2017
  16. 12 remaining items

  17. modified the milestones: 0.16, 0.17 on Apr 5, 2018
  18. larsoner commented on Apr 5, 2018

    @larsoner
    MemberAuthor

    I don't see this as a blocker for 0.16 and whatever solution we come up with should be tested thoroughly, so moving to 0.17

  19. larsoner commented on Aug 25, 2018

    @larsoner
    MemberAuthor

    Superceded by #5472 and #5471

  20. larsoner commented on May 6, 2019

    @larsoner
    MemberAuthor

    Not fixed yet, so reopening

  21. modified the milestones: 0.17, 0.18 on May 6, 2019
  22. modified the milestones: 0.18, 0.19 on May 16, 2019
  23. self-assigned this
    on May 27, 2019
  24. modified the milestones: 0.19, 0.20 on Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions