From 9c4ec556170c0bbc6a2487a6c326c03addd42177 Mon Sep 17 00:00:00 2001 From: linarphy Date: Mon, 28 Aug 2023 10:57:16 +0200 Subject: [PATCH] Update minimum size of compressed image --- classes/science/plate.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/science/plate.py b/classes/science/plate.py index 329715b..29988b4 100644 --- a/classes/science/plate.py +++ b/classes/science/plate.py @@ -147,13 +147,13 @@ class Plate: def compress( self ): """ - Compress the plate data to fit the biggest dimension in a 1000 - pixels axis and the smallest in a 100 pixels axis at minimum. + Compress the plate data to fit the biggest dimension in a 5000 + pixels axis and the smallest in a 500 pixels axis at minimum. Return the compressed data and the compression factor used. """ - min_factor = max( self.data.shape ) // 1000 # min factor to have a side + min_factor = max( self.data.shape ) // 5000 # min factor to have a side # with a maximum of 1000 pixels - max_factor = min( self.data.shape ) // 100 # max factor to have + max_factor = min( self.data.shape ) // 500 # max factor to have # a side with a minimum of 100 pixel if min_factor < max_factor: factor = int( mean( ( max_factor , min_factor ) ) )