uvex_transients.models.core.detection_horizon.observability_curve#
- uvex_transients.models.core.detection_horizon.observability_curve(grid: EffectivePeakGrid, mag_limits: NumericalInput, *, confidence: float = 0.95, tolerance: float = 0.01, interpolate: bool = False) QTable[source]#
Bound the redshift beyond which a population is undetectable, for each magnitude limit.
For each limit, finds every draw’s detection redshift (first_crossing) and takes the upper tolerance limit of them (~uvex_transients.utils.stat_utils.tolerance_limit): with probability confidence, at most a fraction tolerance of the population has a detection redshift above it.
- Parameters:
grid (
EffectivePeakGrid) – From effective_peak_grid. It needs at leastln(1 - confidence) / ln(1 - tolerance)draws, 299 for the defaults.mag_limits (
floatorarray-like) – AB magnitude limit(s). Tabulating many costs almost nothing once the grid exists.confidence (
float, optional) – Probability that the guarantee holds, in(0, 1). The default is 0.95.tolerance (
float, optional) – Fraction of the population allowed beyond the limit, in(0, 1). The default is 0.01.interpolate (
bool, optional) – If False (the default), each detection redshift is rounded up to a grid point, so the limit is never an underestimate but is coarse by up to one grid step. If True, the crossing is interpolated, which is tighter but not guaranteed to be an overestimate. See first_crossing.
- Returns:
One row per magnitude limit, with columns
mag_limit,z_limit(inf, with a warning, where the grid does not reach the limit) andn_censored(draws that never got fainter than the limit inside the grid). Itsmetarecordsconfidence,tolerance,n_samples,rank,criterionandbands.- Return type:
- Raises:
ValueError – If the grid has too few draws for confidence and tolerance.