From 4db90e3885f9d0d7327941a60fb2a75dd3ff5b17 Mon Sep 17 00:00:00 2001 From: Casper Date: Thu, 13 Oct 2022 12:06:51 +0200 Subject: [PATCH] Bugfix: exportAsWave() normalization failed when dtypes of data and maxabs were different --- src/lasp/lasp_measurement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lasp/lasp_measurement.py b/src/lasp/lasp_measurement.py index 64f1109..1b1607c 100644 --- a/src/lasp/lasp_measurement.py +++ b/src/lasp/lasp_measurement.py @@ -654,7 +654,7 @@ class Measurement: if normalize: # Scale back to maximum of absolute value maxabs = np.max(np.abs(data)) - data /= maxabs + data = data / maxabs # "data /= maxabs" fails if dtpyes differ if newsampwidth is not None: # Convert to floats, then to new sample width