Skip to content

Instantly share code, notes, and snippets.

@matthewturk
Last active February 11, 2021 17:16
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 matthewturk/c93fd01b30bb41b79e54246ded69049d to your computer and use it in GitHub Desktop.
Save matthewturk/c93fd01b30bb41b79e54246ded69049d to your computer and use it in GitHub Desktop.
import numpy as np
x = np.random.normal(size=(64**3))
y = np.random.normal(size=(64**3))
z = np.concatenate([np.random.normal(size=(64**3)//2, loc = -1.5),
np.random.normal(size=(64**3)//2, loc = 1.5)])
import h5py
with h5py.File("GadgetDiskGalaxy/snapshot_200.hdf5", "r") as f:
coords = f["/PartType0/Coordinates"][()]
masses = f["/PartType0/Masses"][()]
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment