Find_crystal: fix bug in quality filter and add new filter for 30% max spots.

This commit is contained in:
leonarski_f committed 2025-11-25 09:11:58 +01:00
1 parent fb8307cce0
commit f60fee1976
1 file changed
+2 -2
+2 -2
View File
@@ -145,7 +145,7 @@ def create_quality_filtered_array(scan_results: List,
if exclude_ice and (result.spots_ice / max(result.spots_low_res, 1.0)) == 1.0:
# print(f"all ice for {result.number}")
return False
if result.spots_low_res < min_res_spots:
if min_low_res_spots and result.spots_low_res < min_low_res_spots:
return False
if result.spots_low_res < (max_spots_low_res * (30/100)):
return False
@@ -155,7 +155,7 @@ def create_quality_filtered_array(scan_results: List,
if result.index:
# print(f"index is True for {result.number}")
return True
if result.spots < min_spots:
if min_spots and result.spots < min_spots:
# print(f"{result.spots} is less than {min_spots} for {result.number}")
return False
if result.spots_low_res < min_background: