uvex_transients.utils.spawn_seeds#

uvex_transients.utils.spawn_seeds(spawn_sequence: SeedSequence, n: int) → NDArray[uint64][source]#

Derive n independent, reproducible, individually storable seeds.

Each returned seed is a single uint64, directly usable with get_rng() (e.g. as Lightcurve.sample_parameters(rng=seed)) to reproducibly regenerate that one event’s parameters later without needing to replay the draws for any other event – the compression trick behind only ever storing a seed per event rather than its sampled parameters.

Uses ~numpy.random.SeedSequence.spawn, which is NumPy’s recommended mechanism for generating many independent reproducible streams from one root; a naive base_seed + i scheme is not guaranteed to avoid subtle stream correlations the way spawning is.

Parameters:
Returns:

uint64 array of shape (n,).

Return type:

numpy.ndarray