Advertisement
Guest User

Untitled

a guest
May 2nd, 2015
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. ds = load('myfile.hdf5',over_refine_factor=1)
  2. re = ds.region(center=[750]*3, left_edge=[700]*3, right_edge=[800]*3)
  3.  
  4. ad = re.ds.all_data()
  5. density = ad[("PartType0","density")]
  6. wdens = np.where(density == np.max(density))
  7. coordinates = ad[("PartType0","Coordinates")]
  8. cen = coordinates[wdens][0]
  9.  
  10. SlicePlot(ds, 2, ('gas', 'density'), center=cen,width = (15,'kpc')).save()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement