From b62e1ffc2672ea3eaee1f44ba9b89d6fdb788f2b Mon Sep 17 00:00:00 2001 From: Eric Bezzam Date: Wed, 28 Feb 2024 15:34:54 +0100 Subject: [PATCH] Make sensor downsampling consistent with rest of package. --- lensless/hardware/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lensless/hardware/sensor.py b/lensless/hardware/sensor.py index 08d8fa46..9ef4bb82 100644 --- a/lensless/hardware/sensor.py +++ b/lensless/hardware/sensor.py @@ -319,7 +319,7 @@ def downsample(self, factor): self.pixel_size = self.pixel_size * factor self.pitch = self.pitch * factor - self.resolution = (self.resolution / factor).astype(int) + self.resolution = np.round(self.resolution / factor).astype(int) self.size = self.pixel_size * self.resolution self.image_shape = self.resolution if self.color: