mne-python: BUG: Extreme topomap valuse still too strong

@agramfort pointed out that the examples/time_frequency/plot_source_power_spectrum_opm.py example had edges that are too strong:

master

Doing border='mean' plus extrapolate='local' gives:

Screenshot from 2020-04-13 09-44-01

I wonder if:

  1. The default extrapolation mode of box should actually add the local points, then also add the four points in the corners. It might be a good compromise.
  2. border='mean' should be the default

If we did these two things, this is what the new default would look like (hacked together the box change for now and set border='mean'):

Screenshot from 2020-04-13 10-03-41

I know we’ve had some conversations about (2) at least, but I’d also like (1) because it might combine the local focality of 'local' with the smoothness (bounded by matplotlib mask instead of interpolation grid extent) of 'box'. Thoughts @mmagnuski ?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

Excellent, it was pretty easy to implement and test because someone already wrote nice convex hull / local code 😃

If the default distance at which extrapolation points are placed was higher - then the circular mask would mask not only sides but also the back in the example above. Then the convex hulll based mask would only be effectively masking the front. Of course it may be different for each case, so its not necessarily a general rule. But the circular mask would not cut off any channels (its created this way), and it is alread not a no-op.

Yes but having the top look bad is not great, and masking differently for one part (convex hull at the top) and another (circle at the bottom) is also not great.

it’s just that circular mask will usually look nicer than convex hull based mask (its smoother)

I just finished an implementation of the local at 1x + patch at 0.5x already looks pretty good and smooth. I’d prefer it to some combination of extra-circle-plus-convex-hull stuff:

Screenshot from 2020-04-13 11-25-27

If the slight angularity at the bottom really bothers people then I think we can probably fix it later, but it really does not bother me here. Basically if you use local extrapolation, I think you should only ever see data close to the channels, and we should do something to smooth the jagged edges. This seems like it would make a pretty nice default, as it:

  1. Accurately allocates areas to channels
  2. Accurately portrays the channel geometry
  3. Does not have (big) issues at the boundaries

For EEG people that want data extrapolated and need circles, I don’t think it’s too much to have them set extrapolate='box', and then we can make the skirt options do something again separately.

Okay I’ll try making the local changes to use a polygon based on the convex hull.

One issue is that this will make the outlines='head' | 'skirt' stuff even worse, since we will no longer extrapolate far enough to even choose where the outlines will go.