-
-
Save matthewturk/c93fd01b30bb41b79e54246ded69049d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import h5py | |
with h5py.File("GadgetDiskGalaxy/snapshot_200.hdf5", "r") as f: | |
coords = f["/PartType0/Coordinates"][()] | |
masses = f["/PartType0/Masses"][()] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment