From c9fa331a48830fb991a451729be95640f368d965 Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Mon, 20 May 2024 11:35:17 -0500 Subject: [PATCH] actually define max_wavelength and min_ when making spectral_data --- plantcv/geospatial/read_geotif.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plantcv/geospatial/read_geotif.py b/plantcv/geospatial/read_geotif.py index 1e63de4..6164d75 100644 --- a/plantcv/geospatial/read_geotif.py +++ b/plantcv/geospatial/read_geotif.py @@ -110,8 +110,8 @@ def read_geotif(filename, bands="B,G,R"): # Make a Spectral_data instance before calculating a pseudo-rgb spectral_array = Spectral_data(array_data=img_data, - max_wavelength=None, - min_wavelength=None, + max_wavelength=max(wavelengths, key=wavelengths.get), + min_wavelength=min(wavelengths, key=wavelengths.get), max_value=np.max(img_data), min_value=np.min(img_data), d_type=img.dtypes[0], wavelength_dict=wavelengths, samples=int(width),