Dust (extinction correction)¶
- hostphot.dust.calc_extinction(filt, survey, ra, dec, scaling=0.86, reddening_law='fitzpatrick99', r_v=3.1)¶
Calculates the extinction for a given filter, right ascension and declination or E(B-V).
- Parameters:
filter_wave (array) – Filter’s wavelength range.
filter_response (array) – Filter’s response function.
ra (float) – Right ascension.
dec (float) – Declinationin degrees.
scaling (float, default
0.86
) – Calibration of the Milky Way dust maps. Either0.86
for the Schlafly & Finkbeiner (2011) recalibration or1.0
for the original dust map of Schlegel, Fikbeiner & Davis (1998).reddening_law (str, default
fitzpatrick99
) – Reddening law. The options are:ccm89
(Cardelli, Clayton & Mathis 1989),odonnell94
(O’Donnell 1994),fitzpatrick99
(Fitzpatrick 1999),calzetti00
(Calzetti 2000) andfm07
(Fitzpatrick & Massa 2007 with \(R_V\) = 3.1.)r_v (float, default
3.1
) – Total-to-selective extinction ratio (\(R_V\))
- Returns:
A_ext – Extinction value in magnitudes.
- Return type:
float
- hostphot.dust.deredden(wave, flux, ra, dec, scaling=0.86, reddening_law='fitzpatrick99', r_v=3.1)¶
Dereddens the given spectrum, given a right ascension and declination or \(E(B-V)\).
- Parameters:
wave (array) – Wavelength values.
flux (array) – Flux density values.
ra (float) – Right ascension in degrees.
dec (float) – Declination in degrees.
scaling (float, default
0.86
) – Calibration of the Milky Way dust maps. Either0.86
for the Schlafly & Finkbeiner (2011) recalibration or1.0
for the original dust map of Schlegel, Fikbeiner & Davis (1998).reddening_law (str, default
fitzpatrick99
) – Reddening law. The options are:ccm89
(Cardelli, Clayton & Mathis 1989),odonnell94
(O’Donnell 1994),fitzpatrick99
(Fitzpatrick 1999),calzetti00
(Calzetti 2000) andfm07
(Fitzpatrick & Massa 2007 with \(R_V\) = 3.1.)dustmaps_dir (str, default
None
) – Directory where the dust maps of Schlegel, Fikbeiner & Davis (1998) are found.r_v (float, default
3.1
) – Total-to-selective extinction ratio (\(R_V\))ebv (float, default
None
) – Colour excess (\(E(B-V)\)). If given, this is used instead of the dust map value.
- Returns:
deredden_flux – Deredden flux values.
- Return type:
array