Fluxes, colour excess and attenuation¶
- galaxy.photometry.calzetti_law(lbda: Union[float, numpy.ndarray], rv: float = 4.05, a: float = 2.659, b1: float = - 1.857, c1: float = 1.04, d1: float = 0, e1: float = 0, b2: float = - 2.156, c2: float = 1.509, d2: float = - 0.198, e2: float = 0.011) Union[float, numpy.ndarray] [source]¶
Code author: Epinat Benoit - LAM <benoit.epinat@lam.fr>
Attenuation curve from Calzetti et al. (2000). The coefficients can be modified in input.
Note
In principle, this law is valid from 0.12 to 2.2 microns.
The relation is
\[k = a \times (b + c/\lambda + d/\lambda^2 + e/\lambda^3),\]with \(\lambda\) the wavelength.
- Parameters
lbda (float or ndarray[float]) – wavelength in microns
rv (float) – (Optional) ratio of the total to selective attenuation
a (float) – (Optional) multiplicative coefficient
bi (float) – (Optional) coefficients for the relation above 0.63 microns
bi – (Optional) coefficients for the relation below 0.63 microns
- Returns
Calzetti attenuation
- Return type
float or ndarray[float]
- galaxy.photometry.dust_attenuation_calzetti(lbda: Union[float, numpy.ndarray], ebv: float, rv: float = 4.05) Union[float, numpy.ndarray] [source]¶
Code author: Epinat Benoit - LAM <benoit.epinat@lam.fr>
Compute the dust attenuation using the Calzetti attenuation curve (could be more general adding a function name) from the colour excess.
- Parameters
lbda (float or ndarray[float]) – wavelength in microns
ebv (float) – colour excess
rv (float) – (Optional) ratio of the total to selective attenuation
- Returns
dust attenuation in mag
- Return type
float or ndarray[float]
- galaxy.photometry.cardelli_law(lbda: Union[float, numpy.ndarray], rv: float = 3.1) Union[float, numpy.ndarray] [source]¶
Code author: Epinat Benoit - LAM <benoit.epinat@lam.fr>
Attenuation curve from Cardelli et al. (1989). The coefficients can be modified in input.
Note
In principle, this law is valid from 0.1 to 3.3 microns. For MW, Rv~3.1.
- Parameters
lbda (float or ndarray[float]) – wavelength in microns
rv (float) – (Optional) ratio of the total to selective attenuation
- Returns
cardelli attenuation
- Return type
float or ndarray[float]
- galaxy.photometry.dust_attenuation_cardelli(lbda: Union[float, numpy.ndarray], ebv: float, rv: float = 3.1) Union[float, numpy.ndarray] [source]¶
Code author: Epinat Benoit - LAM <benoit.epinat@lam.fr>
Compute the dust attenuation using the Cardelli attenuation curve from the colour excess.
- Parameters
lbda (float or ndarray[float]) – wavelength in microns
ebv (float) – colour excess
rv (float) – (Optional) ratio of the total to selective attenuation
- Returns
dust attenuation in mag
- Return type
float or ndarray[float]
- galaxy.photometry.flux_to_lum(floii: Union[float, numpy.ndarray], z: Union[float, numpy.ndarray], av: Optional[Union[float, numpy.ndarray]] = None, ebv: Optional[Union[float, numpy.ndarray]] = None, lbda: Union[float, numpy.ndarray] = 0.3728) Union[float, numpy.ndarray] [source]¶
Code author: Epinat Benoit - LAM <benoit.epinat@lam.fr>
Convert a flux into a luminosity. If an attenuation and a colour excess are given, the flux is corrected beforehand.
- Parameters
floii (float or ndarray[float]) – flux in \(\rm{erg/s/cm^2}\). Optionally, can directly be given as an Astropy Quantity with a unit of the kind \(\rm{erg/s/cm^2}\).
z (float or ndarray[float]) – redshift
av (float or ndarray[float]) – (Optional) attenuation in V band
ebv (float or ndarray[float]) – (Optional) colour excess
lbda (float or ndarray[float]) – (Optional) rest-frame wavelength in microns
- Returns
luminosity in \(\rm{erg/s}\)
- Return type
float or ndarray[float]
- galaxy.photometry.correct_extinction(floii: Union[float, numpy.ndarray], z: Union[float, numpy.ndarray], av: Union[float, numpy.ndarray], ebv: Union[float, numpy.ndarray], lbda: Union[float, numpy.ndarray] = 0.3728) Union[float, numpy.ndarray] [source]¶
Code author: Epinat Benoit - LAM <benoit.epinat@lam.fr>
Correct for both galactic extinction and internal extinction. We use the following attenuation curves:
Cardelli for the Galactic extinction
Calzetti for the intrinsic extinction
- Parameters
av (float or ndarray[float]) – attenuation in V band
ebv (float or ndarray[float]) – colour excess
floii (float or ndarray[float]) – ionised gas flux
z (float or ndarray[float]) – redshift
lbda (float or ndarray[float]) – (Optional) rest-frame wavelength in microns
- Returns
flux corrected of extinction
- Return type
float or ndarray[float]