TEST: crop data AND mask

This commit is contained in:
2025-07-14 23:10:46 +02:00
parent d30adf3e14
commit b2cc1e27a4

View File

@@ -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