Commits

J.S. Oishi  committed 9a98ec8

added first profile script

  • Participants
  • Parent commits 3c2fcdd

Comments (0)

Files changed (1)

File scripts/profile.py

+from yt.config import ytcfg
+ytcfg['yt','suppressStreamLogging'] = 'True'
+from yt.mods import *
+
+pf  = load("data/enzo_tiny_cosmology/DD0042/DD0042")
+c = pf.h.find_max("Density")[1]
+sph = pf.h.sphere(c, 10./pf['mpc']) # a 1 Mpc sphere
+
+prof = BinnedProfile1D(sph, 32, "RadiusMpc", 1, 10)
+prof.add_fields("Density")
+
+print prof['RadiusMpc'], prof['Density']