You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
disclairmer neither me or @larsoner or @massich with who I did most of the
refactoring of DigMontage
have strong experience with EEG data requiring a template. The history is
that we took files from fieldtrip
and aimed at offering the same options with MNE. Ideally we should as well
or better than fieldtrip or eeglab
with little effort. Now I don't have any strong opinion of how to achieve
this. I just have the impression that
depending of eeg system it's easier to have a file per EEG cap. my 2c
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.
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.
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).
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)
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.
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.
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.
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.
@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.
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.
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!
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.
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.
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.
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.
Activity
agramfort commentedon Mar 18, 2020
cbrnr commentedon Mar 18, 2020
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.
sappelhoff commentedon Mar 18, 2020
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.
cbrnr commentedon Mar 18, 2020
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
biosemi64montage).Can you create BioSemi custom locations too?
sappelhoff commentedon Mar 18, 2020
Yes, they use 10-20 and what they call
ABC(never used it)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:
🤔
mmagnuski commentedon Mar 18, 2020
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.
agramfort commentedon Mar 18, 2020
cbrnr commentedon Mar 18, 2020
I didn't know that there is a separate
Layoutclass. 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 arawobject but not a layout.cbrnr commentedon Mar 18, 2020
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.
larsoner commentedon Mar 18, 2020
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.agramfort commentedon Mar 18, 2020
cbrnr commentedon Mar 18, 2020
OK, so we should basically always use montages.
larsoner commentedon Mar 18, 2020
Yeah that's the TL;DR :)
cbrnr commentedon Mar 18, 2020
@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.sappelhoff commentedon Mar 18, 2020
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:
Adding these three points as fiducials (they would be duplicated with T9, T10, and Nz then) should be enough for MNE.
82 remaining items
hoechenberger commentedon Jun 15, 2022
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 onfsaverage)Is that what you're saying?
cbrnr commentedon Jun 15, 2022
Exactly! But we have both
10-20and10-20_spherical(or10-20_sphere) as aliases.hoechenberger commentedon Jun 15, 2022
I don't understand the aliases part
So we'd have 3 entries for that montage?
10-2010-20_spherical(alias of the previous one)10-20_fsaverageWhy would you want the alias?
cbrnr commentedon Jun 15, 2022
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
You can always be more specific though if you want!
hoechenberger commentedon Jun 15, 2022
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!! 😆
mmagnuski commentedon Jun 15, 2022
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.
mmagnuski commentedon Jun 15, 2022
oops, sorry, my browser was far behind in the discuasion
mmagnuski commentedon Jun 15, 2022
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.
cbrnr commentedon Jun 15, 2022
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.hoechenberger commentedon Jun 15, 2022
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.
larsoner commentedon May 22, 2026
Closing since I think this has been solved by
eeg_positionsand #13903