From 0c9a5091e6bc68c2b07b1e3a3edfef5b0767f5b5 Mon Sep 17 00:00:00 2001 From: Sebastien Courroux Date: Wed, 27 Mar 2024 11:01:55 +0100 Subject: [PATCH] Remove stack normalization when writing stack to disk --- micasense/capture.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/micasense/capture.py b/micasense/capture.py index 91c9e1f4..ccf20b33 100644 --- a/micasense/capture.py +++ b/micasense/capture.py @@ -602,12 +602,9 @@ def save_capture_as_stack(self, outfilename, sort_by_wavelength=False, photometr eo_count = len(eo_list) - multispec_min = np.min(np.percentile(aligned_cap[:, :, 1:eo_count].flatten(), 0.01)) - multispec_max = np.max(np.percentile(aligned_cap[:, :, 1:eo_count].flatten(), 99.99)) - for outband_count, inband in enumerate(eo_list): outband = outRaster.GetRasterBand(outband_count + 1) - outdata = imageutils.normalize(aligned_cap[:, :, inband], multispec_min, multispec_max) + outdata = self.__aligned_capture[:, :, inband] outdata[outdata < 0] = 0 outdata[outdata > 2] = 2 # limit reflectance data to 200% to allow some specular reflections outdata = outdata * 32767 # scale reflectance images so 100% = 32768