Fix Brain slider ranges - #12612
Merged
Merged
Fix Brain slider ranges#12612
Conversation
drammock
approved these changes
May 16, 2024
drammock
left a comment
Member
There was a problem hiding this comment.
behavior does seem better, thanks! Please add a changelog entry.
agramfort
approved these changes
May 16, 2024
wmvanvliet
enabled auto-merge (squash)
May 16, 2024 19:39
Member
|
once #12615 lands we can merge main and that should get CIs green here |
Member
Member
|
@wmvanvliet looks like this broke an example: And locally just running the example I get the warning then an error: |
Contributor
Author
|
Oh no! That looks like a platform issue. Was |
Merged
Contributor
Author
|
Yes, I really think it was a poor choice. I meant to do this: #12619 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This updates the logic that determines the ranges for the three sliders (fmin, fmid, fmax) on the left of a
Brainfigure. 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 thefminandfmaxof 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