Update jax_galsim test expected values for JAX 0.8.x #1344
Merged
Update jax_galsim test expected values for JAX 0.8.x #1344
Conversation
beckermr
approved these changes
Feb 7, 2026
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.
JAX 0.8.x changed its internal RNG implementation, so the same seed now produces a different random sequence. All hardcoded expected values under
if is_jax_galsim():branches need updating.Changes
tests/test_random.py(lines 50-86)Update the
is_jax_galsim()block:tests/test_noise.py(lines 584-595)Update
cResultvalues intest_ccdnoise:tests/test_moffat.py(line 480)Change the seed for
test_moffat_shootwhen running under jax_galsim. With the new JAX RNG and seed 1234, the second Moffat draw (beta=1.9, large wings) loses 3 out of 10000 photons off the edge of the 500x500 image. Seed 1235 produces a sequence where all photons land inside.Context
These changes are needed by JAX-GalSim PR #169, which removes the
jax<0.5.0pin and updates the test suite for JAX 0.8.x compatibility. Until this PR lands, JAX-GalSim uses workarounds inconftest.pyto override some of these values at test collection time, but it cannot cover everything.