From df8848757d8ddb40d4543ff0e4d718e2e8906f49 Mon Sep 17 00:00:00 2001 From: Karl Gordon Date: Tue, 3 Nov 2026 16:47:43 -0500 Subject: [PATCH 1/2] removing hard coding of extinction Blaw Rv value --- beast/physicsmodel/dust/extinction.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beast/physicsmodel/dust/extinction.py b/beast/physicsmodel/dust/extinction.py index aa0c0bda..5d4b0180 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,7 @@ def get_Rv_A(self, Rv, f_A=0.5): R(V) of the A componet """ - Rv_B = 2.74 + Rv_B = self.BLaw.Rv if f_A > 0: return 1.0 / (1.0 / (Rv * f_A) - (1.0 - f_A) / (f_A * Rv_B)) else: @@ -147,7 +147,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 +163,7 @@ def get_Rv(self, Rv_A, f_A=0.5): R(V) of the mixture """ - Rv_B = 2.74 + Rv_B = self.BLaw.Rv return 1.0 / (f_A / Rv_A + (1 - f_A) / Rv_B) From dc91e09356269df91903bd9734b045332d632c14 Mon Sep 17 00:00:00 2001 From: Karl Gordon Date: Tue, 3 Nov 2026 16:56:02 -0500 Subject: [PATCH 2/2] better handling of the original mixture model --- beast/physicsmodel/dust/extinction.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/beast/physicsmodel/dust/extinction.py b/beast/physicsmodel/dust/extinction.py index 5d4b0180..4893b8ab 100644 --- a/beast/physicsmodel/dust/extinction.py +++ b/beast/physicsmodel/dust/extinction.py @@ -133,7 +133,10 @@ def get_Rv_A(self, Rv, f_A=0.5): R(V) of the A componet """ - Rv_B = self.BLaw.Rv + 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: @@ -163,7 +166,10 @@ def get_Rv(self, Rv_A, f_A=0.5): R(V) of the mixture """ - Rv_B = self.BLaw.Rv + 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)