Skip to content

Commit

Permalink
updates based on PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
karllark committed Aug 16, 2024
1 parent 66cd976 commit 647cda8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
17 changes: 13 additions & 4 deletions docs/dust_extinction/model_flavors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,19 @@ Grain models
"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 Expand Up @@ -432,14 +437,18 @@ Grain models
"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
4 changes: 2 additions & 2 deletions dust_extinction/grain_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ def __init__(self, modelname="MWRV31", **kwargs):

class J13(BaseExtGrainModel):
r"""
Jones et al (2013) Grain Models
Jones et al (2013) Grain Models (aka THEMIS 1.0)
Parameters
----------
Expand Down Expand Up @@ -610,7 +610,7 @@ def __init__(self, modelname="MWRV31", **kwargs):

class Y24(BaseExtGrainModel):
r"""
Ysard et al. (2024) Grain Model
Ysard et al. (2024) Grain Model (aka THEMIS 2.0)
Parameters
----------
Expand Down

0 comments on commit 647cda8

Please sign in to comment.