diff --git a/beast/physicsmodel/dust/extinction.py b/beast/physicsmodel/dust/extinction.py index aa0c0bda..4893b8ab 100644 --- a/beast/physicsmodel/dust/extinction.py +++ b/beast/physicsmodel/dust/extinction.py @@ -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 ---------- @@ -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: @@ -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 ---------- @@ -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)