From b6df4986deb8d236f8c8cbe9dfe45fb87a679328 Mon Sep 17 00:00:00 2001 From: Lisa Dorofeeva Date: Fri, 11 Jul 2025 08:19:10 +0200 Subject: [PATCH] Further simplify, get rid of redundant brackets --- dap/algos/streakfind.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dap/algos/streakfind.py b/dap/algos/streakfind.py index 37ad48e..215fe89 100644 --- a/dap/algos/streakfind.py +++ b/dap/algos/streakfind.py @@ -48,7 +48,7 @@ def _generate_cryst_data(results, data, pf_pixel_mask) -> CrystData: "scale_whitefield", # Bool ] - if not all([param in results.keys() for param in params_required]): + if not all(param in results.keys() for param in params_required): raise ValueError(f"ERROR: Not enough parameters for CBD correction. Skipping\n" f"{params_required=}") @@ -104,7 +104,7 @@ def _calc_streakfinder_analysis(results, cryst_data: CrystData): "sf_num_threads", ] - if not all([param in results.keys() for param in params_required]): + if not all(param in results.keys() for param in params_required): print(f"ERROR: Not enough parameters for streak finder analysis. Skipping.\n" f"{params_required=}") return @@ -182,7 +182,7 @@ def _calc_streakfinder_analysis(results, cryst_data: CrystData): streak_lines = streak_lines.T _, number_of_streaks = streak_lines.shape - list_result = [line.tolist() for line in streak_lines] # arr(4, n_lines); 0coord x0, y0, x1, y1 + list_result = streak_lines.tolist() # arr(4, n_lines); 0coord x0, y0, x1, y1 bragg_counts = [streak.total_mass() for streak in detected_streaks]