-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix Brain slider ranges #12612
Fix Brain slider ranges #12612
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
behavior does seem better, thanks! Please add a changelog entry.
once #12615 lands we can merge main and that should get CIs green here |
@wmvanvliet looks like this broke an example:
And locally just running the example I get the warning then an error:
|
Oh no! That looks like a platform issue. Was |
Yes, I really think it was a poor choice. I meant to do this: #12619 |
This updates the logic that determines the ranges for the three sliders (fmin, fmid, fmax) on the left of a
Brain
figure. There was an overflow when the data is all zeros (np.log10(fmax)
) which this PR fixes by usingnp.log10(max(fmax, 1e-30))
instead. While I was there, I noticed that the minimum and maximum values for the sliders were set based on thefmin
andfmax
of the current timepoint instead of the entire data. Finally, on second thought, the minimum value for the sliders should always be0
, that makes a lot more sense to me than capping it tofmin
.To check out the new behavior:
fixes #12606