D22¶
- class dust_extinction.parameter_averages.D22(Rv=3.1, **kwargs)[source]¶
Bases:
BaseExtRvModel
Decleir et al (2022) extinction model calculation
Decleir, Gordon, et al. (2022, ApJ, submitted) model. Based on a sample of stars observed spectroscopically in the NIR with IRTF/SpeX.
- Parameters:
- Rv: float
R(V) = A(V)/E(B-V) = total-to-selective extinction
- Raises:
- InputParameterError
Input Rv values outside of defined range
Notes
D22 Milky Way R(V) dependent extinction model
Example showing D22 curves for a range of R(V) values.
import numpy as np import matplotlib.pyplot as plt import astropy.units as u from dust_extinction.parameter_averages import D22 fig, ax = plt.subplots() # temp model to get the correct x range text_model = D22() # generate the curves and plot them x = np.arange(text_model.x_range[0], text_model.x_range[1], 0.01) / u.micron Rvs = [2.5, 3.1, 4.0, 4.75, 5.5] for cur_Rv in Rvs: ext_model = D22(Rv=cur_Rv) ax.plot(1. / x, ext_model(x), label="R(V) = " + str(cur_Rv)) ax.set_xlabel(r"$\lambda$ [$\mu m$]") ax.set_ylabel(r"$A(x)/A(V)$") ax.legend(loc="best") plt.show()
(
Source code
,png
,hires.png
,pdf
)Attributes Summary
Methods Summary
evaluate
(in_x, Rv)D22 function
Attributes Documentation
- Rv_range = [2.5, 5.5]¶
- x_range = [0.25, 1.25]¶
Methods Documentation
- evaluate(in_x, Rv)[source]¶
D22 function
- Parameters:
- in_x: float
expects either x in units of wavelengths or frequency or assumes wavelengths in wavenumbers [1/micron]
internally wavenumbers are used
- Returns:
- axav: np array (float)
A(x)/A(V) extinction curve [mag]
- Raises:
- ValueError
Input x values outside of defined range