diff --git a/daq/src/aaredaq/aaredb.py b/daq/src/aaredaq/aaredb.py index 8eabe293..7e8baf25 100644 --- a/daq/src/aaredaq/aaredb.py +++ b/daq/src/aaredaq/aaredb.py @@ -378,12 +378,18 @@ class AareWrapper: cell_size_pxl = Coordinate(x=raster_request.grid_size_mm.x/geom.pixel_in_mm, y=raster_request.grid_size_mm.y/geom.pixel_in_mm) + if raster_request.smargon_top_left is None: + beam_loc = geom.smargon.sh_mm + else: + beam_loc = raster_request.smargon_top_left.sh_mm + start_pxl = geom.smargon_to_picture(beam_loc) + payload = RasterPayloadModel( request = raster_request, result = raster_result, sample_id = sample.db_id, attach_image = True, - start_pxl = raster_request.start_pxl(geom), + start_pxl = start_pxl, center_pxl = center_pxl, cell_size_pxl = cell_size_pxl )