Skip to content

[ESSREDUCE] Seed RNG in cylindrical pixel position noise#629

Merged
SimonHeybrock merged 1 commit into
mainfrom
seed-cylindrical-noise
Jun 10, 2026
Merged

[ESSREDUCE] Seed RNG in cylindrical pixel position noise#629
SimonHeybrock merged 1 commit into
mainfrom
seed-cylindrical-noise

Conversation

@SimonHeybrock

Copy link
Copy Markdown
Member

position_noise_for_cylindrical_pixel created its RNG with an unseeded np.random.default_rng(), whereas its sibling gaussian_position_noise uses 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.

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>
@github-actions github-actions Bot added the essreduce Issues for essreduce. label Jun 9, 2026
@github-actions github-actions Bot changed the title Seed RNG in cylindrical pixel position noise [ESSREDUCE] Seed RNG in cylindrical pixel position noise Jun 9, 2026
@SimonHeybrock SimonHeybrock added this pull request to the merge queue Jun 10, 2026
Merged via the queue into main with commit d247de5 Jun 10, 2026
26 checks passed
@SimonHeybrock SimonHeybrock deleted the seed-cylindrical-noise branch June 10, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

essreduce Issues for essreduce.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants