uvex_transients.utils.phot_utils.resolve_bandpasses#

uvex_transients.utils.phot_utils.resolve_bandpasses(bandpasses: Mapping[str, SpectralElement] | Sequence[SpectralElement]) → tuple[tuple[str, ...], list[tuple[ndarray, ndarray]]][source]#

Reduce bandpasses to the (frequency, throughput) arrays that band integration needs.

Parameters:

bandpasses (Mapping[str, SpectralElement] or sequence of SpectralElement) – The bands. A sequence is named band0, band1, and so on.

Returns:

  • names (tuple of str) – Band names, in the order of grids.

  • grids (list of tuple of numpy.ndarray) – For each band, its frequency samples in Hz and the dimensionless throughput at each.

Raises:

ValueError – If bandpasses is empty.