[ESSREDUCE] Seed RNG in cylindrical pixel position noise#629
Merged
Conversation
Unlike gaussian_position_noise, the cylindrical pixel noise used an unseeded np.random.default_rng(), making the generated noise and all downstream projected coords nondeterministic between calls. Seed it with 1234 to match the gaussian variant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nvaytet
approved these changes
Jun 10, 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.
position_noise_for_cylindrical_pixelcreated its RNG with an unseedednp.random.default_rng(), whereas its siblinggaussian_position_noiseuses a fixed seed. This made the cylindrical pixel noise — and therefore all downstream projected coordinates — change on every call, which is undesirable for reproducible reductions and comparisons. Seeding the generator with the same value as the gaussian variant makes the output deterministic.The added test asserts that two successive calls produce identical noise; it fails on the previous code and passes with the fix.