uvex_transients.utils.phot_utils.band_integration_weights#
- uvex_transients.utils.phot_utils.band_integration_weights(bandpass: SpectralElement, d_ln_nu: float = 0.002) tuple[NDArray[float64], NDArray[float64]][source]#
Build the frequency grid and weights that integrate a luminosity density over a band.
The grid is uniform in \(\ln\nu\) and covers the band, and the weights are \(\tilde T(\nu_k)\,\nu_k\,\Delta\ln\nu\), so that \(\sum_k w_k L_\nu(\nu_k)\) is \(\int L_\nu\,\tilde T\,d\nu\). The weights of a flat spectrum add up to the equivalent_bandwidth.
- Parameters:
bandpass (
synphot.SpectralElement) – One of a detector’s bandpasses.d_ln_nu (
float, optional) – Spacing of the grid in \(\ln\nu\). The default is the one the detection-horizon calculation uses.
- Returns:
nu (
numpy.ndarray) – Frequencies in Hz, increasing.weights (
numpy.ndarray) – The weight of each frequency, in Hz.