diff --git a/zsos/mapping/value_map.py b/zsos/mapping/value_map.py index 8bfed48..0e5f38d 100644 --- a/zsos/mapping/value_map.py +++ b/zsos/mapping/value_map.py @@ -165,6 +165,8 @@ def get_value(point: np.ndarray) -> float: pixel_value_within_radius(self.value_map[..., c], point_px, radius_px) for c in range(self.value_channels) ] + if len(all_values) == 1: + return all_values[0] value = reduce_fn(all_values) return value