diff --git a/daq/src/aaredaq/daq.py b/daq/src/aaredaq/daq.py index 0e52a4db..9341d6cc 100644 --- a/daq/src/aaredaq/daq.py +++ b/daq/src/aaredaq/daq.py @@ -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: