Skip to content

Commit

Permalink
updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
karllark committed May 7, 2024
1 parent f3ccd8f commit 7e8e799
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
7 changes: 5 additions & 2 deletions docs/dust_extinction/choose_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ simplest models and include models for the MW
:class:`~dust_extinction.averages.CT06_MWGC`,
:class:`~dust_extinction.averages.GCC09_MWAvg`,
:class:`~dust_extinction.averages.F11_MWGC`,
:class:`~dust_extinction.averages.G21_MWAvg`;
:class:`~dust_extinction.averages.G21_MWAvg`,
:class:`~dust_extinction.averages.D22_MWAvg`;
Note the different valid wavelength ranges), the LMC
(:class:`~dust_extinction.averages.G03_LMCAvg`,
:class:`~dust_extinction.averages.G03_LMC2`) and the SMC
(:class:`~dust_extinction.averages.G03_SMCBar`).
(:class:`~dust_extinction.averages.G03_SMCBar`,
:class:`~dust_extinction.averages.G24_SMCAvg`).

One often used alternative to these straight average models is to use one of
the parameter dependent models with the average R(V) value. For the Milky
Expand Down Expand Up @@ -63,6 +64,8 @@ Way, the usual average used is R(V) = 3.1. See the next section.
+--------------+-------------+------------------+--------------+
| G03_SMCBar | 0.3 - 10.0 | 0.1 - 3.3 | SMC |
+--------------+-------------+------------------+--------------+
| G24_SMCAvg | 0.3 - 10.0 | 0.1 - 3.3 | SMC |
+--------------+-------------+------------------+--------------+


Parameter Dependent Average Curves
Expand Down
15 changes: 9 additions & 6 deletions docs/dust_extinction/model_flavors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ Average models
Models are provided for the Milky Way for the optical (Bastiaansen 1992),
ultraviolet through near-infrared
(Gordon, Cartlege, & Clayton 2009) and near- and mid-infrared
(Rieke & Lebofsky 1985; Indebetouw et al. 2005; Chiar & Tielens 2006; Fritz et al. 2011)
and the Magellanic Clouds (Gordon et al. 2003).
(Rieke & Lebofsky 1985; Indebetouw et al. 2005; Chiar & Tielens 2006; Fritz et al. 2011;
Gordon et al. 2021; Decleir et al. 2022)
and the Magellanic Clouds (Gordon et al. 2003; Gordon et al. 2024).

For the Milky Way for the ultraviolet through near-infrared,
one of the R(V) dependent models with R(V) = 3.1
Expand All @@ -31,14 +32,15 @@ Average models
B92_MWAvg,
G03_SMCBar,
G03_LMCAvg,
G03_LMC2)
G03_LMC2,
G24_SMCAvg)

fig, ax = plt.subplots()

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

models = [GCC09_MWAvg, B92_MWAvg, G03_SMCBar, G03_LMCAvg, G03_LMC2]
models = [GCC09_MWAvg, B92_MWAvg, G03_SMCBar, G03_LMCAvg, G03_LMC2, G24_SMCAvg]

for cmodel in models:
ext_model = cmodel()
Expand Down Expand Up @@ -111,8 +113,9 @@ R(V) (+ other variables) dependent prediction models

The R(V) dependent models include CCM89 the original such model
(Cardelli, Clayton, and Mathis 1989), the O94 model that updates the
optical portion of the CCM89 model (O'Donnell 1994), and the F99 model
(Fitzpatrick 1999) updated as F04 (Fitzpatrick 2004),
optical portion of the CCM89 model (O'Donnell 1994), the F99 model
(Fitzpatrick 1999) updated as F04 (Fitzpatrick 2004), and the
fully spectroscopic far-UV to mid-IR G23 (Gordon et al. 2023).
These models are based on the average
behavior of extinction in the Milky Way as a function of R(V).
The M14 model refines the optical portion of the CCM89 model
Expand Down
8 changes: 3 additions & 5 deletions dust_extinction/averages.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"G21_MWAvg",
"D22_MWAvg",
"G24_SMCAvg",
"G24_SMCBumps"
# "G24_SMCBumps"
]


Expand Down Expand Up @@ -1581,7 +1581,7 @@ def __init__(self, **kwargs):
self.obsdata_axav_unc = a["unc"].data

# accuracy of the observed data based on published table
self.obsdata_tolerance = 0.2 # check
self.obsdata_tolerance = 0.1 # large value driven by short wavelength uncertainties

super().__init__(**kwargs)

Expand Down Expand Up @@ -1614,9 +1614,7 @@ def evaluate(self, in_x):
xo = 4.59
gamma = 0.95

optnir_axav_x = 1.0 / np.array(
[2.198, 1.65, 1.25, 0.55, 0.44, 0.37]
)
optnir_axav_x = 1.0 / np.array([2.198, 1.65, 1.25, 0.55, 0.44, 0.37])
optnir_axav_y = [0.075, 0.137, 0.333, 1.021, 1.345, 1.507]

# return A(x)/A(V)
Expand Down
2 changes: 2 additions & 0 deletions dust_extinction/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
F11_MWGC,
G21_MWAvg,
D22_MWAvg,
G24_SMCAvg,
)
from dust_extinction.grain_models import DBP90, WD01, D03, ZDA04, C11, J13, HD23

Expand All @@ -49,6 +50,7 @@
F11_MWGC,
G21_MWAvg,
D22_MWAvg,
G24_SMCAvg,
]
grain_models = [DBP90, WD01, D03, ZDA04, C11, J13, HD23]

Expand Down

0 comments on commit 7e8e799

Please sign in to comment.