From 9ecc7942b8f15dbfcc0018d268defc9224d54dc4 Mon Sep 17 00:00:00 2001 From: aoife-boyle <98392726+aoife-boyle@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:52:26 +0200 Subject: [PATCH] Small bug fix for He NLTE. (#2096) * Small bug fix for He NLTE. * Addition of new account to mailmap. * Better fix. * Change float() to .values * Revert .values change Co-authored-by: aoifeboyle Co-authored-by: Andrew --- .mailmap | 1 + tardis/plasma/properties/nlte.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.mailmap b/.mailmap index 2b6e2210b5a..e06791f37dd 100644 --- a/.mailmap +++ b/.mailmap @@ -20,6 +20,7 @@ Andrew Fullard Andrew Fullard Aoife Boyle Aoife Boyle aoifeboyle +Aoife Boyle Arib Alam Arib Alam aribalam diff --git a/tardis/plasma/properties/nlte.py b/tardis/plasma/properties/nlte.py index 9989561c493..72d5734e99e 100644 --- a/tardis/plasma/properties/nlte.py +++ b/tardis/plasma/properties/nlte.py @@ -86,7 +86,7 @@ def calculate( helium_population.loc[0, 0] = 0.0 # He II excited states he_two_population = level_boltzmann_factor.loc[2, 1].mul( - (g.loc[2, 1, 0] ** (-1.0)) + (float(g.loc[2,1,0]) ** (-1.0)) ) helium_population.loc[1].update(he_two_population) # He II ground state @@ -117,7 +117,7 @@ def calculate_helium_one( """ return ( level_boltzmann_factor.loc[2, 0] - * (1.0 / (2 * g.loc[2, 1, 0])) + * (1.0 / (float(g.loc[2,1,0]) * 2)) * (1 / g_electron) * (1 / (w**2.0)) * np.exp(ionization_data.loc[2, 1] * beta_rad) @@ -141,7 +141,7 @@ def calculate_helium_three( zeta = PhiSahaNebular.get_zeta_values(zeta_data, 2, t_rad)[1] he_three_population = ( 2 - * (float(g.loc[2, 2, 0]) / g.loc[2, 1, 0]) + * (float(g.loc[2, 2, 0]) / float(g.loc[2,1,0])) * g_electron * np.exp(-ionization_data.loc[2, 2] * beta_rad) * w