Skip to content

Commit ed393ef

Browse files
committed
Bug fix
1 parent 7a75b58 commit ed393ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scico/linop/xray/astra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def volume_coords_to_world_coords(idx: np.ndarray, vol_geom: VolumeGeometry) ->
141141

142142
def _volume_index_to_astra_world_2d(idx: np.ndarray, vol_geom: VolumeGeometry) -> np.ndarray:
143143
"""Convert a 2D volume coordinate into a 2D world coordinate."""
144-
coord = idx[..., [2, 1]] # x:col, y:row,
144+
coord = idx[..., [1, 0]] # x:col, y:row,
145145
nx = np.array( # (x, y) order
146146
(
147147
vol_geom["GridColCount"],

scico/test/linop/xray/test_astra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def test_convert_from_scico_geometry(test_geometry):
317317

318318
def test_vol_coord_to_world_coord():
319319
vol_geom = scico.linop.xray.astra.astra.create_vol_geom(16, 16)
320-
vc = np.array([[0.0, 0.0, 0.0], [1.0, 1.0, 0.0]])
320+
vc = np.array([[0.0, 0.0], [1.0, 1.0]])
321321
wc = scico.linop.xray.astra.volume_coords_to_world_coords(vc, vol_geom)
322322
assert wc.shape == (2, 2)
323323

0 commit comments

Comments
 (0)