From ea28335ae02c75f39502e9f9a8a5a0c6dfb95831 Mon Sep 17 00:00:00 2001 From: Lisa Dorofeeva Date: Thu, 10 Jul 2025 09:33:36 +0200 Subject: [PATCH] For final streak finder result, take into account crop region shift --- dap/algos/streakfind.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dap/algos/streakfind.py b/dap/algos/streakfind.py index 5f9aa73..5676dd9 100644 --- a/dap/algos/streakfind.py +++ b/dap/algos/streakfind.py @@ -157,6 +157,11 @@ def _calc_streakfinder_analysis(results, cryst_data: CrystData): detected_streaks = np.asarray(detected.streaks) streak_lines = streaks.lines + # Adjust to crop region + if crop_roi is not None: + shift = [crop_roi[0], crop_roi[2], crop_roi[0], crop_roi[2]] + streak_lines = streak_lines + shift + if x_center is not None and y_center is not None: streaks_mask = streaks.concentric_only(x_center, y_center) streak_lines = streak_lines[streaks_mask]