question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG: Extreme topomap valuse still too strong

See original GitHub issue

@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 ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
larsonercommented, Apr 13, 2020

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

1reaction
larsonercommented, Apr 13, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to interpret corneal topography: 5 clinical uses
1) Corneal topography is a non-invasive imaging technique for mapping the surface curvature and shape of the anterior corneal surface. How it's done:...
Read more >
Best paper maps
However, the USGS maps are very large and difficult to print. MyTopo offers large, waterproof, custom topographic maps of any area you want....
Read more >
I found an error on a map. How can I report it and when will ...
Unless there is a serious error, US Topo maps will not be reissued. The corrected data will be included when the map is...
Read more >
Interpreting Contour Maps | METEO 3: Introductory Meteorology
Meteorologists regularly use contour maps to see how weather variables (temperature or pressure, for example) change over large areas, but they also use...
Read more >
9. Topographical Plans And Maps
9.0 Introduction. What are topographical plans and maps? 1. Topographical plans and maps are drawings which show the main physical features on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found