uvex_transients.models.core.detection_horizon.first_crossing#
- uvex_transients.models.core.detection_horizon.first_crossing(m_eff: ndarray, z_grid: ndarray, mag_limit: float, *, interpolate: bool = False) ndarray[source]#
Find each draw’s detection redshift: the first grid redshift at which it is fainter than the limit.
Only the first crossing counts. A K-correction can make an event dip back below the limit at a higher redshift, and that is deliberately ignored.
- Parameters:
m_eff (
numpy.ndarray) – Effective peak magnitudes, shape(M, Z).z_grid (
numpy.ndarray) – Redshifts, shape(Z,), strictly increasing.mag_limit (
float) – AB magnitude limit.interpolate (
bool, optional) – If False (the default), return the grid redshift of the first non-detection, which is an upper bound on the true crossing. If True, interpolate linearly in magnitude against \(\log(1+z)\) between that grid point and the one before. This is tighter but no longer an upper bound.
- Returns:
Shape
(M,).inffor a draw that never gets fainter than the limit inside the grid (censored);z_grid[0]for a draw already fainter atz_grid[0].- Return type: