Streak Finder algorithm for CBD experiment #2

Merged
augustin_s merged 46 commits from ext-dorofe_e/dap:chapman into main 2025-07-14 11:18:07 +02:00
Showing only changes of commit 3c48072d84 - Show all commits

View File

@@ -15,14 +15,14 @@ def calc_apply_additional_mask_from_file(results, pixel_mask_pf):
# Support for hdf5 and npy
if mask_file.endswith(".npy"):
try:
mask = np.load(mask_file)
mask = np.asarray(np.load(mask_file), dtype=bool)
except Exception as error:
print(f"Error loading mask data from NumPy file {mask_file}:\n{error}")
return
else:
try:
with h5py.File(mask_file, "r") as mask_file:
mask = np.asarray(mask_file[mask_dataset])
mask = np.asarray(mask_file[mask_dataset], dtype=bool)
except Exception as error:
print(f"Error loading mask from hdf5 file {mask_file}:\n{error}")
return