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

Minimap hexels can have false-colour halos #432

Open
caiw opened this issue Jan 24, 2025 · 3 comments
Open

Minimap hexels can have false-colour halos #432

caiw opened this issue Jan 24, 2025 · 3 comments
Labels
⏸️ blocked/on-hold Blocked or otherwise waiting for something 🪲 bug Something isn't working 📈 plotting functionality Any issues related to plotting

Comments

@caiw
Copy link
Member

caiw commented Jan 24, 2025

E.g.

Image

Image

The reason is this:

I've determined that this is a bug in mne (either design or implementation).

Rather than taking the supplied Colormap and applying it to the data values, it instead takes 256 sample values and uses the Colormap to create a lookup table (create_lut()), and as far as I can see it then uses the LUT to interpolate between colours. So no amount of clever work with the Colormap itself will fix this bug. The problem simply arises when there are lots of different transforms in the show_transforms argument.

So I'm marking this as a partial fix, and I'll create a new issue to track the halos, and put this text in there too.

In other words, I believe this is a bug in MNE, and we can't fix it without MNE fixing it or without overriding their code (which I don't think is worth it).

@caiw caiw added 📈 plotting functionality Any issues related to plotting 🪲 bug Something isn't working ⏸️ blocked/on-hold Blocked or otherwise waiting for something labels Jan 24, 2025
@caiw
Copy link
Member Author

caiw commented Jan 24, 2025

@neukym We could spend time creating a MRE and submit it as a bug to MNE, to see if they'll fix it? I feel like quantising data values to 256 levels and then interpolating between them is "wrong", as (like in our case) it displays values which are not present in the source data. And it shouldn't be necessary - there's a perfectly good Colormap right there in the same scope. But maybe it's for performance reasons.

Depends how high priority this bug is.

@neukym
Copy link
Member

neukym commented Jan 24, 2025

I think this is important, but low priority. Let's fix the other plotting issues first as we have a bit of a backlog.

@caiw
Copy link
Member Author

caiw commented Jan 24, 2025

For future reference, I tried a few tricks like automatically interleaving transparency into the colormap to thwart the interpolation (f4d45ba, b9178f1, acb18da), but none of them bypassed this bug because of the LUT thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⏸️ blocked/on-hold Blocked or otherwise waiting for something 🪲 bug Something isn't working 📈 plotting functionality Any issues related to plotting
Projects
None yet
Development

No branches or pull requests

2 participants