Skip to content

Commit

Permalink
BUG: fix a defect in OffAxisProjectionFixedResolutionBuffer._generate…
Browse files Browse the repository at this point in the history
…_image_and_mask
  • Loading branch information
neutrinoceros committed Jul 19, 2024
1 parent 151697f commit ccd3beb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions yt/utilities/lib/pixelization_routines.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2112,6 +2112,8 @@ def off_axis_projection_SPH(np.float64_t[:] px,
depth = 2. * np.sqrt((bounds[1] - bounds[0])**2
+ (bounds[3] - bounds[2])**2
+ (bounds[5] - bounds[4])**2)
print("depth=",depth)
print("depth.shape=", depth.shape)
px_rotated, py_rotated, pz_rotated, \
rot_bounds_x0, rot_bounds_x1, \
rot_bounds_y0, rot_bounds_y1, \
Expand Down
3 changes: 2 additions & 1 deletion yt/visualization/fixed_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ def _generate_image_and_mask(self, item) -> None:
self.bounds[5] - self.bounds[4],
)
)
depth = dd.depth[0] if dd.depth is not None else None
buff = off_axis_projection(
dd.dd,
dd.center,
Expand All @@ -651,7 +652,7 @@ def _generate_image_and_mask(self, item) -> None:
no_ghost=dd.no_ghost,
interpolated=dd.interpolated,
north_vector=dd.north_vector,
depth=dd.depth,
depth=depth,
method=dd.method,
)
if self.data_source.moment == 2:
Expand Down

0 comments on commit ccd3beb

Please sign in to comment.