DAQ: added try except to ingest statements so if they fail data is still displayed in the GUI.

This commit is contained in:
appleb_m
2025-12-22 09:37:23 +01:00
parent 300e719167
commit bca98172a9
+5 -1
View File
@@ -573,6 +573,7 @@ class AareDAQ:
def __raster(self, r: RasterGridRequest) -> CompletedRasterGridElem:
#TODO more sensible max_time adding, for large gridscans may fail.
max_time = r.exp_time_s * r.n_y * r.n_x + 60
if r.dtz is not None:
@@ -769,9 +770,12 @@ class AareDAQ:
if self.sample is not None and self.sample.db_id is not None:
self.save_screenshot_db(self.sample.db_id, "after_dc")
self.__aare.ingest_scan(sample=self.sample, result=result,
try:
self.__aare.ingest_scan(sample=self.sample, result=result,
geom=self.sample_geometry, beam_mark_pxl=self.__cfg.get_beam_mark(self.zoom))
except Exception as e:
logger.error(f"Exception ingesting scan: {e}")
return CompletedRotationScan(request=copy.deepcopy(request), result=result)
def measure_rotation(self, request: RotationScanRequest) -> CompletedRotationScan: