Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ds = load('myfile.hdf5',over_refine_factor=1)
- re = ds.region(center=[750]*3, left_edge=[700]*3, right_edge=[800]*3)
- ad = re.ds.all_data()
- density = ad[("PartType0","density")]
- wdens = np.where(density == np.max(density))
- coordinates = ad[("PartType0","Coordinates")]
- cen = coordinates[wdens][0]
- SlicePlot(ds, 2, ('gas', 'density'), center=cen,width = (15,'kpc')).save()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement