correct bugs
This commit is contained in:
+6
-6
@@ -75,7 +75,7 @@ class PostProcessor(HDF5Container):
|
||||
|
||||
# Set the extend of the image
|
||||
self._radius = 0.5 / self.pp_params.pymses.zoom
|
||||
self._lbox = self.info["boxlen"]
|
||||
self.lbox = self.info["boxlen"]
|
||||
center = self.pp_params.pymses.center
|
||||
im_extent = [
|
||||
(-self._radius + center[0]),
|
||||
@@ -91,7 +91,7 @@ class PostProcessor(HDF5Container):
|
||||
self.save.root._v_attrs.dir = os.path.dirname(path)
|
||||
self.save.root._v_attrs.run = os.path.basename(path)
|
||||
self.save.root._v_attrs.num = num
|
||||
self.save.root._v_attrs.lbox = self._lbox
|
||||
self.save.root._v_attrs.lbox = self.lbox
|
||||
self.save.root._v_attrs.unit_length = self.info["unit_length"]
|
||||
self.save.root._v_attrs.time = time
|
||||
|
||||
@@ -361,7 +361,7 @@ class PostProcessor(HDF5Container):
|
||||
# Operator to compute the angular speed times rho
|
||||
def omega_rho_func(dset):
|
||||
pos = dset.get_cell_centers()
|
||||
pos = pos - (self.pp_params.disk.pos_star / self._lbox)
|
||||
pos = pos - (self.pp_params.disk.pos_star / self.lbox)
|
||||
xx = pos[:, :, 0]
|
||||
yy = pos[:, :, 1]
|
||||
rc = np.sqrt(xx ** 2 + yy ** 2) # cylindrical radius
|
||||
@@ -401,7 +401,7 @@ class PostProcessor(HDF5Container):
|
||||
dmap_cs = rt_cs.process(self._cam[ax_los])
|
||||
dmap_col = self.save.root.maps.coldens_z.read()
|
||||
map_Q = (
|
||||
(self._lbox * dmap_cs.map.T)
|
||||
(self.lbox * dmap_cs.map.T)
|
||||
* dmap_omega.map.T
|
||||
/ (np.pi * self.G * dmap_col)
|
||||
)
|
||||
@@ -412,7 +412,7 @@ class PostProcessor(HDF5Container):
|
||||
Computes radial bins (for disk)
|
||||
"""
|
||||
pos_star = self.pp_params.disk.pos_star
|
||||
im_extent = self.save.root.maps._v_attrs.im_extent
|
||||
im_extent = np.array(self.save.root.maps._v_attrs.im_extent) * self.lbox
|
||||
|
||||
# radius of the corner of the box plus a margin
|
||||
rad_of_box = (
|
||||
@@ -442,7 +442,7 @@ class PostProcessor(HDF5Container):
|
||||
"""
|
||||
Computes the radius from the center
|
||||
"""
|
||||
im_extent = self.save.root.maps._v_attrs.im_extent
|
||||
im_extent = np.array(self.save.root.maps._v_attrs.im_extent) * self.lbox
|
||||
map_size = self.pp_params.pymses.map_size
|
||||
pos_star = self.pp_params.disk.pos_star
|
||||
|
||||
|
||||
Reference in New Issue
Block a user