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

Evoked topomap amplitudes don't appear to match traces in Report #12138

Closed
hoechenberger opened this issue Oct 25, 2023 · 7 comments · Fixed by #12578
Closed

Evoked topomap amplitudes don't appear to match traces in Report #12138

hoechenberger opened this issue Oct 25, 2023 · 7 comments · Fixed by #12578
Assignees
Labels

Comments

@hoechenberger
Copy link
Member

hoechenberger commented Oct 25, 2023

Description of the problem

I'm not sure what exactly is going on here and it might not be a bug after all, but in a Report generated through MNE-BIDS-Pipeline I see things like the following for Evoked objects:

Screenshot 2023-10-25 at 23 00 52

The topo color scale is somehow much bigger than the amplitude of the signal shown in the traces, hence all colors in the topomap are really faint

Steps to reproduce

I don't have a MWE yet

Link to data

No response

Expected results

Topomap value range should correspond to signal amplitudes in the traces plot

Actual results

Topomap value range is much larger

Additional information

@hoechenberger hoechenberger changed the title Evoked topomap amplitudes doesn't appear to match traces in Report Evoked topomap amplitudes don't appear to match traces in Report Oct 26, 2023
@larsoner
Copy link
Member

Top plot looks correct. Bottom plot looks like the vlim isn't set properly for some reason. Perhaps it's calculated on a longer segment (e.g. 3 or 10s) where the drift does go up to +/- 45 uV but the slider only gets created for the interval 0-1.5s or something? In that case I guess Report should be smarter about calculating the min/max vlim using only the time span of interest

@hoechenberger
Copy link
Member Author

I agree, the plot shows the correct values, but the limits are somehow too wide

@larsoner
Copy link
Member

@hoechenberger can you share the Evoked file privately with me?

If not, one possibility is that in one case the vlim is being computed before an average ref proj is added and applied for example. Another is that it's being computed before baselining is done. Another is that there is some time cropping being done somewhere (as alluded to above). If you can see which of these is likely the culprit by loading the Evoked and looking at np.abs(evoked.data).max() right on load, after .apply_proj(), after .apply_baseline((None, 0)), etc. you might be able to isolate it. And once you know which one it is, creating a MWE without sharing the data might not be too difficult for you or me.

@hoechenberger
Copy link
Member Author

@larsoner I'm busy today, I'll see what I can do
Thanks for your help!

@hoechenberger

This comment was marked as outdated.

@hoechenberger
Copy link
Member Author

hoechenberger commented Apr 26, 2024

Ah, I believe the problem is that we're taking all channels into consideration when calculating the value range, but we need to exclude the bad ones. I can try to fix it later today.

@hoechenberger
Copy link
Member Author

This is the root of the issue: #12577

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.

2 participants