Skip to content

Commit

Permalink
adding DBP90 grain model
Browse files Browse the repository at this point in the history
  • Loading branch information
karllark committed Aug 25, 2020
1 parent 4b258c6 commit bc55caa
Show file tree
Hide file tree
Showing 6 changed files with 902 additions and 10 deletions.
8 changes: 5 additions & 3 deletions docs/dust_extinction/choose_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ observationally (e.g., in the extreme UV below 912 A).
| Model | x range | wavelength range | galaxy |
| | [1/micron] | [micron] | |
+==============+================+==================+==============+
| DBP90 MWRV31 | 0.00001 - 10.9 | 0.0918 - 100000 | MW R(V)=3.1 |
+--------------+----------------+------------------+--------------+
| WD01 MWRV31 | 0.0001 - 100 | 0.01 - 10000 | MW R(V)=3.1 |
+--------------+----------------+------------------+--------------+
| WD01 MWRV40 | 0.0001 - 100 | 0.01 - 10000 | MW R(V)=4.0 |
Expand All @@ -146,11 +148,11 @@ observationally (e.g., in the extreme UV below 912 A).
+--------------+----------------+------------------+--------------+
| D03 MWRV55 | 0.0001 - 10000 | 0.0001 - 10000 | MW R(V)=5.5 |
+--------------+----------------+------------------+--------------+
| ZDA04 MWRV31 | 0.0001 - 1000 | 0.001 - 10000 | MW |
| ZDA04 MWRV31 | 0.0001 - 1000 | 0.001 - 10000 | MW R(V)=3.1 |
+--------------+----------------+------------------+--------------+
| C11 MWRV31 | 0.00001 - 25 | 0.04 - 100000 | MW |
| C11 MWRV31 | 0.00001 - 25 | 0.04 - 100000 | MW R(V)=3.1 |
+--------------+----------------+------------------+--------------+
| J13 MWRV31 | 0.00001 - 25 | 0.04 - 100000 | MW |
| J13 MWRV31 | 0.00001 - 25 | 0.04 - 100000 | MW R(V)=3.1 |
+--------------+----------------+------------------+--------------+

Shape Models
Expand Down
55 changes: 52 additions & 3 deletions docs/dust_extinction/model_flavors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -297,19 +297,21 @@ Grain models
import matplotlib.pyplot as plt
import astropy.units as u

from dust_extinction.grain_models import WD01, D03, ZDA04, C11, J13
from dust_extinction.grain_models import DBP90, WD01, D03, ZDA04, C11, J13

fig, ax = plt.subplots()

# generate the curves and plot them
lam = np.logspace(-4.0, 5.0, num=1000)
x = (1.0 / lam) / u.micron

models = [WD01, WD01, WD01,
models = [DBP90,
WD01, WD01, WD01,
D03, D03, D03,
ZDA04,
C11, J13]
modelnames = ["MWRV31", "MWRV40", "MWRV55",
modelnames = ["MWRV31",
"MWRV31", "MWRV40", "MWRV55",
"MWRV31", "MWRV40", "MWRV55",
"BARE-GR-S",
"MWRV31", "MWRV31"]
Expand Down Expand Up @@ -337,6 +339,53 @@ Grain models
plt.show()


.. plot::

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

from dust_extinction.grain_models import DBP90, WD01, D03, ZDA04, C11, J13

fig, ax = plt.subplots()

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

models = [DBP90,
WD01, WD01, WD01,
D03, D03, D03,
ZDA04,
C11, J13]
modelnames = ["MWRV31",
"MWRV31", "MWRV40", "MWRV55",
"MWRV31", "MWRV40", "MWRV55",
"BARE-GR-S",
"MWRV31", "MWRV31"]

for cmodel, cname in zip(models, modelnames):
ext_model = cmodel(cname)

indxs, = np.where(np.logical_and(
x.value >= ext_model.x_range[0],
x.value <= ext_model.x_range[1]))
yvals = ext_model(x[indxs])
ax.plot(lam[indxs], yvals, label=f"{ext_model.__class__.__name__} {cname}")

ax.set_xlabel('$\lambda$ [$\mu m$]')
ax.set_ylabel('$A(x)/A(V)$')
ax.set_title('Grain Models')

ax.set_xscale('log')
ax.set_yscale('log')

ax.set_title('Milky Way - Ultraviolet to Mid-Infrared')

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

.. plot::

import numpy as np
Expand Down
3 changes: 3 additions & 0 deletions docs/dust_extinction/references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ D03: `Draine 2003, ARA&A, 41, 241
`Draine 2003, ApJ, 598, 1017
<https://ui.adsabs.harvard.edu/abs/2003ApJ...598.1017D/abstract>`_

DBP90: `Desert, Boulanger, & Puget 1990, A&A, 237, 215
<https://ui.adsabs.harvard.edu/abs/1990A%26A...237..215D/abstract>`_

F99: `Fitzpatrick 1999, PASP, 111, 63
<https://ui.adsabs.harvard.edu/abs/1999PASP..111...63F>`_

Expand Down
Loading

0 comments on commit bc55caa

Please sign in to comment.