Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions beast/physicsmodel/dust/extinction.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def get_Rv_A(self, Rv, f_A=0.5):

Rv_A = 1. / (1. / (Rv * f_A) - (1. - f_A) / (f_A * Rv_B))

where Rv_B = 2.74 by definition (see G03_SMCBar)
where Rv_B = 2.74 for G03_SMCBar, different for other models

Parameters
----------
Expand All @@ -133,7 +133,10 @@ def get_Rv_A(self, Rv, f_A=0.5):
R(V) of the A componet
"""

Rv_B = 2.74
if hasattr(self, "BLaw"):
Rv_B = self.BLaw.Rv
else:
Rv_B = 2.74
if f_A > 0:
return 1.0 / (1.0 / (Rv * f_A) - (1.0 - f_A) / (f_A * Rv_B))
else:
Expand All @@ -147,7 +150,7 @@ def get_Rv(self, Rv_A, f_A=0.5):

1 / Rv = f_A / Rv_A + (1 - f_A) / Rv_B

where Rv_B = 2.74 by definition (see G03_SMCBar)
where Rv_B = 2.74 for G03_SMCBar, different for other models

Parameters
----------
Expand All @@ -163,7 +166,10 @@ def get_Rv(self, Rv_A, f_A=0.5):
R(V) of the mixture
"""

Rv_B = 2.74
if hasattr(self, "BLaw"):
Rv_B = self.BLaw.Rv
else:
Rv_B = 2.74
return 1.0 / (f_A / Rv_A + (1 - f_A) / Rv_B)


Expand Down
Loading