From ae492d107cf82886ee7bd00c7933c07cc347cb9f Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Mon, 26 Aug 2019 12:53:29 +0100 Subject: [PATCH] Updated the metallicity enrichment plot to use the new field names. --- .../SubgridTests/StellarEvolution/plot_box_evolution.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/SubgridTests/StellarEvolution/plot_box_evolution.py b/examples/SubgridTests/StellarEvolution/plot_box_evolution.py index bcfa85a1af..96f4acf435 100644 --- a/examples/SubgridTests/StellarEvolution/plot_box_evolution.py +++ b/examples/SubgridTests/StellarEvolution/plot_box_evolution.py @@ -104,15 +104,15 @@ for i in range(n_snapshots): #print("reading snapshot "+str(i)) sim = h5py.File("stellar_evolution_%04d.hdf5"%i, "r") t[i] = sim["/Header"].attrs["Time"][0] - + masses = sim["/PartType0/Masses"][:] swift_box_gas_mass[i] = np.sum(masses) - Z_star = sim["/PartType4/Metallicity"][0] + Z_star = sim["/PartType4/MetalMassFractions"][0] star_masses = sim["/PartType4/Masses"][:] swift_box_star_mass[i] = np.sum(star_masses) - metallicities = sim["/PartType0/Metallicities"][:] + metallicities = sim["/PartType0/MetalMassFractions"][:] swift_box_gas_metal_mass[i] = np.sum(metallicities * masses) element_abundances = sim["/PartType0/ElementMassFractions"][:][:] -- GitLab