Skip to content

Create canonical template channel locations #7472

Closed

Description

@cbrnr

Currently there are some issues with plotting montages, especially with those consisting of template locations (as opposed to realistic locations), see e.g. #7141 and #7455.

At the moment, MNE ships 24 montage files, and it is not obvious which of these contain template locations and which contain realistic locations. Moreover, among these montage files there are several files containing template locations, which is really confusing.

Ideally, there should be only one template containing all possible locations. This is something we have already discussed in #5269. Unfortunately, the discussion went into a different direction and the issue was closed without solving the original problem.

Therefore, I'd like to bring up this issue again. I suggest that we get rid of the various template location files and unify them in one central place. We could use a simple text file where we could also support multiple labels per location to accommodate different naming schemes. We could compute all locations with the tools provided by @sappelhoff, and we could either include his calculation tools or just the resulting text file in MNE.

Activity

  1. agramfort commented on Mar 18, 2020

    @agramfort
    SponsorMember
  2. cbrnr commented on Mar 18, 2020

    @cbrnr
    ContributorAuthor

    In my experience, topomaps are often used to visualize (channel-based) results. In such cases, it is more important that the maps look pretty (symmetrical), because exact locations are usually not available. This is what template locations are mainly used for.

    Most caps use some variation of the extended 10-20, 10-10 or 10-05 systems, which are all based on the same underlying subdivision of certain distances on a sphere. However, sometimes they use different names for the same locations. Therefore, I think having only one template with a large number of channels (e.g. 345 as @sappelhoff proposed) would be sufficient to create all kinds of different montages (if we allow for duplicate labels).

    Right now the whole montage system is rather messy. It is nice that there are some realistic montages, but there should be only one template montage as opposed to many (partially or completely) overlapping files.

  3. sappelhoff commented on Mar 18, 2020

    @sappelhoff
    Member

    Right now the whole montage system is rather messy. It is nice that there are some realistic montages, but there should be only one template montage as opposed to many (partially or completely) overlapping files.

    I agree.

    Some manufacturers (e.g., Biosemi) however do use their own system (not a standard), and thus the template positions of the 10-05 system do not apply.

  4. cbrnr commented on Mar 18, 2020

    @cbrnr
    ContributorAuthor

    Some manufacturers (e.g., Biosemi) however do use their own system (not a standard), and thus the template positions of the 10-05 system do not apply.

    True, but in this case we can have more than one template locations file if they are based on different divisions of the (spherical) head. Also, BioSemi does not exclusively use its own non-standard locations - we have a BioSemi system in our lab and our caps are standard 10-20 (basically what MNE already ships with the biosemi64 montage).

    Can you create BioSemi custom locations too?

  5. sappelhoff commented on Mar 18, 2020

    @sappelhoff
    Member

    Also, BioSemi does not exclusively use its own non-standard locations - we have a BioSemi system in our lab and our caps are standard 10-20 (basically what MNE already ships with the biosemi64 montage).

    Yes, they use 10-20 and what they call ABC (never used it)

    Can you create BioSemi custom locations too?

    generally yes (but not me personally right now), I don't know how straight forward it would be: you can download a speadsheet on https://www.biosemi.com/headcap.htm ... and in that spreadsheet you see the data for the positions. But you'd have to:

    • reverse engineer the algorithm to compute them OR
    • hope the biosemi customer service is cooperative

    🤔

  6. mmagnuski commented on Mar 18, 2020

    @mmagnuski
    Member

    I'm actually fine with the current state of affairs with respect to channel locations (apart from #7141). As long as these separate files correspond to channel locations shipped by the producer, I'm ok with duplication/overlap/inconsistencies.

  7. agramfort commented on Mar 18, 2020

    @agramfort
    SponsorMember
  8. cbrnr commented on Mar 18, 2020

    @cbrnr
    ContributorAuthor

    I didn't know that there is a separate Layout class. So isn't this already a separation between realistic (Montage) vs. template (Layout) locations? I don't quite understand the distinction, because it seems you can only assign a montage to a raw object but not a layout.

  9. cbrnr commented on Mar 18, 2020

    @cbrnr
    ContributorAuthor

    I'm actually fine with the current state of affairs with respect to channel locations (apart from #7141). As long as these separate files correspond to channel locations shipped by the producer, I'm ok with duplication/overlap/inconsistencies.

    Many/most people will be needing 10-20/10-10/10-05 locations, so I think it is confusing to have a selection of different manufacturer montages containing basically the same channels.

  10. larsoner commented on Mar 18, 2020

    @larsoner
    Member

    Layout is really only ever meant to be used with plot_topo, never shown in relationship to a head circle (because in general the geometry is incorrect / inconsistent). This has been discussed a lot over the last 3 years and this is what we settled on.

  11. agramfort commented on Mar 18, 2020

    @agramfort
    SponsorMember
  12. cbrnr commented on Mar 18, 2020

    @cbrnr
    ContributorAuthor

    OK, so we should basically always use montages.

  13. larsoner commented on Mar 18, 2020

    @larsoner
    Member

    Yeah that's the TL;DR :)

  14. cbrnr commented on Mar 18, 2020

    @cbrnr
    ContributorAuthor

    @sappelhoff how can I read your 10/10 TSV file? I tried mne.channels.read_custom_montage, but the format (extension) is not supported. I tried renaming to .txt, but then the function complains about missing fiducials.

  15. sappelhoff commented on Mar 18, 2020

    @sappelhoff
    Member

    It's not "MNE-READY", I always read it with pandas and I have my own simple plotting function to display the positions: https://github.com/sappelhoff/eeg_positions/blob/8d91d63c4996a81aabc24ea14dae51e8e1833ca9/eeg_positions/eeg_positions.py

    pull requests welcome. The main contribution of my repository is figuring out how manufacturers produce their "template" positions and having that algorithm as a python function: https://github.com/sappelhoff/eeg_positions/blob/8d91d63c4996a81aabc24ea14dae51e8e1833ca9/eeg_positions/utils.py#L10

    EDIT: for fiducials, you can check the assumptions I make:

    The left preauricular point = (-1, 0, 0) ... coincides with T9
    The right preauricular point = (1, 0, 0) ... coincides with T10
    The nasion = (0, 1, 0) ... coincides with Nz

    Adding these three points as fiducials (they would be duplicated with T9, T10, and Nz then) should be enough for MNE.

  16. 82 remaining items

  17. hoechenberger commented on Jun 15, 2022

    @hoechenberger
    Member

    But I do want to repeat my suggestion that we should alias "*_sphere" to "*".

    Oh, I believe I missed that before.

    So you're saying, a "sphere fit" is so common that the postfix should be omitted for montages fit on a sphere?

    So we could have names like:

    • 10-20 (fit on a sphere)
    • 10-20_fsaverage (fit on fsaverage)

    Is that what you're saying?

  18. cbrnr commented on Jun 15, 2022

    @cbrnr
    ContributorAuthor

    Exactly! But we have both 10-20 and 10-20_spherical (or 10-20_sphere) as aliases.

  19. hoechenberger commented on Jun 15, 2022

    @hoechenberger
    Member

    Exactly! But we have both 10-20 and 10-20_spherical (or 10-20_sphere) as aliases.

    I don't understand the aliases part

    So we'd have 3 entries for that montage?

    1. 10-20
    2. 10-20_spherical (alias of the previous one)
    3. 10-20_fsaverage

    Why would you want the alias?

  20. cbrnr commented on Jun 15, 2022

    @cbrnr
    ContributorAuthor

    Because my assumptions is that most people will use the montage to create a schematic plot (this is required in almost any publication). It's just nice to be able to do this with

    raw.set_montage("10-20")

    You can always be more specific though if you want!

  21. hoechenberger commented on Jun 15, 2022

    @hoechenberger
    Member

    I think I'd just not add the alias, then :) Only bound to create confusion

    And @agramfort would argue with the Zen of Python, I'm sure!! 😆

  22. mmagnuski commented on Jun 15, 2022

    @mmagnuski
    Member

    From my experience EEG sphere positions are very common. The idea @cbrnr puts forward is to use 10-20_sphere but make sure that if the user asks for "10-20" they would get 10-20_sphere.

  23. mmagnuski commented on Jun 15, 2022

    @mmagnuski
    Member

    oops, sorry, my browser was far behind in the discuasion

  24. mmagnuski commented on Jun 15, 2022

    @mmagnuski
    Member

    I think forcing people to make a conscious decision between sphere and a realistic positions is a good idea. Unless we don't provide a realistic montage for given name, but in such case it is still ok to make sure users know what kind of positions they have.

  25. cbrnr commented on Jun 15, 2022

    @cbrnr
    ContributorAuthor

    I don't know, if we state this in the documentation it is clear what "10-20" is, and it has the added benefit of being very short. When I talk about the 10–20 montage, that's exactly what I mean.

  26. hoechenberger commented on Jun 15, 2022

    @hoechenberger
    Member

    When I talk about the 10–20 montage, that's exactly what I mean.

    Yes, same.

    But that's when I talk about which electrode placement scheme I used. How my cap was designed.

    Now MNE offers to do source estimation, and as we figured, the spherical montages aren't a good choice for those.

    But I might never realize there's this caveat, because as soon as I see "10-20" I believe I'm good and stop reading. If there's an additional suffix, it will force me to stop and think for a while (and potentially read some more).

    This is the benefit I see when always adding a suffix.

  27. modified the milestones: 1.2, 1.3 on Sep 13, 2022
  28. removed this from the 1.3 milestone on Dec 8, 2022
  29. larsoner commented on May 22, 2026

    @larsoner
    Member

    Closing since I think this has been solved by eeg_positions and #13903

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions