Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default topomap interpolation a bit uglier than some time before #8425

Closed
mmagnuski opened this issue Oct 25, 2020 · 6 comments · Fixed by #8645
Closed

Default topomap interpolation a bit uglier than some time before #8425

mmagnuski opened this issue Oct 25, 2020 · 6 comments · Fixed by #8645
Labels
Milestone

Comments

@mmagnuski
Copy link
Member

mmagnuski commented Oct 25, 2020

I noticed that current topomap interpolation with extrapolate='head' produces more artifacts at the edges than in the previous version. Take a look at this:

before

image

now

image

Now the topos look ok only in extrapolate='local' mode (so I've learnt to like the non-circular convex hull mask).
I think I may be partly responsible for this. I have a vague memory of adding more extrapolation points some time ago to extrapolate='head', but I can't find the PR now.
I'll try to take a look at this in the upcoming week.

@mmagnuski mmagnuski added the BUG label Oct 25, 2020
@larsoner larsoner added this to the 0.22 milestone Dec 1, 2020
@larsoner
Copy link
Member

larsoner commented Dec 1, 2020

@mmagnuski we're making a push to release in a couple of weeks, do you have time to look into this in that time?

@mmagnuski
Copy link
Member Author

I might have some time for this next week, I'll try to look into it!

@mmagnuski
Copy link
Member Author

I still remember about this issue, I might find some time for it tomorrow.

@mmagnuski
Copy link
Member Author

I finally got to it. It turns out my intuition was correct, plot_topomap creates too many extrapolation points:

you can also see that the whole circle was not divided evenly (the red arrow), which was the cause of the funny extrapolation artifacts on the right side of the topos.
I reduced the number of points in the PR (#8645) and fixed the uneven circle division:

It is better, but still could be improved (left: master, right: PR)

I'll see how increasing the distance of extrapolation points and further reducing their number helps, but I would prefer not to overfit to my specific cap layout :), so I would appreciate if other EEG users that experienced this problem let me know.

extrapolate='box' works good in these cases so increasing the distance between the extrapolation points and channels positions should help.

@agramfort
Copy link
Member

agramfort commented Dec 11, 2020 via email

@mmagnuski
Copy link
Member Author

@agramfort Yes, its in progress, I linked it in the post above (#8645).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants