diff --git a/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/SFH.py b/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/SFH.py index f205f312db4654e7dd9d59526254f75d90738cf0..bce7fa4a010a8443cef8538e5aa399898f938cf6 100644 --- a/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/SFH.py +++ b/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/SFH.py @@ -70,7 +70,7 @@ def getSFH(filename, points): box_size = f["/Header"].attrs["BoxSize"][0] coordinates = f["/PartType4/Coordinates"][:, :] mass = f["/PartType4/Masses"][:] - birth_time = f["/PartType4/BirthTime"][:] + birth_time = f["/PartType4/BirthTimes"][:] absmaxz = 2 # kpc absmaxxy = 10 # kpc @@ -111,7 +111,7 @@ def getsfrsnapwide(numbsnaps): with h5.File(filename, "r") as f: box_size = f["/Header"].attrs["BoxSize"][0] coordinates = f["/PartType0/Coordinates"][:, :] - SFR = f["/PartType0/SFR"][:] + SFR = f["/PartType0/StarFormationRates"][:] coordinates_star = f["/PartType4/Coordinates"][:, :] masses_star = f["/PartType4/Masses"][:] time[i] = f["/Header"].attrs["Time"] @@ -154,7 +154,7 @@ if __name__ == "__main__": # Calculate the Cumulative sum of the particles from the snap shots f = h5.File("./output_0100.hdf5", "r") - birthtime = f["/PartType4/BirthTime"][:] * 9.778131e2 + birthtime = f["/PartType4/BirthTimes"][:] * 9.778131e2 mass = f["/PartType4/Masses"][:] * 1e10 CSFH_birth = np.zeros(len(logdata[:, 0])) for i in tqdm(range(len(timelog))): diff --git a/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/plotSolution.py b/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/plotSolution.py index 044ad2bc78958cbf669c7257122b1ff80a94ba1a..9c2f09b732adda3088778882ae82bfcb373cd2ce 100644 --- a/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/plotSolution.py +++ b/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/plotSolution.py @@ -139,19 +139,19 @@ SF_thresh = KS_thresh_norm * (EAGLE_Z / KS_thresh_Z0) ** (KS_thresh_slope) gas_pos = f["/PartType0/Coordinates"][:, :] gas_mass = f["/PartType0/Masses"][:] gas_rho = f["/PartType0/Densities"][:] -gas_T = f["/PartType0/Temperature"][:] -gas_SFR = f["/PartType0/SFR"][:] +gas_T = f["/PartType0/Temperatures"][:] +gas_SFR = f["/PartType0/StarFormationRates"][:] gas_XH = f["/PartType0/ElementMassFractions"][:, 0] -gas_Z = f["/PartType0/Metallicities"][:] +gas_Z = f["/PartType0/MetalMassFractions"][:] gas_hsml = f["/PartType0/SmoothingLengths"][:] gas_sSFR = gas_SFR / gas_mass # Read the Star properties stars_pos = f["/PartType4/Coordinates"][:, :] -stars_BirthDensity = f["/PartType4/BirthDensity"][:] -stars_BirthTime = f["/PartType4/BirthTime"][:] -stars_XH = f["/PartType4/ElementAbundance"][:, 0] -stars_BirthTemperature = f["/PartType4/BirthTemperature"][:] +stars_BirthDensity = f["/PartType4/BirthDensities"][:] +stars_BirthTime = f["/PartType4/BirthTimes"][:] +stars_XH = f["/PartType4/ElementMassFractions"][:, 0] +stars_BirthTemperature = f["/PartType4/BirthTemperatures"][:] # Centre the box gas_pos[:, 0] -= centre[0]