Include all the stupid tools required for BORG analysis and plotting

This commit is contained in:
Guilhem Lavaux 2014-06-18 08:55:52 +02:00
parent 81f4b642e4
commit a56eb021c4
8 changed files with 401 additions and 2 deletions

View file

@ -0,0 +1,14 @@
import numpy as np
import sys
import h5py as h5
import cosmotool as ct
s = ct.loadRamsesAll(sys.argv[1], int(sys.argv[2]), doublePrecision=True, loadVelocity=True)
q = [p for p in s.getPositions()]
q += [p for p in s.getVelocities()]
q = np.array(q)
with h5.File("particles.h5", mode="w") as f:
f.create_dataset("particles", data=q.transpose())