From 59cb9a8235f4719c592711cd128fc61335230af3 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Fri, 31 Oct 2025 17:51:45 +0100 Subject: [PATCH] added TODO note regarding ROI index order --- dap/algos/roi.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dap/algos/roi.py b/dap/algos/roi.py index 42555ac..ad45f8d 100644 --- a/dap/algos/roi.py +++ b/dap/algos/roi.py @@ -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