Skip to content

Commit

Permalink
Make axis-ordering generic
Browse files Browse the repository at this point in the history
Use `axis_order` rather than hard-coded `xyz`, so that datasets with ordering such as `zyx` may be supported.

Co-authored-by: Chris Havlin <[email protected]>
  • Loading branch information
cphyc and chrishavlin authored Nov 26, 2024
1 parent 8c5d431 commit 3b41478
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yt/visualization/volume_rendering/off_axis_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def temp_weightfield(field, data):
)

for idim, periodic in enumerate(data_source.ds.periodicity):
axis = "xyz"[idim]
axis = data_source.ds.coordinates.axis_order[idim]
xyz[..., idim] = data_source["index", axis] - center[idim]
if not periodic:
continue
Expand Down

0 comments on commit 3b41478

Please sign in to comment.