Commits

J.S. Oishi  committed a495c39

frb one now works.

  • Participants
  • Parent commits 7986c15

Comments (0)

Files changed (1)

File scripts/frb.py

 from yt.mods import *
+import pylab as P
 
 direction = 0
-
 pf  = load("data/enzo_tiny_cosmology/DD0042/DD0042")
 
-
-#
+# get the projection *object*
 proj = pf.h.proj(direction,"Density", "Density")
 
-
 c = pf.h.find_max("Density")[1]
-width = ( 1, 'Mpc')
+width = ( 100, 'mpc')
 xax, yax = x_dict[direction], y_dict[direction] # handy helper!
 LE = (c[xax] - 0.5*width[0]/pf[width[1].lower()], 
       c[yax] - 0.5*width[0]/pf[width[1].lower()])
 RE = (c[xax] + 0.5*width[0]/pf[width[1].lower()], 
       c[yax] + 0.5*width[0]/pf[width[1].lower()])
 
+# 
+frb = FixedResolutionBuffer(proj, (LE[0],RE[0],LE[1],RE[1]), (512,512))
 
-frb = FixedResolutionBuffer(proj, (LE[0],RE[0],LE[1],RE[1]), (512,512))
+P.imshow(frb['Density'])
+P.savefig('projection_frb.png')