DAQ: added error handling for raster if spots less than a thresh-hold. Currently commented as it affects manual users, should only be used in automation.

This commit is contained in:
appleb_m
2025-12-22 09:33:26 +01:00
parent 7acba275ba
commit 2a54ee43d3
+13
View File
@@ -614,6 +614,19 @@ class AareDAQ:
result_array = create_quality_filtered_array(images, 'spots_low_res', min_spots=None,
min_efficiency=1.0, min_background=None, min_low_res_spots=None)
result_array = create_quality_filtered_array(images,
'spots_low_res', min_spots=None,
min_efficiency=1.0, min_background=None,
min_low_res_spots=None)
#if not has_sufficient_low_res_spots(result_array, self.MIN_SPOTS_LOW_RES_THRESHOLD):
# logger.error("Auto X-ray centering failed: insufficient low-resolution spots "
# f"(threshold={self.MIN_SPOTS_LOW_RES_THRESHOLD})")
# self.__aare.ingest_gridscan(sample=self.sample, raster_result=result,
# raster_request=r, geom=self.sample_geometry,
# com=None, beam_mark_pxl=self.__cfg.get_beam_mark(self.zoom))
# raise AXCFailed("Auto X-ray centering failed: insufficient low-resolution spots")
self.__cfg.crystal_size = get_xtal_size(self.__cfg.crystal_size, result_array, r)
com = raster_centre_of_mass(result_array, images)
if com is None: