Skip to content

Commit

Permalink
Arithmetic filter use staticmethod (#2089)
Browse files Browse the repository at this point in the history
  • Loading branch information
samtygier-stfc committed Mar 6, 2024
2 parents ae17b19 + bb5a69c commit 4722bab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mantidimaging/core/operations/arithmetic/arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down

0 comments on commit 4722bab

Please sign in to comment.