For final streak finder result, take into account crop region shift
This commit is contained in:
@@ -157,6 +157,11 @@ def _calc_streakfinder_analysis(results, cryst_data: CrystData):
|
||||
detected_streaks = np.asarray(detected.streaks)
|
||||
streak_lines = streaks.lines
|
||||
|
||||
# Adjust to crop region
|
||||
if crop_roi is not None:
|
||||
shift = [crop_roi[0], crop_roi[2], crop_roi[0], crop_roi[2]]
|
||||
streak_lines = streak_lines + shift
|
||||
|
||||
if x_center is not None and y_center is not None:
|
||||
streaks_mask = streaks.concentric_only(x_center, y_center)
|
||||
streak_lines = streak_lines[streaks_mask]
|
||||
|
||||
Reference in New Issue
Block a user