Skip to content

Default standard_1020 montage contains realistic, not template positions #7141

Closed

Description

@hekolk

Describe the bug

On the current master (i.e., after #7066) frontal EEG channels are drawn outside of the head in topoplots.

Steps to reproduce

The simplest variant is probably
mne.viz.plot_montage(mne.channels.make_standard_montage('standard_1020'))
Naturally it also occurs in plot_topomap and is particularly suboptimal for outline='head' and extrapolate='head'.

Expected results

I would expect the head circumference to intersect the positions of the outer AF, F, FT, ... PO, O electrodes. This would match previous behavior and common plots (e.g., the 10-05 paper http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.116.7379&rep=rep1&type=pdf or https://github.com/sappelhoff/eeg_positions).

Actual results

image

Hence, the head seems to be shifted vertically (T9 and T10 are also not vertically centered with respect to the ears).

Additionally, the comment in the extrapolation snippet https://mne.tools/dev/auto_examples/visualization/plot_evoked_topomap.html suggests that changing the sphere diameter has an influence, but it didn't result in any changes for me.

Activity

  1. agramfort commented on Dec 13, 2019

    @agramfort
    SponsorMember
  2. larsoner commented on Dec 13, 2019

    @larsoner
    Member

    This is because we plot in head coordinates now, and when we change to head coords it shifts the positions. In theory if you shift the sphere center to the opposite of this shift, it should fix the problem.

    It looks like T9/T10/ are not the same as LPA/RPA. And looking at the file:

    https://github.com/mne-tools/mne-python/blob/master/mne/channels/data/montages/standard_1020.elc

    The LPA is at -86.0761 -19.9897 -47.9860 and T9 is at -85.8941 -15.8287 -48.2830. This contradicts what @sappelhoff's site says:

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

    So this does not agree with our standard_1020.elc. Not sure if our elc is wrong, or what.

    Additionally, the comment in the extrapolation snippet

    Yes this is wrong, it should say that changing the head center will influence things.

  3. hekolk commented on Dec 16, 2019

    @hekolk
    ContributorAuthor

    So the values in standard_1020.elc seem to be identical to the "realistic" ones in Robert Oostenveld's blog (https://robertoostenveld.nl/electrode/) :

    I have also made a computation of all the electrode locations on a reallistical head surface, based on the distances along the (triangulated) surface of the head. The head surface used was constructed from the canonical MRI that is included in the SPM2 package, and locations are expressed in MNI coordinates.

    The coordinates can be found at: https://robertoostenveld.nl/electrodes/realistic_1005.txt
    For the y coordinates, the absolute values of the maximum (0.0845, Nz) and minimum (-0.113, Iz) differ which might cause the problem if some normalization/centering is performed in the code.

    There are also spherical versions The first version (“sphere1”) assumes Fpz, Oz, T7 and T9 to be on the poles of the sphere. The location of Nz, Iz, LPA and RPA is subsequently determined according to the following: Oz is at the equator, Cz is at the north-pole. The difference between them is 90 degrees or pi/2 along the surface of the unit sphere. The distance between each of Cz-CPz-Pz-POz-Oz is equal and is 22.5 degree (note that Pz is at 45 degrees from the north-pole). The distance between Iz and Oz is equal to the other distances, therefore Iz is at 22.5 below the equator. Using this, the coordinates of Iz can be computed using the sin() and cos() of 22.5 degrees. The other “fiducial” points have similar coordinates. The Z value for the whole fiducial points contour is -sin(22.5)=-0.3827.

    In the second version (“sphere2”) I have tried to mimic the electrode locations that are used in BESA as close as possible. Compared to the “sphere1” version described above, the electrodes are all shifted to slightly lower locations.

    For a spherical head description, LPA and T9 are identical and the absolute values of the y coordinate are the same for Nz and Iz: https://robertoostenveld.nl/electrodes/plotting_1005.txt and https://robertoostenveld.nl/electrodes/sphere_1005.txt

    I would say that when using a standard EEG layout, people are fine with a spherical head model and this is especially the case when having topomaps with a circular head shape. Although I haven't tried it, a simple solution might be to use the spherical version for the standard_10xx layouts.

  4. agramfort commented on Dec 17, 2019

    @agramfort
    SponsorMember
  5. sappelhoff commented on Feb 4, 2020

    @sappelhoff
    Member

    I only see this now, but let me add some explanation (no solution, only information):

    @robertoostenveld's computations versus my own computations are slightly different in their assumptions.

    • Robert says the equator goes through Fpz and Oz (and T7 and T9 ... I think the T9 is actually a typo and meant to be T8)

    The first version (“sphere1”) assumes Fpz, Oz, T7 and T9 to be on the poles of the sphere.

    • I say the equator goes through Nz and Iz (and T9 and T10, which I say coincide with LPA/RPA for the sake of the model coordinate system, which is defined by Nasion, Inion, and the preauricular points)

    so "my" equator is one contour line below that of Robert's computation, hence the positions do not match up absolutely (only in terms of relative distance).

    I am of the impression that the choice through which electrodes the equator of the spherical head model passes is rather arbitrary. My choice was inspired by the Brain Products cap, where on the outermost circle, you would find the Nz, Iz, T9 and T10 electrodes.

    image

  6. robertoostenveld commented on Feb 4, 2020

    @robertoostenveld
    Contributor

    correct, T9 should be T8. I have corrected it on https://robertoostenveld.nl/electrode/

    My motivation for the circles is based on https://pdfs.semanticscholar.org/53a7/cf6bf8568c660240c080125e55836d507098.pdf figure 6 and 7 and Jasper 1958 (could not find a PDF so quickly).

    The contour through Fpz/T7/Oz/T8 is one that is reasonably easy to follow due to the regularity of the head. If you go further down, you get the nose, eye sockets, and ears in the way. So estimating 10% (or 20%) distances along the lower (Nz/Iz) contour is hard, and not for the Fpz/Oz contour. In https://github.com/fieldtrip/fieldtrip/blob/master/ft_electrodeplacement.m with method=1020 I am using this contour following procedure to place electrodes on a scalp surface, following the contours that follow from the plane intersections with the triangulated surface.

    But this is all for source modeling, whereas the original question is about visualization of 3D data on a 2D plane: I don't think spheres reflect the head very well, even though we also use them for http://www.fieldtriptoolbox.org/template/layout/. I like the "helmet" layouts (see under CTF, Neuromag and 4D) more than the sphere ones. I think it would be good (for the wider EEG field) to also use better 2D layouts than "spheres with a triangle for the nose".

    Wrt the schematic EEG layout with a circle, I would get rid of the ears. They are not at the right location relative to the electrodes.

    PS the 1020 algorithm that is also in ft_electrodeplacement was actually used to create the electrode positions I am sharing on my blog, even though at that time FT did not exist yet. I think I used it both for the spherical model and for the realistic model.

  7. cbrnr commented on Mar 13, 2020

    @cbrnr
    Contributor

    I think the problem is not that some locations are now outside the head (e.g. AF9, AF10, ...), but that too few locations are outside the head as compared to the previous behavior. Previously, Fz was pretty close to the head circumference (close to the nose), whereas now it is way closer to the center (see before and after plots in #7430).

    I don't know which configuration is more correct, but the old behavior definitely looked much better.

  8. mmagnuski commented on Mar 15, 2020

    @mmagnuski
    Member

    @cbrnr I agree, I will take a look at this. Your problem in #7430 may be related to #7341.
    What I also find weird is that the center of the head indicated by channel scatter does not match the center of head circle.
    If I move the sphere center to have Cz closer to the head circle center the channel scatter has a straight horizontal line at FCz level.
    mne.viz.plot_montage(mntg, sphere=(0, 0.016, 0, 0.1))
    image

    After checking: this issue comes from channel positions, see the first panel on the left (scatter size indicates channel distance in the ignored dimension):
    ch pos
    the channels positions seem to be digitized/realistic, not schematic/spherical. This is what @hekolk mentioned earlier. I think the schematic positions would be better if we project to the sphere anyway.

  9. cbrnr commented on Mar 15, 2020

    @cbrnr
    Contributor

    Shouldn't channels T9 - T7 - C5 - C3 - C1 - Cz - ... form a horizontal line (according to the cartoon posted by @sappelhoff)?

  10. mmagnuski commented on Mar 16, 2020

    @mmagnuski
    Member

    I think they should, take a look at the previous comment by @hekolk.

  11. cbrnr commented on Mar 16, 2020

    @cbrnr
    Contributor

    I'm still not sure what the problem is. Do we already know? What's the plan to fix it? I'd really like this to be fixed for 0.20 so I'm adding this to the milestone.

  12. added this to the 0.20 milestone on Mar 16, 2020
  13. mmagnuski commented on Mar 16, 2020

    @mmagnuski
    Member

    @cbrnr The 10-20 channel positions 'standard_1020' shipped with mne are the "realistic channel positions" (https://robertoostenveld.nl/electrodes/realistic_1005.txt) but there are also less realistic spherical coordinates (https://robertoostenveld.nl/electrodes/plotting_1005.txt and https://robertoostenveld.nl/electrodes/sphere_1005.txt). The realistic positions are better for coregistering with MRI and source localization (if one does not have digitized channel positions) but for plotting the plotting/spherical positions should be better.

    @agramfort @larsoner
    I think we should default make_standard_montage('standard_1020') to spherical 10-20 coords and allow for make_standard_montage('realistic_1020') (or 'standard_1020_realistic') for the current 10-20 default.

    Fixing the usage of sphere in topomap code does help a little (PR soon, more details there) but introduces other issues (that could be avoided but will require some decision).

  14. cbrnr commented on Mar 16, 2020

    @cbrnr
    Contributor

    👍 for changing standard_1020 to spherical coords and renaming the existing realistic ones to realistic_1020. Which of the two spherical would you use? Also, which function reads these kinds of files?

  15. agramfort commented on Mar 16, 2020

    @agramfort
    SponsorMember
  16. 42 remaining items

  17. cbrnr commented on May 13, 2026

    @cbrnr
    Contributor

    I'd like to revive this issue due to a recent question in our forum. The solution seems to be to rename the standard_* montages to make it clear that these are actually not standard (=computed) montages. However, they seem to be locations on a sphere, just shifted in some way that makes them look weird. So either we try to figure out what's going on with the locations, or we rename them to something sensible - I have no good idea at the moment, but realistic_* is not the right choice because these montages seem to be computed and not realistic (they look pretty regular and symmetrical, but maybe I'm wrong). It would probably also help if we knew where these montages originated from.

  18. sappelhoff commented on May 13, 2026

    @sappelhoff
    Member

    It would probably also help if we knew where these montages originated from.

    yes, that would be really important, and was also one of my main motivations back then to start https://github.com/sappelhoff/eeg_positions rather than relying on "montage files" that are circulated without clearly established provenance.

    EDIT, actually, see: #7141 (comment) ... that is where the data seems to come from.

    I have no good idea at the moment, but realistic_* is not the right choice because these montages seem to be computed and not realistic

    I agree that realistic is maybe a misnomer. We need to know where the data comes from, but given that it's "tailored" towards fsaverage, perhaps something like fsaverage_1005 etc. would be better.

  19. robertoostenveld commented on May 13, 2026

    @robertoostenveld
    Contributor

    Hi Clemens,

    if the MNE standard_* montages are derived from standard_1020.elc (included in FieldTrip, but already dating back to 2001 on my personal website/blog, which was in the pre-FieldTrip era), then those positions are actually computed and not measured. The procedure was for the first time applied by me in https://doi.org/10.1016/S1388-2457(01)00460-6 on a scalp surface extracted from the TT-scaled and averaged canonical MNI template MRI ("Colin27"), and the algorithm consists of MATLAB code that later became the 1020 method in ft_electrodeplacement. I recall that later an Asian (Chinese, Japanese?) group also published a paper with an automated 10-20 placement method very similar to what I had implemented in 2001.

    If you inspect this recent tutorial, you can see the method applied to a sphere, a flattened sphere and a real head (note that that tutorial is not on Colin27, but on someone's actual MRI). Specifically the relevant figures are



    Around 2001 or 2002 we also added the BEM head model based on Colin27 and the corresponding electrode positions to the EEGLAB DIPFIT plugin, where it was referred to as the "standard" realistic head model (contrasting the standard spherical head model based on the spherical BESA model, which it replaced).

    So whether it qualifies as a "standard" or not is up to you, but it is for sure computed and the code is still there 25 years later to recompute it. I think that nowadays we should be using more explicit naming of template models (which we also try to do with https://www.fieldtriptoolbox.org/template/) and that "standard" or "realistic" are neither good identifiers. So fsaverage_1005 as suggested by Stefan would be an appropriate name, although not correct for the standard_1020.elc positions. See also https://www.lead-dbs.org/about-the-mni-spaces/.

  20. cbrnr commented on May 13, 2026

    @cbrnr
    Contributor

    Thanks Robert, this makes sense now! However, I don't understand what you mean by saying fsaverage_1005 would be appropriate but not correct? Would colin27_1005 (or _1020) be the correct name then?

  21. robertoostenveld commented on May 13, 2026

    @robertoostenveld
    Contributor

    yes, you are right. Assuming that I have the correct interpretation of their history/provenance, then for these electrodes colin27_1005 would be appropriate. Likewise I can also imagine that an fsaverage_1005 electrode set can be constructed and would be useful.

    Since 1020 is a subset of 1010, which is a subset of 1005, I think that 1005 would be the best name if you have all ~340 electrode positions. I recently encountered valid critiques on a paper saying "a 64 channel EEG placement according to the 10-20 system was used", which is indeed not correct.

  22. cbrnr commented on May 18, 2026

    @cbrnr
    Contributor

    Alright, so standard_1020 and standard_1005 contain 97 and 346 electrode locations, respectively. The former is a subset of the latter, but contains three locations that are not in standard_1005 (O9, Iz, O10).

    Here's my suggestion:

    • Rename standard_1020 → colin27_1010 and standard_1005 → colin27_1005.
    • Rename the other standard_* → colin27_* (* means alphabetic, postfixed, prefixed, and primed).
    • Generate new spherical standard_1020, standard_1010, and standard_1005 montages with eeg-positions and include it in MNE (perhaps name them spherical_* instead of standard_*).

    Is everyone OK with these changes? I assume this will have to go through a deprecation cycle. @larsoner @drammock

  23. sappelhoff commented on May 18, 2026

    @sappelhoff
    Member

    I think these changes would be reasonable 👍

  24. larsoner commented on May 18, 2026

    @larsoner
    Member

    I think our old semi-consensus was to avoid standard_1020 altogether in the new naming scheme. So I think this parenthetical idea:

    perhaps name [the spherical ones] spherical_* instead of standard_*

    Is important to implement. We can then (by deprecation) remove standard_1020 altogether. Given standard_1020 is itself an ambiguous name, and meant for us for ~7 years (and for FieldTrip I guess for 20+!) the "colin27/realistic" variant, I don't think it's a good idea to keep the name around. Cleaner to go with new, unambiguous names, and people eventually hitting an error here will force them to choose which of the two unambiguous names they want. In other words I think the last bullet above should be:

    • Generate new spherical spherical_1020, spherical_1010, and spherical_1005 montages with eeg-positions and include it in MNE

    (And then someday it would be great to generate fsaverage variants when someone finds time!)

  25. cbrnr commented on May 18, 2026

    @cbrnr
    Contributor

    Alright, I'll prepare a PR with these changes then!

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions