Return early if no streaks detected
This commit is contained in:
@@ -128,6 +128,14 @@ def _calc_streakfinder_analysis(results, cryst_data: CrystData):
|
||||
peaks = det_obj.detect_peaks(peak_vmin, npts, peaks_structure, num_threads)
|
||||
detected = det_obj.detect_streaks(peaks, xtol, streak_vmin, min_size, nfa=nfa,
|
||||
num_threads=num_threads)
|
||||
if not detected.streaks:
|
||||
results.update({"number_of_streaks": 0})
|
||||
results.update({"is_hit_frame": False})
|
||||
results.update({"streaks": []})
|
||||
results.update({"streak_lengths": []})
|
||||
results.update({"bragg_counts": []})
|
||||
return
|
||||
|
||||
if isinstance(detected, list):
|
||||
detected = detected[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user