uvex_transients.models.core.detection_horizon.check_sample_count#

uvex_transients.models.core.detection_horizon.check_sample_count(n_samples: int, confidence: float, tolerance: float) → None[source]#

Check that a number of draws can support a confidence and tolerance, before an expensive grid is built.

Parameters:
  • n_samples (int) – Number of draws.

  • confidence (float) – The guarantee; see observability_curve.

  • tolerance (float) – The guarantee; see observability_curve.

Raises:

ValueError – If n_samples is below ln(1 - confidence) / ln(1 - tolerance); the message names the minimum.