diff --git a/kwave/utils/mapgen.py b/kwave/utils/mapgen.py index ce7dbef6..629f9ed5 100644 --- a/kwave/utils/mapgen.py +++ b/kwave/utils/mapgen.py @@ -60,10 +60,8 @@ def make_spiral_circle_points(num_points: int, radius: float) -> np.ndarray: def make_concentric_circle_points(num_points: int, radius: float) -> Tuple[np.ndarray, int]: num_radial = int(np.ceil(np.sqrt(num_points / np.pi))) - try: - d_radial = radius / (num_radial - 1) - except ZeroDivisionError: - d_radial = float('inf') + + assert num_radial > 1, "The number of radial points must be greater than 1." r = np.arange(num_radial) * (radius - d_radial / 2) / (num_radial - 1)