uvex_transients.models.core.detection_horizon.peak_band_magnitudes#

uvex_transients.models.core.detection_horizon.peak_band_magnitudes(eval_log_luminosity: Callable[[...], NDArray], parameters: Mapping[str, NDArray], z_grid: NDArray, luminosity_distance: NDArray, band_grids: Sequence[tuple[NDArray, NDArray]], t_rest: NDArray, *, chunk_size: int | None = None, d_ln_nu: float = 0.002, progress: bool = True) → NDArray[source]#

Brightest AB magnitude over time of each draw, in each band, at each redshift.

Parameters:
  • eval_log_luminosity (callable) – eval_log_luminosity(nu, t, **parameters): the natural log of the rest-frame \(L_\nu\) in cgs, for frequencies nu (Hz) and times t (s) that broadcast against the parameters. For a ~uvex_transients.models.core.base.SpectralModel this is its _eval.

  • parameters (Mapping[str, numpy.ndarray]) – The model parameters in cgs units, each of shape (N,), one entry per draw.

  • z_grid (numpy.ndarray) – Redshifts, shape (Z,), increasing and positive.

  • luminosity_distance (numpy.ndarray) – Luminosity distance at each redshift in cm, shape (Z,).

  • band_grids (sequence of tuple of numpy.ndarray) – Each band’s observed frequency samples (Hz) and throughput.

  • t_rest (numpy.ndarray) – Rest-frame times since explosion in seconds, shape (T,).

  • chunk_size (int, optional) – Draws evaluated per step. By default it is chosen so that the largest intermediate array is about 32 MB.

  • d_ln_nu (float, optional) – Spacing of the rest-frame frequency grid in \(\ln\nu\); see ~uvex_transients.utils.phot_utils.restframe_frequency_grid.

  • progress (bool, optional) – Whether to show a progress bar.

Returns:

Shape (N, B, Z). NaN where the model has no valid epoch for the draw, redshift and band, which is any epoch where the model returns NaN at a frequency the band receives light from.

Return type:

numpy.ndarray