Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small bug fix for He NLTE. #2096

Merged
merged 5 commits into from Sep 28, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))
(2 ** (-1.0))
)
andrewfullard marked this conversation as resolved.
Show resolved Hide resolved
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]))
andrewfullard marked this conversation as resolved.
Show resolved Hide resolved
* (1.0 / (2 * 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]) / 2)
* g_electron
* np.exp(-ionization_data.loc[2, 2] * beta_rad)
* w
Expand Down