uvex_transients.phase_space.sampling.breakout.BreakoutSampler.draw#

BreakoutSampler.draw(x: ArrayLike, n: int, seed: SeedSequence) → int#

Simulate n events at a point and return how many the survey recovers.

Parameters:
  • x (array-like) – The point, in the coordinates of space, shape (ndim,).

  • n (int) – The number of events.

  • seed (numpy.random.SeedSequence) – The source of the randomness of the simulation.

Returns:

The number of events recovered, between 0 and n.

Return type:

int

Raises:

RuntimeError – If the simulation does not return n events, which would make the count mean something else.