Skip to content

Commit

Permalink
Fix tests broken by axis param change in httomolibgpu methods
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefmoazzam committed Sep 5, 2024
1 parent bb95391 commit 18e5a69
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
13 changes: 8 additions & 5 deletions httomo/method_wrappers/dezinging.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,14 @@ def execute(self, block: T) -> T:
# check if data needs to be transfered host <-> device
block = self._transfer_data(block)

args = self._build_kwargs(self._transform_params(self._config_params), block)
# plug in the correct value for axis instead of auto. In case if axis is absent we take
# it equal to 0. This is to avoid failure, but (missing) template parameters should be
# tested in the yaml checker potentially
self._config_params["axis"] = args.get("axis", 0)
if "axis" in self.parameters:
args = self._build_kwargs(
self._transform_params(self._config_params), block
)
# plug in the correct value for axis instead of auto. In case if axis is absent we
# take it equal to 0. This is to avoid failure, but (missing) template parameters
# should be tested in the yaml checker potentially
self._config_params["axis"] = args.get("axis", 0)

with catch_gputime() as t:
block.data = self.method(block.data, **self._config_params)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
parameters:
dif: 0.1
kernel_size: 3
axis: auto
- method: normalize
module_path: httomolibgpu.prep.normalize
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
parameters:
dif: 0.1
kernel_size: 3
axis: auto
- method: normalize
module_path: httomolibgpu.prep.normalize
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
parameters:
dif: 0.1
kernel_size: 3
axis: auto
- method: normalize
module_path: httomolibgpu.prep.normalize
parameters:
Expand Down

0 comments on commit 18e5a69

Please sign in to comment.