A python code to generate the extinction law between 0.8 -- 2.2 microns as described in Hosek+19 (Appendix B, Table 8). This is a revised version of the extinction law calculated in Hosek+18, with the only change being revised photometric zeropoints for F814W and F160W filters for the observed photometry.
The law is derived using the Westerlund 1 (Wd1) main sequence (A_Ks ~ 0.6 mag) and Arches cluster field Red Clump at the Galactic Center (A_Ks ~ 2.7 mag). To derive the law a Wd1 cluster age of 5 Myr is assumed, though changing the cluster age between 4 Myr -- 7 Myr has no effect on the law.
This extinction law can be applied to highly reddened stellar populations that have similar foreground material as Wd1 and the Arches RC, namely dust from the spiral arms of the Milky Way in the Galactic Plane.
- python (either 2.7 or higher)
- numpy
- scipy
- pylab
extinction(AKs, wavelength)
Returns the total extinction A_lambda and corresponding error (1-sigma) at
the specified wavelength(s) and overall A_Ks according to the
extinction law from Hosek+19.
Parameters:
----------
AKs: float
The overall extinction at a wavelength of 2.14 microns (approximately the Ks filter).
Units are magnitudes
wavelength: float or array
Wavelength or array of wavelengths to calculate A_lambda for. Units are
microns. Must be between 0.8059 -- 2.2 microns, otherwise law is not defined
Output:
-------
A_lambda: float or array
array with total extinction at input wavelength(s). If single wavelength given, then
output is a float. If array of wavelegths given, then output is also an array.
err: float or array
array with the 1-sigma error. This error is symmetric about A_lambda
plot_extinction_law()
Plot the extinction law (with errors) between 0.8 -- 2.2 microns.
Saves output plot as extlaw_H18b.png in working directory.
To get the total extinction at 1.25 microns and A_Ks = 0.5 mags (in an ipython session):
import extlaw_H18b # Import code
result, err = extlaw_H18b.extinction(0.5, 1.25)
print(result) # extinction at 1.25 microns if A_Ks (e.g., extinction at 2.14 microns) is 0.5 mags
print(err) # 1-sigma err (statistical)