From 057cd860bb57ad5e3e7b0e9530af738bbf7e903f Mon Sep 17 00:00:00 2001 From: Aoife Boyle Date: Wed, 1 Jul 2015 19:20:43 +0100 Subject: [PATCH] Fixes. --- tardis/plasma/properties/ion_population.py | 2 +- tardis/plasma/properties/radiative_properties.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tardis/plasma/properties/ion_population.py b/tardis/plasma/properties/ion_population.py index 5d1a0380306..5c113c801ab 100644 --- a/tardis/plasma/properties/ion_population.py +++ b/tardis/plasma/properties/ion_population.py @@ -60,7 +60,7 @@ class PhiSahaNebular(ProcessingPlasmaProperty): """ - outputs = 'phi' + outputs = ('phi',) @staticmethod def calculate(general_phi, t_rad, w, zeta_data, t_electron, delta): diff --git a/tardis/plasma/properties/radiative_properties.py b/tardis/plasma/properties/radiative_properties.py index 3808db11ff3..d27dd406517 100644 --- a/tardis/plasma/properties/radiative_properties.py +++ b/tardis/plasma/properties/radiative_properties.py @@ -116,6 +116,8 @@ class BetaSobolev(ProcessingPlasmaProperty): def calculate(self, tau_sobolevs): if getattr(self, 'beta_sobolev', None) is None: beta_sobolev = np.zeros_like(tau_sobolevs.values) + else: + beta_sobolev = self.beta_sobolev macro_atom.calculate_beta_sobolev( tau_sobolevs.values.ravel(order='F'), @@ -127,7 +129,7 @@ class TransitionProbabilities(ProcessingPlasmaProperty): def calculate(self, atomic_data, beta_sobolev, j_blues, stimulated_emission_factor, tau_sobolevs): - if j_blues.empty: + if len(j_blues) == 0: transition_probabilities = None else: try: @@ -142,7 +144,7 @@ def calculate(self, atomic_data, beta_sobolev, j_blues, (macro_atom_data.transition_type == 1).values macro_atom_transition_up_filter = \ macro_atom_data.lines_idx.values[transition_up_filter] - j_blues = j_blues.values.take(macro_atom_transition_up_filter, + j_blues = j_blues.take(macro_atom_transition_up_filter, axis=0, mode='raise') macro_stimulated_emission = stimulated_emission_factor.take( macro_atom_transition_up_filter, axis=0, mode='raise')