29 reproducible bolometer observations with a fixed seed - #30
Merged
jherf merged 2 commits intoAug 28, 2026
Merged
Conversation
MishaVeldhoen
force-pushed
the
29-reproducible-bolometer-observations-with-a-fixed-seed
branch
from
June 30, 2026 23:07
65b3683 to
2c4a3d9
Compare
MishaVeldhoen
marked this pull request as ready for review
June 30, 2026 23:11
MishaVeldhoen
force-pushed
the
29-reproducible-bolometer-observations-with-a-fixed-seed
branch
from
June 30, 2026 23:18
2c4a3d9 to
bdee827
Compare
Collaborator
|
Looks good to me! Jeff knows this part of the code better than me though since it was part of the refactor so I will wait for his review. |
jherf
marked this pull request as draft
August 28, 2026 16:11
bolos_observe wrote to self.data before its own existence guard, so an observe without a prior calc_radiated_power raised AttributeError. Make self.data a class invariant set in __init__ and drop the now-redundant guard, so the observe no longer depends on calc_radiated_power running first.
Add an optional `seed` to BOLOMETER_PROPS. When set, observations render in-process (serial engine) and the ray-tracing RNG is seeded, so observing a structure twice yields identical bolometer signals. The default path (multicore, unseeded) is unchanged. Add an opt-in regression test behind a `cherab` pytest marker (deselected by default; run with `pytest -m cherab`) and register the marker. Closes #29
jherf
force-pushed
the
29-reproducible-bolometer-observations-with-a-fixed-seed
branch
from
August 28, 2026 16:56
bdee827 to
37a9052
Compare
jherf
marked this pull request as ready for review
August 28, 2026 16:59
jherf
deleted the
29-reproducible-bolometer-observations-with-a-fixed-seed
branch
August 28, 2026 17:02
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.
Context
Raysect sets the
seedonly in the primary worker, additional workers still use a random seed, so the result is still not deterministic. A possible upstream fix could be that raysect workers choose a distinct but non-random seed (based onseed), so we could follow up with that if this fix is too slow.Solution
BOLOMETER_PROPS.seed. Setting this seed to a specific number will set the seed in raysect, and restrict raysect to using only a single worker.Drive-by fixes
RadDist.datain the constructor.Tests
Closes #29