Fixed file extension check

pull/1512/head
usplm 2022-07-17 21:51:07 -04:00 zatwierdzone przez Piero Toffanin
rodzic 9c64f8fdcc
commit 14ec9c1f90
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -43,7 +43,7 @@ def dn_to_temperature(photo, image, dataset_tree):
elif photo.camera_make == "DJI" and photo.camera_model == "ZH20T":
filename, file_extension = os.path.splitext(photo.filename)
# DJI H20T high gain mode supports measurement of -40~150 celsius degrees
if file_extension.lower() in ["tif", "tiff"] and image.min() >= 23315: # Calibrated grayscale tif
if file_extension.lower() in [".tif", ".tiff"] and image.min() >= 23315: # Calibrated grayscale tif
image = image.astype("float32")
image -= (273.15 * 100.0) # Convert Kelvin to Celsius
image *= 0.01