uvex_transients.utils.phot_utils.band_weight_matrix#
- uvex_transients.utils.phot_utils.band_weight_matrix(nu_rest: NDArray, band_grids: Sequence[tuple[NDArray, NDArray]], z_grid: NDArray) NDArray[source]#
Build the weights that turn rest-frame luminosity densities into band-averaged ones, for every band and redshift.
- Parameters:
nu_rest (
numpy.ndarray) – Uniform-in-\(\ln\nu\) rest-frame grid, fromrestframe_frequency_grid().band_grids (
sequenceoftupleofnumpy.ndarray) – Each band’s observed frequency samples (Hz) and throughput.z_grid (
numpy.ndarray) – Redshifts.
- Returns:
Shape
(len(nu_rest), len(band_grids), len(z_grid)). Each[:, b, j]column sums to one.- Return type: