Fix peak find slow speed when spectrum has a large number of data points

correction: `min_index, max_index = np.searchsorted(data_range, (window_freq[0], window_freq[-1]))`