diff --git a/scico/linop/xray/astra.py b/scico/linop/xray/astra.py index 09a7cbed5..aa530a6ef 100644 --- a/scico/linop/xray/astra.py +++ b/scico/linop/xray/astra.py @@ -191,7 +191,6 @@ def fbp(self, sino: jax.Array, filter_type: str = "Ram-Lak") -> jax.Array: `__. """ - # Just use the CPU FBP alg for now; hitting memory issues with GPU one. def f(sino): sino = _ensure_writeable(sino) sino_id = astra.data2d.create("-sino", self.proj_geom, sino) @@ -200,7 +199,7 @@ def f(sino): rec_id = astra.data2d.create("-vol", self.vol_geom) # start to populate config - cfg = astra.astra_dict("FBP") + cfg = astra.astra_dict("FBP_CUDA" if self.device == "gpu" else "FBP") cfg["ReconstructionDataId"] = rec_id cfg["ProjectorId"] = self.proj_id cfg["ProjectionDataId"] = sino_id diff --git a/scico/test/linop/xray/test_astra.py b/scico/test/linop/xray/test_astra.py index 6ed0b1efd..de8302331 100644 --- a/scico/test/linop/xray/test_astra.py +++ b/scico/test/linop/xray/test_astra.py @@ -122,6 +122,13 @@ def test_adjoint_typical_input(testobj): adjoint_test(A, x=x, rtol=get_tol()) +def test_fbp(testobj): + x = testobj.A.fbp(testobj.y) + # Test for a bug (related to calling the Astra CPU FBP implementation + # when using a FPU device) that resulted in a constant zero output. + assert np.sum(np.abs(x)) > 0.0 + + def test_jit_in_DiagonalStack(): """See https://github.com/lanl/scico/issues/331""" N = 10