import caesar import numpy as np caesarfile = '/orange/narayanan/desika.narayanan/gizmo_runs/simba/m100n1024/Groups/m100n1024_078.hdf5' obj = caesar.load(caesarfile) ngal = obj.ngalaxies sfr = [obj.galaxies[i].sfr for i in range(ngal)] mstar = [obj.galaxies[i].masses['stellar'] for i in range(ngal)] mmol = [obj.galaxies[i].masses['H2'] for i in range(ngal)] metallicity = [obj.galaxies[i].metallicity for i in range(ngal)] np.savez('popping_shivaei.npz',ngal=ngal,sfr=sfr,mstar=mstar,mmol=mmol,metallicity=metallicity)