Skip to content

Commit

Permalink
Merge pull request #228 from karllark/add_y24
Browse files Browse the repository at this point in the history
Adding in Y24
  • Loading branch information
karllark authored Aug 16, 2024
2 parents 52639bc + 647cda8 commit d0d94cf
Show file tree
Hide file tree
Showing 6 changed files with 919 additions and 11 deletions.
2 changes: 2 additions & 0 deletions docs/dust_extinction/choose_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ observationally (e.g., in the extreme UV below 912 A).
+--------------+----------------+------------------+--------------+
| HD23 MWRV31 | 0.000033 - 10 | 0.1 - 30000 | MW R(V)=3.1 |
+--------------+----------------+------------------+--------------+
| Y24 MWRV31 | 0.00001 - 25 | 0.04 - 100000 | MW R(V)=3.1 |
+--------------+----------------+------------------+--------------+

Shape Models
============
Expand Down
29 changes: 21 additions & 8 deletions docs/dust_extinction/model_flavors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ Grain models
import matplotlib.pyplot as plt
import astropy.units as u

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

fig, ax = plt.subplots()

Expand All @@ -373,22 +373,29 @@ Grain models
D03, D03, D03,
ZDA04,
C11, J13,
HD23]
HD23,
Y24]
modelnames = ["MWRV31",
"MWRV31", "MWRV40", "MWRV55",
"MWRV31", "MWRV40", "MWRV55",
"BARE-GR-S",
"MWRV31", "MWRV31",
"MWRV31",
"MWRV31"]

for cmodel, cname in zip(models, modelnames):
colors = plt.get_cmap("tab20")

for k, cmodel in enumerate(models):
cname = modelnames[k]
ccolor = colors(k % 20)

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.plot(lam[indxs], yvals, label=f"{ext_model.__class__.__name__} {cname}", color=ccolor)

ax.set_xlabel('$\lambda$ [$\mu m$]')
ax.set_ylabel(r'$A(\lambda)/A(V)$')
Expand All @@ -411,7 +418,7 @@ Grain models
from matplotlib.ticker import ScalarFormatter
import astropy.units as u

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

fig, ax = plt.subplots()

Expand All @@ -424,22 +431,28 @@ Grain models
D03, D03, D03,
ZDA04,
C11, J13,
HD23]
HD23,
Y24]
modelnames = ["MWRV31",
"MWRV31", "MWRV40", "MWRV55",
"MWRV31", "MWRV40", "MWRV55",
"BARE-GR-S",
"MWRV31", "MWRV31",
"MWRV31",
"MWRV31"]

for cmodel, cname in zip(models, modelnames):
colors = plt.get_cmap("tab20")

for k, cmodel in enumerate(models):
cname = modelnames[k]
ccolor = colors(k % 20)
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.plot(lam[indxs], yvals, label=f"{ext_model.__class__.__name__} {cname}", color=ccolor)

ax.set_xlabel('$\lambda$ [$\mu m$]')
ax.set_ylabel(r'$A(\lambda)/A(V)$')
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 @@ -134,6 +134,9 @@ VCG04: `Valencic, Clayton, & Gordon 2014, 616, 912
WD01: `Weingartner & Draine 2001, ApJ, 548, 296
<https://ui.adsabs.harvard.edu/abs/2001ApJ...548..296W>`_

Y24: `Ysard et al. 2024, A&A, 684, 34
<https://ui.adsabs.harvard.edu/abs/2024A%26A...684A..34Y>`_

ZDA04: `Zubko, Dwek, & Arendt 2004, ApJS, 152, 211
<https://ui.adsabs.harvard.edu/abs/2004ApJS..152..211Z>`_

Loading

0 comments on commit d0d94cf

Please sign in to comment.