D22_MWAvg

class dust_extinction.averages.D22_MWAvg(**kwargs)[source]

Bases: BaseExtModel

Decleir et al. (2022) Milky Way Average Extinction Curve

Parameters:
None
Raises:
None

Notes

From Decleir et al. (2022, ApJ, submitted)

Example showing the average curve

import numpy as np
import matplotlib.pyplot as plt
import astropy.units as u

from dust_extinction.averages import D22_MWAvg

fig, ax = plt.subplots()

# generate the curves and plot them
lam = np.logspace(np.log10(0.8), np.log10(4.9), num=1000)
x = (1.0 / lam) / u.micron

# define the extinction model
ext_model = D22_MWAvg()

ax.plot(1.0 / x, ext_model(x), label="D22_MWAvg")
ax.errorbar(
    1.0 / ext_model.obsdata_x,
    ext_model.obsdata_axav,
    yerr=ext_model.obsdata_axav_unc,
    fmt="ko",
    label="obsdata",
)

ax.set_xlabel(r"$\lambda$ [$\mu m$]")
ax.set_ylabel(r"$A(x)/A(V)$")

ax.set_xscale("log")
ax.set_yscale("log")

ax.legend(loc="best")
plt.show()

(Source code, png, hires.png, pdf)

../_images/dust_extinction-averages-D22_MWAvg-1.png

Attributes Summary

Rv

x_range

Methods Summary

evaluate(x)

D22_MWAvg function

Attributes Documentation

Rv = 3.12
x_range = [0.2, 1.25]

Methods Documentation

evaluate(x)[source]

D22_MWAvg 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: np array (float)

A(x)/A(V) extinction curve [mag]

Raises:
ValueError

Input x values outside of defined range