Remove non-finite SSFT noise in StochasticNoise#2400
Merged
Conversation
brhooper
requested changes
Jun 19, 2026
brhooper
left a comment
Contributor
There was a problem hiding this comment.
Thanks @mo-AliceLake
This change should solve our issues with non-finite values being generated and the new functional is covered by a new unit test. I've added one comment to fix a typo, then I think that this can be merged.
Co-authored-by: Ben Hooper <114418734+brhooper@users.noreply.github.com>
brhooper
approved these changes
Jun 19, 2026
brhooper
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. Thanks @mo-AliceLake .
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.
Addresses https://github.com/metoppv/mo-blue-team/issues/1220
Stochastic noise generation can occasionally produce non-finite values (NaN/Inf), which then propagate into output. This leads to sporadic failures in stochastic-noise tests (see e.g. example 1, example 2).
To fix this, updated
improver/calibration/stochastic_noise.pyto guard against non-finite values:Updated
improver_tests/calibration/stochastic_noise/test_StochasticNoise.py:Testing: