Time samplers

class stix.training.time_sampler.TimeSampler(*args, **kwargs)

Bases: Protocol

Protocol for time sampling strategies.

__call__(key)

Sample a scalar time value.

Parameters:

key (Array) – PRNG key for the draw.

Returns:

A scalar time in the sampler’s support.

Return type:

Time

class stix.training.time_sampler.UniformTimeSampler(t_min=0.0, t_max=1.0)

Bases: TimeSampler

Sample time uniformly from [t_min, t_max].

Parameters:
__call__(key)

Sample time uniformly from [t_min, t_max].

Parameters:

key (Array) – PRNG key for the draw.

Returns:

A scalar time in [t_min, t_max].

Return type:

Time