Skip to content

Commit f5fa763

Browse files
committed
Fetch default param values needed in recon.algorithm estimator functions
1 parent de75564 commit f5fa763

2 files changed

Lines changed: 43 additions & 1 deletion

File tree

‎httomo_backends/methods_database/packages/backends/httomolibgpu/supporting_funcs/recon/algorithm.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __calc_output_dim_recon(non_slice_dims_shape, **kwargs):
5252
5353
"""
5454
DetectorsLengthH = non_slice_dims_shape[1]
55-
recon_size = kwargs["recon_size"]
55+
recon_size = kwargs.get("recon_size", None)
5656
if recon_size is None:
5757
recon_size = DetectorsLengthH
5858
output_dims = (recon_size, recon_size)

‎tests/test_httomolibgpu.py‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,3 +1216,45 @@ def test_raven_filter_memory_estimator_fetches_default_param_value():
12161216
_calc_memory_bytes_raven_filter((1, 1), np.float32(), **{})
12171217
except KeyError as e:
12181218
pytest.fail(f"Failed to get default value for {e} parameter")
1219+
1220+
1221+
def test_FBP2d_astra_output_dims_calculator_fetches_default_param_value():
1222+
try:
1223+
_calc_output_dim_FBP2d_astra((1, 1), **{})
1224+
except KeyError as e:
1225+
pytest.fail(f"Failed to get default value for {e} parameter")
1226+
1227+
1228+
def test_FBP3d_tomobar_output_dims_calculator_fetches_default_param_value():
1229+
try:
1230+
_calc_output_dim_FBP3d_tomobar((1, 1), **{})
1231+
except KeyError as e:
1232+
pytest.fail(f"Failed to get default value for {e} parameter")
1233+
1234+
1235+
def test_LPRec3d_tomobar_output_dims_calculator_fetches_default_param_value():
1236+
try:
1237+
_calc_output_dim_LPRec3d_tomobar((1, 1), **{})
1238+
except KeyError as e:
1239+
pytest.fail(f"Failed to get default value for {e} parameter")
1240+
1241+
1242+
def test_SIRT3d_tomobar_output_dims_calculator_fetches_default_param_value():
1243+
try:
1244+
_calc_output_dim_SIRT3d_tomobar((1, 1), **{})
1245+
except KeyError as e:
1246+
pytest.fail(f"Failed to get default value for {e} parameter")
1247+
1248+
1249+
def test_CGLS3d_tomobar_output_dims_calculator_fetches_default_param_value():
1250+
try:
1251+
_calc_output_dim_CGLS3d_tomobar((1, 1), **{})
1252+
except KeyError as e:
1253+
pytest.fail(f"Failed to get default value for {e} parameter")
1254+
1255+
1256+
def test_FISTA3d_tomobar_output_dims_calculator_fetches_default_param_value():
1257+
try:
1258+
_calc_output_dim_FISTA3d_tomobar((1, 1), **{})
1259+
except KeyError as e:
1260+
pytest.fail(f"Failed to get default value for {e} parameter")

0 commit comments

Comments
 (0)