From 12ac5137e1f8e6bb002ca56ad5946cbba78e1cb0 Mon Sep 17 00:00:00 2001 From: Natasha Batalha Date: Mon, 8 Jul 2024 11:54:46 -0700 Subject: [PATCH] critical hot fix; fixes bug that is pulling 3 as the mass of He --- picaso/atmsetup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/picaso/atmsetup.py b/picaso/atmsetup.py index c4c05676..d8336ba4 100755 --- a/picaso/atmsetup.py +++ b/picaso/atmsetup.py @@ -330,7 +330,9 @@ def get_weights(self, molecule): el, num = sep #default isotope if iso_num=='main': - iso_num = list(ele[el].isotopes.keys())[0] + #select the main isotope off according to that with the highest relative abundance + main_iso = np.argmax([ele[el].isotopes[i].abundance for i in ele[el].isotopes.keys()]) + iso_num = list(ele[el].isotopes.keys())[main_iso] totmass += ele[el].isotopes[iso_num].mass*float(num) weights[i]=totmass