Skip to content

Commit

Permalink
make preprocess function return processed dataframe
Browse files Browse the repository at this point in the history
  • Loading branch information
jvshields committed Sep 30, 2024
1 parent 7f049af commit 7ad4f6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stardis/plasma/molecules.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def calculate(self, ion_number_density, t_electrons, atomic_data):
)

for ion in [1, 2]:
self.preprocess_ion(molecules_df, ion)
molecules_df = self.preprocess_ion(molecules_df, ion)

number_densities_arr = np.zeros(
(len(atomic_data.molecule_data.equilibrium_constants), len(t_electrons))
Expand Down Expand Up @@ -131,7 +131,7 @@ def preprocess_ion(self, molecules_df, ion):
molecules_df[f"Ion{ion}_charge"] = molecules_df[f"Ion{ion}_positive"].apply(
len
) - molecules_df[f"Ion{ion}_negative"].apply(len)
return
return molecules_df


class MoleculePartitionFunction(ProcessingPlasmaProperty):
Expand Down

0 comments on commit 7ad4f6f

Please sign in to comment.