add gui
This commit is contained in:
+17
-12
@@ -34,14 +34,16 @@ class PostProcessor(HDF5Container):
|
||||
else:
|
||||
tag_name = ""
|
||||
|
||||
self.filename = path_out + "/postproc_" + tag_name + format(num, "05") + ".h5"
|
||||
|
||||
self.cells_filename = (
|
||||
path_out + "/cells_" + tag_name + format(num, "05") + ".h5"
|
||||
self.filename = (
|
||||
self.path_out + "/postproc_" + tag_name + format(num, "05") + ".h5"
|
||||
)
|
||||
|
||||
if not os.path.exists(path_out):
|
||||
os.makedirs(path_out)
|
||||
self.cells_filename = (
|
||||
self.path_out + "/cells_" + tag_name + format(num, "05") + ".h5"
|
||||
)
|
||||
|
||||
if not os.path.exists(self.path_out):
|
||||
os.makedirs(self.path_out)
|
||||
|
||||
self.open()
|
||||
|
||||
@@ -50,7 +52,10 @@ class PostProcessor(HDF5Container):
|
||||
self.run = os.path.basename(path)
|
||||
self.num = num
|
||||
self._ro = pymses.RamsesOutput(
|
||||
path, num, order=pp_params.pymses.order, verbose=pp_params.pymses.verbose
|
||||
path,
|
||||
num,
|
||||
order=self.pp_params.pymses.order,
|
||||
verbose=self.pp_params.pymses.verbose,
|
||||
)
|
||||
self._amr = self._ro.amr_source(self.pp_params.pymses.variables)
|
||||
self.info = self._ro.info.copy()
|
||||
@@ -61,7 +66,7 @@ class PostProcessor(HDF5Container):
|
||||
)
|
||||
|
||||
# Density ray tracer
|
||||
if pp_params.pymses.fft:
|
||||
if self.pp_params.pymses.fft:
|
||||
self._rt = splatting.SplatterProcessor(
|
||||
self._amr, self._ro.info, self._rho_op
|
||||
)
|
||||
@@ -69,9 +74,9 @@ class PostProcessor(HDF5Container):
|
||||
self._rt = raytracing.RayTracer(self._amr, self._ro.info, self._rho_op)
|
||||
|
||||
# Set the extend of the image
|
||||
self._radius = 0.5 / pp_params.pymses.zoom
|
||||
self._radius = 0.5 / self.pp_params.pymses.zoom
|
||||
self._lbox = self.info["boxlen"]
|
||||
center = pp_params.pymses.center
|
||||
center = self.pp_params.pymses.center
|
||||
im_extent = [
|
||||
(-self._radius + center[0]),
|
||||
(self._radius + center[0]),
|
||||
@@ -103,13 +108,13 @@ class PostProcessor(HDF5Container):
|
||||
ax_v = self._axes_v[ax_los]
|
||||
|
||||
self._cam[ax_los] = Camera(
|
||||
center=pp_params.pymses.center,
|
||||
center=self.pp_params.pymses.center,
|
||||
line_of_sight_axis=ax_los,
|
||||
region_size=[2.0 * self._radius, 2.0 * self._radius],
|
||||
distance=self._radius,
|
||||
far_cut_depth=self._radius,
|
||||
up_vector=ax_v,
|
||||
map_max_size=pp_params.pymses.map_size,
|
||||
map_max_size=self.pp_params.pymses.map_size,
|
||||
)
|
||||
|
||||
self.close()
|
||||
|
||||
Reference in New Issue
Block a user