Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngoldbaum/9506a215c8ae5770e0149dccde8ed012 to your computer and use it in GitHub Desktop.
Save ngoldbaum/9506a215c8ae5770e0149dccde8ed012 to your computer and use it in GitHub Desktop.
import yt
import numpy as np
filename = "http://darksky.slac.stanford.edu/simulations/ds14_a/ds14_a_1.0000"
midx = "http://darksky.slac.stanford.edu/simulations/ds14_a/ds14_a_1.0000.midx10"
bbox = np.array([[0.0]*3,
[10*1e3]*3])
ds = yt.load(filename,
midx_filename=midx,
bounding_box=bbox)
print(ds.field_list)
print(ds.derived_field_list)
sp = ds.sphere(ds.domain_center, (5, 'Mpc'))
print(sp['dark_matter', 'particle_radial_velocity'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment