Update sectors extractions scripts
This commit is contained in:
@@ -229,6 +229,7 @@ class Galsec:
|
||||
A dataset of cells in the following format:
|
||||
header:
|
||||
time float [Myr] time since the start of the simulation
|
||||
fluids str list list of fluids included
|
||||
gas:
|
||||
position float array (Ngas, 3) [kpc], centered
|
||||
volume float array (Ngas) [pc^3]
|
||||
@@ -251,6 +252,8 @@ class Galsec:
|
||||
"""
|
||||
|
||||
self.data = {}
|
||||
if "fluids" in data["header"]:
|
||||
self.fluids = data["header"]["fluids"]
|
||||
|
||||
for fluid in self.fluids:
|
||||
self.data[fluid] = QTable(data[fluid], units=self.units[fluid], copy=copy)
|
||||
@@ -406,8 +409,8 @@ class Galsec:
|
||||
filtered_data = self.data[fluid][
|
||||
(self.data[fluid]["r"] > rmin)
|
||||
& (self.data[fluid]["r"] < rmax)
|
||||
& (self.data[fluid]["z"] > zmin)
|
||||
& (self.data[fluid]["z"] < zmax)
|
||||
& (self.data[fluid]["position"][:, 2] > zmin)
|
||||
& (self.data[fluid]["position"][:, 2] < zmax)
|
||||
]
|
||||
grouped_data[fluid] = filtered_data.group_by(["r_bin"])
|
||||
self.rings[fluid] = hstack(
|
||||
|
||||
Reference in New Issue
Block a user