Skip to content

plotting: topomap electrode positions change depending on number of channels #5190

Closed

Description

@sappelhoff

When using topoplot functions in MNE, I run into problems with the electrode positions that are plotted. Namely, when using the code below, the resulting sensor plots should look identical for the electrodes in chan_selection. However, this is not the case:

import mne

chan_selection = [u'FC5', u'FC1', u'C3', u'CP5', u'CP1', u'FC2', u'FC6', u'C4', u'CP2', u'CP6']

montage1020_full = mne.channels.read_montage(kind='standard_1020', ch_names=None)
montage1020_reduced = mne.channels.read_montage(kind='standard_1020', ch_names=chan_selection)

montage1020_full.plot()
montage1020_reduced.plot()

Full

figure_1

Reduced

figure_2


I am aware of a bunch of related issues (e.g., #4880). Issue #3987 seems to be the central issue for this problem ... is anyone working on this currently? It seems like a pretty crucial problem to be solved, given that topoplots are a very common visualization in our domain.

Is this perhaps even affecting the interpolation of voltages across the scalp? Or is this problem merely distorting the "plotted dots" symbolizing the electrodes?

PS: When I use real data and mne.viz.plot_evoked_topomap, I get yet another image for the same electrodes:

screenshot from 2018-05-06 10-50-22

Activity

  1. larsoner commented on May 6, 2018

    @larsoner
    Member
  2. sappelhoff commented on May 6, 2018

    @sappelhoff
    MemberAuthor

    Mmmh okay, those are a lot of scattered issues :-) but it seems like you are working on it.

    Especially this point (quoting @larsoner)

    This will fix issues like evoked.plot_topo() and evoked.pick_channels(evoked.ch_names(:10)) not having the 10 sensors in the same position (which is a bit crazy IMO).

    For now, is there a workaround, I could use? I tried supplying a head_pos = dict(center=(0., 0.), scale=(1., 1.)) with different scales, AND in conjunction with specifying a layout derived from an info object. However, the results are not really satisfactory and it feels like fishing around ...

    On this note ... what is the difference between layout and montage?

  3. agramfort commented on May 6, 2018

    @agramfort
    SponsorMember
  4. larsoner commented on May 6, 2018

    @larsoner
    Member

    but it seems like you are working on it.

    Yes passively currently but hopefully actively again soon.

    For now, is there a workaround, I could use?

    You have the right idea, but it won't work properly yet because the interpolation is still done over the entire head (kind of nonsensically).

    On this note ... what is the difference between layout and montage?

    I have updated my plan for this here:

    #3987 (comment)

    Basically montage / DigMontage / physical locations are to be used anytime sensors are shown relative to a head. layout is to be used to separate sensors to facilitate subselection by groups e.g. in raw.plot. But this is still TODO, we are not consistent with this yet.

  5. added a commit that references this issue on Aug 25, 2018
    7933f5b
  6. self-assigned this
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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