Skip to content

Commit

Permalink
MAINT: Fix fast access routine
Browse files Browse the repository at this point in the history
  • Loading branch information
jwboth committed Jun 20, 2024
1 parent e2abb8b commit 244ad20
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/darsia/restoration/averaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,18 @@ def _average_array(self, arr: np.ndarray) -> np.ndarray:
return result


def volume_average(
img: darsia.Image, mask: darsia.Image, rev: Optional[float] = None
) -> darsia.Image:
def volume_average(img: darsia.Image, mask: darsia.Image, size: float) -> darsia.Image:
"""Fast-access function for volume averaging.
Note: For repeated calls, it is recommended to create a VolumeAveraging object.
Args:
img (Image): image
mask (Image): mask
rev (float): size of the REV in length units
size (float): size of the REV in length units
Returns:
Image: volume averaged image
"""
return VolumeAveraging(rev=REV(size=rev, img=img), mask=mask)(img)
return VolumeAveraging(rev=REV(size=size, img=img), mask=mask)(img)

0 comments on commit 244ad20

Please sign in to comment.