diff --git a/tardis/io/atomic.py b/tardis/io/atomic.py index 3ab59be373a..a76174036a6 100644 --- a/tardis/io/atomic.py +++ b/tardis/io/atomic.py @@ -452,7 +452,7 @@ def _create_collision_coefficient_matrix(self): C_ul_matrix[level_number_lower, level_number_upper, :] = line.values[2:] delta_E_matrix[level_number_lower, level_number_upper] = line['delta_e'] #TODO TARDISATOMIC fix change the g_ratio to be the otherway round - I flip them now here. - g_ratio_matrix[level_number_lower, level_number_upper] = 1/line['g_ratio'] + g_ratio_matrix[level_number_lower, level_number_upper] = line['g_ratio'] self.C_ul_interpolator[species] = interpolate.interp1d( self.atom_data.collision_data_temperatures, C_ul_matrix) diff --git a/tardis/plasma/properties/partition_function.py b/tardis/plasma/properties/partition_function.py index cb209a123b2..058dcb17bd1 100644 --- a/tardis/plasma/properties/partition_function.py +++ b/tardis/plasma/properties/partition_function.py @@ -124,7 +124,7 @@ def __init__(self, plasma_parent): def _main_nlte_calculation( self, atomic_data, nlte_data, t_electrons, j_blues, beta_sobolevs, general_level_boltzmann_factor, - previous_electron_densities, g): + previous_electron_densities): """ The core of the NLTE calculation, used with all possible config. options. @@ -189,14 +189,14 @@ def _main_nlte_calculation( 'collision data?') else: raise e - general_level_boltzmann_factor[i].ix[species] = \ - level_boltzmann_factor * g.loc[species][0] / level_boltzmann_factor[0] + general_level_boltzmann_factor[i].loc[species] = \ + level_boltzmann_factor return general_level_boltzmann_factor def _calculate_classical_nebular( self, t_electrons, lines, atomic_data, nlte_data, general_level_boltzmann_factor, j_blues, - previous_electron_densities, g): + previous_electron_densities): """ Performs NLTE calculations using the classical nebular treatment. All beta sobolev values taken as 1. @@ -210,13 +210,13 @@ def _calculate_classical_nebular( j_blues, beta_sobolevs, general_level_boltzmann_factor, - previous_electron_densities, g) + previous_electron_densities) return general_level_boltzmann_factor def _calculate_coronal_approximation( self, t_electrons, lines, atomic_data, nlte_data, general_level_boltzmann_factor, - previous_electron_densities, g): + previous_electron_densities): """ Performs NLTE calculations using the coronal approximation. All beta sobolev values taken as 1 and j_blues taken as 0. @@ -226,13 +226,13 @@ def _calculate_coronal_approximation( general_level_boltzmann_factor = self._main_nlte_calculation( atomic_data, nlte_data, t_electrons, j_blues, beta_sobolevs, general_level_boltzmann_factor, - previous_electron_densities, g) + previous_electron_densities) return general_level_boltzmann_factor def _calculate_general( self, t_electrons, lines, atomic_data, nlte_data, general_level_boltzmann_factor, j_blues, - previous_beta_sobolev, previous_electron_densities, g): + previous_beta_sobolev, previous_electron_densities): """ Full NLTE calculation without approximations. """ @@ -244,7 +244,7 @@ def _calculate_general( general_level_boltzmann_factor = self._main_nlte_calculation( atomic_data, nlte_data, t_electrons, j_blues, beta_sobolevs, general_level_boltzmann_factor, - previous_electron_densities, g) + previous_electron_densities) return general_level_boltzmann_factor