Skip to content

Commit 4ca1050

Browse files
authored
Merge pull request #211 from DiamondLightSource/fbp2dcorr
corrections to the fbp2d astra to flipud the result
2 parents ee37877 + 3dee8c7 commit 4ca1050

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

httomolibgpu/recon/algorithm.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,14 @@ def FBP2d_astra(
119119

120120
# loop over detY slices
121121
for slice_index in range(0, detY_size):
122-
reconstruction[:, slice_index, :] = RecTools.FBP(
123-
data[:, slice_index, :],
124-
filter_type=filter_type,
125-
filter_parameter=filter_parameter,
126-
filter_d=filter_d,
127-
recon_mask_radius=recon_mask_radius,
122+
reconstruction[:, slice_index, :] = np.flipud(
123+
RecTools.FBP(
124+
data[:, slice_index, :],
125+
filter_type=filter_type,
126+
filter_parameter=filter_parameter,
127+
filter_d=filter_d,
128+
recon_mask_radius=recon_mask_radius,
129+
)
128130
)
129131
return reconstruction
130132

zenodo-tests/test_recon/test_algorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_reconstruct_FBP2d_astra_i12_dataset1(i12_dataset1):
4141
recon_mask_radius=0.9,
4242
)
4343
assert recon_data.flags.c_contiguous
44-
assert_allclose(np.sum(recon_data), 84673.68, rtol=1e-07, atol=1e-6)
44+
assert_allclose(np.sum(recon_data), 84672.84, atol=1e-2)
4545
assert recon_data.dtype == np.float32
4646
assert recon_data.shape == (2560, 50, 2560)
4747

0 commit comments

Comments
 (0)