From bb5a69c61b022b847dc736c7a462ddebba53989c Mon Sep 17 00:00:00 2001 From: ashmeigh Date: Mon, 4 Mar 2024 06:02:37 +0000 Subject: [PATCH] testing compute operations --- mantidimaging/core/operations/arithmetic/arithmetic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mantidimaging/core/operations/arithmetic/arithmetic.py b/mantidimaging/core/operations/arithmetic/arithmetic.py index 2b800898823..299e7a2c799 100644 --- a/mantidimaging/core/operations/arithmetic/arithmetic.py +++ b/mantidimaging/core/operations/arithmetic/arithmetic.py @@ -25,9 +25,8 @@ class ArithmeticFilter(BaseFilter): """ filter_name = "Arithmetic" - @classmethod - def filter_func(cls, - images: ImageStack, + @staticmethod + def filter_func(images: ImageStack, div_val: float = 1.0, mult_val: float = 1.0, add_val: float = 0.0, @@ -47,7 +46,8 @@ def filter_func(cls, raise ValueError("Unable to proceed with operation because division/multiplication value is zero.") params = {'div': div_val, 'mult': mult_val, 'add': add_val, 'sub': sub_val} - ps.run_compute_func(cls.compute_function, images.data.shape[0], images.shared_array, params, progress) + ps.run_compute_func(ArithmeticFilter.compute_function, images.data.shape[0], images.shared_array, params, + progress) return images