Read boxsize

This commit is contained in:
Noe Brucy
2023-05-10 08:46:13 +02:00
parent 304a8b9e84
commit 7429fb8181
3 changed files with 14 additions and 8 deletions

View File

@@ -52,7 +52,9 @@ def load_fields(path):
# Create dataset
data = {
"header": {"time": time * UnitTime_in_Myr, "fluids": ["gas", "stars"]},
"header": {"time": time * UnitTime_in_Myr,
"fluids": ["gas", "stars"],
"box_size": box_size * UnitLength_in_kpc },
"gas": {
"position": (
np.asarray(gas["CenterOfMass"]) - np.array([0.5, 0.5, 0.5]) * box_size