uvex_transients.dust.host_log_attenuation_cgs#
- uvex_transients.dust.host_log_attenuation_cgs(nu: NDArray[float64], A_V: float | NDArray[float64], R_V: float | NDArray[float64], dust_law: str | None = None) NDArray[float64][source]#
Natural log of the host-galaxy attenuation for a given \((A_V, R_V)\), \(\ln(10^{-0.4\,A(\nu)})\).
The counterpart of log_attenuation for dust that is part of an SED rather than along the line of sight: the dust is described by its V-band attenuation \(A_V\) and its total-to-selective ratio \(R_V\) (so \(E(B-V) = A_V/R_V\)), either of which can be an array.
nuis the rest-frame frequency, in plain cgs numbers like the_evalmethods of the SED models that call this.The law’s native wavelength range is not an error here. Outside it the attenuation curve is held at its value at the nearest edge (the extreme UV blueward of 912 Angstrom and the far infrared redward of 32 microns), rather than
NaNas log_attenuation returns, so that integrating over all frequencies stays finite. The curve is read from a table of the law’s coefficients (see _affine_coefficients) rather than re-evaluated, which makes this cheap on large arrays.- Parameters:
nu (
numpy.ndarray) – Rest-frame frequency, in Hz, any shape.A_V (
floatornumpy.ndarray) – V-band attenuation, in magnitudes, broadcastable againstnu.R_V (
floatornumpy.ndarray) – Total-to-selective extinction ratio, broadcastable againstnu. It must lie in the law’s valid range (2.3 to 5.6 for G23); this is not checked here.dust_law (
str, optional) – Passed through to get_dust_law’s registry;Noneuses the configured default.
- Returns:
\(\ln\) of the attenuation, with the shape that
nu,A_VandR_Vbroadcast to.- Return type: