Skip to content

Commit

Permalink
Small fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aoife Boyle authored and wkerzendorf committed Aug 3, 2015
1 parent c7f3d47 commit a1671a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tardis/plasma/properties/partition_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def _main_nlte_calculation(self, nlte_species, atomic_data, nlte_data,
t_electron, j_blues, beta_sobolevs, general_level_boltzmann_factor,
previous_electron_densities):
for species in nlte_species:
j_blues = j_blues.values
logger.info('Calculating rates for species %s', species)
number_of_levels = atomic_data.levels.energy.ix[species].count()
lnl = nlte_data.lines_level_number_lower[species]
Expand All @@ -97,13 +98,13 @@ def _main_nlte_calculation(self, nlte_species, atomic_data, nlte_data,
r_ul_matrix_reshaped = r_ul_matrix.reshape((number_of_levels**2,
len(t_electron)))
r_ul_matrix_reshaped[r_ul_index] = A_uls[np.newaxis].T + \
B_uls[np.newaxis].T * j_blues.ix[lines_index]
B_uls[np.newaxis].T * j_blues[lines_index]
r_ul_matrix_reshaped[r_ul_index] *= beta_sobolevs[lines_index]
r_lu_matrix = np.zeros_like(r_ul_matrix)
r_lu_matrix_reshaped = r_lu_matrix.reshape((number_of_levels**2,
len(t_electron)))
r_lu_matrix_reshaped[r_lu_index] = B_lus[np.newaxis].T * \
j_blues.ix[lines_index] * beta_sobolevs[lines_index]
j_blues[lines_index] * beta_sobolevs[lines_index]
if atomic_data.has_collision_data:
if previous_electron_densities is None:
collision_matrix = r_ul_matrix.copy()
Expand Down

0 comments on commit a1671a6

Please sign in to comment.