diff --git a/dap/algos/streakfind.py b/dap/algos/streakfind.py index 6e7ecf6..cd892f0 100644 --- a/dap/algos/streakfind.py +++ b/dap/algos/streakfind.py @@ -170,8 +170,8 @@ def _calc_streakfinder_analysis(results, snr, mask): region = snr region_mask = mask else: - region = snr[crop_roi[0]: crop_roi[1], crop_roi[2]: crop_roi[3]] - region_mask = mask[crop_roi[0]: crop_roi[1], crop_roi[2]: crop_roi[3]] + region = snr[crop_roi[2]: crop_roi[3], crop_roi[0]: crop_roi[1]] + region_mask = mask[crop_roi[2]: crop_roi[3], crop_roi[0]: crop_roi[1]] peaks = detect_peaks(region, region_mask, peaks_structure.rank, peak_vmin, num_threads=num_threads) peaks = filter_peaks(peaks, region, region_mask, peaks_structure, peak_vmin, npts,