From b2cc1e27a475698b3d1762c38e6dba6a19e3962b Mon Sep 17 00:00:00 2001 From: Lisa Dorofeeva Date: Mon, 14 Jul 2025 23:10:46 +0200 Subject: [PATCH] TEST: crop data AND mask --- dap/algos/streakfind.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dap/algos/streakfind.py b/dap/algos/streakfind.py index 981a214..6e7ecf6 100644 --- a/dap/algos/streakfind.py +++ b/dap/algos/streakfind.py @@ -168,14 +168,16 @@ def _calc_streakfinder_analysis(results, snr, mask): if crop_roi is None: region = snr + region_mask = mask else: region = snr[crop_roi[0]: crop_roi[1], crop_roi[2]: crop_roi[3]] - peaks = detect_peaks(region, mask, peaks_structure.rank, peak_vmin, + region_mask = mask[crop_roi[0]: crop_roi[1], crop_roi[2]: crop_roi[3]] + peaks = detect_peaks(region, region_mask, peaks_structure.rank, peak_vmin, num_threads=num_threads) - peaks = filter_peaks(peaks, region, mask, peaks_structure, peak_vmin, npts, + peaks = filter_peaks(peaks, region, region_mask, peaks_structure, peak_vmin, npts, num_threads=num_threads) - detected = detect_streaks(peaks, region, mask, streaks_structure, xtol, streak_vmin, min_size, + detected = detect_streaks(peaks, region, region_mask, streaks_structure, xtol, streak_vmin, min_size, lookahead, nfa, num_threads=num_threads) del peaks