uvex_transients.phase_space.sampling.base.StoppingRule.expected_n#

StoppingRule.expected_n(p: ArrayLike) → NDArray[float64][source]#

Predict how many tries a point of success fraction p will get.

Enough to expect k_target successes, bounded by one chunk below and n_max above. This is what the map’s acquisition uses to predict the noise of a point before it is measured.

Parameters:

p (array-like) – The success fraction, which must be positive.

Returns:

The expected number of tries, of the shape of p.

Return type:

numpy.ndarray