C25_M31Avg¶
- class dust_extinction.averages.C25_M31Avg(**kwargs)[source]¶
Bases:
BaseExtModelClayton et al (2025) M31 Average Extinction Curve
- Parameters:
None
- Raises:
None –
Notes
From Clayton et al. (2025, ApJ, in press)
One data point in the FUV from the data file giving the observed average was removed as it is very deviate from the FM90 parametrization. This cause the automated tests to fail.
Example showing the average curve
import numpy as np import matplotlib.pyplot as plt import astropy.units as u from dust_extinction.averages import C25_M31Avg fig, ax = plt.subplots() # define the extinction model ext_model = C25_M31Avg() # generate the curves and plot them x = np.arange(ext_model.x_range[0], ext_model.x_range[1],0.1)/u.micron ax.plot(x,ext_model(x),label='C25 M31 Average') ax.plot(ext_model.obsdata_x, ext_model.obsdata_axav, 'ko', label='obsdata') ax.set_xlabel(r'$x$ [$\mu m^{-1}$]') ax.set_ylabel(r'$A(x)/A(V)$') # for 2nd x-axis with lambda values axis_xs = np.array([0.1, 0.12, 0.15, 0.2, 0.3, 0.5, 1.0]) new_ticks = 1 / axis_xs new_ticks_labels = ["%.2f" % z for z in axis_xs] tax = ax.twiny() tax.set_xlim(ax.get_xlim()) tax.set_xticks(new_ticks) tax.set_xticklabels(new_ticks_labels) tax.set_xlabel(r"$\lambda$ [$\mu$m]") ax.legend(loc='best') plt.show()
(
Source code,png,hires.png,pdf)
Attributes Summary
Methods Summary
evaluate(x)C25 M31Avg function
Attributes Documentation
- Rv = 3.2¶
- x_range = [0.3, 10.0]¶
Methods Documentation
- evaluate(x)[source]¶
C25 M31Avg function
- Parameters:
x (float) –
expects either x in units of wavelengths or frequency or assumes wavelengths in wavenumbers [1/micron]
internally wavenumbers are used
- Returns:
axav – A(x)/A(V) extinction curve [mag]
- Return type:
np array (float)
- Raises:
ValueError – Input x values outside of defined range