added TODO note regarding ROI index order

This commit is contained in:
2025-10-31 17:51:45 +01:00
parent 0230176c97
commit 59cb9a8235

View File

@@ -25,6 +25,7 @@ def calc_roi(results, data):
roi_intensities_proj_x = []
for ix1, ix2, iy1, iy2 in zip(roi_x1, roi_x2, roi_y1, roi_y2):
#TODO: if start > stop, numpy returns an empty array, which is not obvious -- better to ensure the order start < stop by switching them if needed
data_roi = data[iy1:iy2, ix1:ix2]
roi_sum = np.nansum(data_roi, dtype=float) # data_roi is np.float32, which cannot be json serialized