uvex_transients.utils.split_root_seed#

uvex_transients.utils.split_root_seed(seed: SeedSequence | int | None = None) → tuple[Generator, SeedSequence][source]#

Split a root seed into an “immediate draws” generator and a “per-event seeds” spawner.

Used by Monte Carlo samplers that need two decorrelated streams from a single root seed: one to drive draws consumed immediately within the sampling call itself (how many events, their positions/redshifts/times), and a second to spawn independent, individually storable per-event seeds (see spawn_seeds()) for lazily regenerating each event’s physical parameters later. Keeping these separate means replaying a single event’s parameter draw can never depend on how many other events were sampled alongside it in the same call.

Parameters:

seed (numpy.random.SeedSequence, int, or None, optional) – Root seed; see get_seed_sequence().

Returns:

See also

spawn_seeds

Derives the actual per-event seed array from spawn_sequence.