diff --git a/galsec.py b/galsec.py index f236c6d..ed54234 100644 --- a/galsec.py +++ b/galsec.py @@ -335,9 +335,9 @@ class Galsec: x_bin = np.trunc(self.data[fluid]["position"][:, 0] / delta_x) y_bin = np.trunc(self.data[fluid]["position"][:, 1] / delta_y) z_bin = np.trunc(self.data[fluid]["position"][:, 2] / delta_z) - self.data[fluid]["x_bin"] = x_bin - self.data[fluid]["y_bin"] = y_bin - self.data[fluid]["z_bin"] = z_bin + 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]["z_bin"] = (z_bin + 0.5) * delta_z # Store the middle value def sector_analysis( self,