uvex_transients.utils.phot_utils.integrate_chunk#

uvex_transients.utils.phot_utils.integrate_chunk(eval_log_luminosity: Callable[[...], NDArray], parameters: Mapping[str, NDArray], start: int, stop: int, nu_axis: NDArray, t_axis: NDArray, weights: NDArray, support: NDArray) → NDArray[source]#

Evaluate the SED for some draws and apply frequency weights.

Parameters:
  • eval_log_luminosity (callable) – eval_log_luminosity(nu, t, **parameters): the natural log of the rest-frame \(L_\nu\) in cgs; for a ~uvex_transients.models.core.base.SpectralModel its _eval.

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

  • start (int) – The draws to evaluate, parameters[...][start:stop].

  • stop (int) – The draws to evaluate, parameters[...][start:stop].

  • nu_axis (numpy.ndarray) – Rest-frame frequencies (Hz) and times (s), shaped (1, 1, F) and (1, T, 1) to broadcast against the draws.

  • t_axis (numpy.ndarray) – Rest-frame frequencies (Hz) and times (s), shaped (1, 1, F) and (1, T, 1) to broadcast against the draws.

  • weights (numpy.ndarray) – Shape (F, K): one column of weights over frequency per output.

  • support (numpy.ndarray) – Shape (F, K), weights > 0: which frequencies each output integrates over.

Returns:

Shape (stop - start, T, K). NaN where the model is NaN at a frequency that output integrates over.

Return type:

numpy.ndarray