This commit is contained in:
Noe Brucy
2023-05-05 20:24:35 +02:00
parent 5d1e19e3b4
commit 58d6f17b6f

View File

@@ -332,9 +332,9 @@ class Galsec:
spacing between two y bins spacing between two y bins
""" """
for fluid in self.fluids: for fluid in self.fluids:
x_bin = np.trunc(self.data[fluid]["position"][:, 0] / delta_x) x_bin = np.floor(self.data[fluid]["position"][:, 0] / delta_x)
y_bin = np.trunc(self.data[fluid]["position"][:, 1] / delta_y) y_bin = np.floor(self.data[fluid]["position"][:, 1] / delta_y)
z_bin = np.trunc(self.data[fluid]["position"][:, 2] / delta_z) z_bin = np.floor(self.data[fluid]["position"][:, 2] / delta_z)
self.data[fluid]["x_bin"] = (x_bin + 0.5) * delta_x # Store the middle value self.data[fluid]["x_bin"] = (x_bin + 0.5) * delta_x # Store the middle value
self.data[fluid]["y_bin"] = (y_bin + 0.5) * delta_y # Store the middle value self.data[fluid]["y_bin"] = (y_bin + 0.5) * delta_y # Store the middle value
self.data[fluid]["z_bin"] = (z_bin + 0.5) * delta_z # Store the middle value self.data[fluid]["z_bin"] = (z_bin + 0.5) * delta_z # Store the middle value