Skip to content

Commit

Permalink
Merge pull request #8 from danforthcenter/add_min_max_wavelength
Browse files Browse the repository at this point in the history
actually define max_wavelength (and min) while creating spectral_data object
  • Loading branch information
k034b363 authored Aug 28, 2024
2 parents e82daa2 + 2c40a12 commit 6723266
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plantcv/geospatial/read_geotif.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ def read_geotif(filename, bands="R,G,B", cropto=None):

# 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=d_type,
wavelength_dict=wavelengths, samples=int(width),
Expand Down

0 comments on commit 6723266

Please sign in to comment.