Advertisement
Guest User

Untitled

a guest
Jul 8th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import yt
  2.  
  3. yt.enable_parallelism()
  4.  
  5. # Set the custom snapshot structure
  6. my_field_def = ("Coordinates",
  7. "Velocities",
  8. "ParticleIDS",
  9. "Mass",
  10. ("Temperature", "Halo"),
  11. ("Density", "Halo"),
  12. ("SmoothingLength", "Halo"),)
  13.  
  14. # Load the snapshot
  15. ds = yt.load('./snapshot_001-fake_gas-dspec-tspec', field_spec=my_field_def)
  16.  
  17. # Make the plot
  18. prj = yt.ProjectionPlot(ds, fields=('deposit', 'Halo_density'), axis='z')
  19. prj.save()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement