GCC09_MWAvg

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

Bases: dust_extinction.baseclasses.BaseExtModel

Gordon, Cartledge, & Clayton (2009) Milky Way Average Extinction Curve

Parameters
None
Raises
None

Notes

From Gordon, Cartledge, & Clayton (2009, ApJ, 705, 1320)

Example showing the average curve

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

from dust_extinction.averages import GCC09_MWAvg

fig, ax = plt.subplots()

# generate the curves and plot them
x = np.arange(0.3,1.0/0.0912,0.1)/u.micron

# define the extinction model
ext_model = GCC09_MWAvg()

# 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='GCC09_MWAvg')
ax.errorbar(ext_model.obsdata_x_fuse, ext_model.obsdata_axav_fuse,
            yerr=ext_model.obsdata_axav_unc_fuse,
            fmt='ko', label='obsdata (FUSE)')
ax.errorbar(ext_model.obsdata_x_iue, ext_model.obsdata_axav_iue,
            yerr=ext_model.obsdata_axav_unc_iue,
            fmt='bs', label='obsdata (IUE)')
ax.errorbar(ext_model.obsdata_x_bands, ext_model.obsdata_axav_bands,
            yerr=ext_model.obsdata_axav_unc_bands,
            fmt='g^', label='obsdata (Opt/NIR)')

ax.set_xlabel(r'$x$ [$\mu m^{-1}$]')
ax.set_ylabel(r'$A(x)/A(V)$')

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

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

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

Attributes Summary

Rv

x_range

Methods Summary

evaluate(in_x)

GCC09_MWAvg function

Attributes Documentation

Rv = 3.1
x_range = [0.3, 10.964912280701753]

Methods Documentation

evaluate(in_x)[source]

GCC09_MWAvg 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