Skip to content

Commit

Permalink
ran black
Browse files Browse the repository at this point in the history
  • Loading branch information
sonachitchyan committed Jan 9, 2023
1 parent 572914a commit 33553b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tardis/plasma/properties/nlte_rate_equation_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ def solution_vector_block(self, atomic_number, number_density):
return solution_vector

def prepare_solution_vector(self, number_density):
"""Constructs the solution vector for the NLTE ionization solver set of equations by combining
"""Constructs the solution vector for the NLTE ionization solver set of equations by combining
all solution verctor blocks.
Parameters
Expand Down
13 changes: 9 additions & 4 deletions tardis/plasma/tests/test_nlte_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,16 +291,21 @@ def nlte_raw_plasma(tardis_model_config_nlte, nlte_raw_model, nlte_atom_data):


def test_critical_case(nlte_raw_plasma):
"""Compares the LTE solution with NLTE solution at a critical value of w=1.0.
"""
"""Compares the LTE solution with NLTE solution at a critical value of w=1.0."""
ion_number_density_nlte = nlte_raw_plasma.ion_number_density_nlte.values
ion_number_density_nlte[ion_number_density_nlte < 1e-10] = 0.0

ind = IonNumberDensity(nlte_raw_plasma)
ion_number_density_lte = ind.calculate(nlte_raw_plasma.thermal_phi_lte, nlte_raw_plasma.partition_function, nlte_raw_plasma.number_density)[0]
ion_number_density_lte = ind.calculate(
nlte_raw_plasma.thermal_phi_lte,
nlte_raw_plasma.partition_function,
nlte_raw_plasma.number_density,
)[0]

ion_number_density_lte = ion_number_density_lte.values
ion_number_density_lte[ion_number_density_lte < 1e-10] = 0.0 #getting rid of small numbers.
ion_number_density_lte[
ion_number_density_lte < 1e-10
] = 0.0 # getting rid of small numbers.
assert_allclose(
ion_number_density_lte,
ion_number_density_nlte,
Expand Down

0 comments on commit 33553b0

Please sign in to comment.