From 1748daab4c0c8e01f35245a797c58eb86e6d95ce Mon Sep 17 00:00:00 2001 From: "J.A. de Jong - ASCEE" Date: Thu, 9 Jan 2020 14:04:42 +0100 Subject: [PATCH] Put overflow detector a bit higher --- lasp/lasp_measurement.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lasp/lasp_measurement.py b/lasp/lasp_measurement.py index 96d8c36..8acbcff 100644 --- a/lasp/lasp_measurement.py +++ b/lasp/lasp_measurement.py @@ -327,12 +327,10 @@ class Measurement: with self.file() as f: for block in self.iterBlocks(f): dtype = block.dtype - print(dtype) if dtype.kind == 'i': - # if dtype in [' # minvalue = np.iinfo(dtype).min maxvalue = np.iinfo(dtype).max - if np.max(np.abs(block)) > maxvalue / 2: + if np.max(np.abs(block)) >= 0.9*maxvalue: return True else: # Cannot check for floating point values.