Skip to content

Commit

Permalink
Small bug fix for He NLTE. (#2096)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: Andrew <[email protected]>
  • Loading branch information
3 people authored Sep 28, 2022
1 parent dd838cb commit 9ecc794
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Andrew Fullard <[email protected]> Andrew Fullard <[email protected]>

Aoife Boyle <[email protected]>
Aoife Boyle <[email protected]> aoifeboyle <[email protected]>
Aoife Boyle <[email protected]>

Arib Alam <[email protected]>
Arib Alam <[email protected]> aribalam <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions tardis/plasma/properties/nlte.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 9ecc794

Please sign in to comment.