diff --git a/superxas_bec/devices/timepix/timepix_fly_client/timepix_fly_backend.py b/superxas_bec/devices/timepix/timepix_fly_client/timepix_fly_backend.py index 86df859..fc6097c 100644 --- a/superxas_bec/devices/timepix/timepix_fly_client/timepix_fly_backend.py +++ b/superxas_bec/devices/timepix/timepix_fly_client/timepix_fly_backend.py @@ -101,10 +101,14 @@ class TimepixFlyBackend: self.timepix_fly_client.set_other_config(other_config) self.timepix_fly_client.set_pixel_map(pixel_map) - def on_pre_scan( + def on_pre_scan(self) -> None: + """Called before the scan starts.""" + pass + + def on_trigger( self, status: StatusBase | DeviceStatus | None = None ) -> StatusBase | DeviceStatus: - """Called before the scan starts.""" + """Called before the scan starts. Needs to run before the detector is triggered.""" if status is None: status = StatusBase() self.timepix_fly_client.add_status_callback( @@ -115,9 +119,6 @@ class TimepixFlyBackend: self.timepix_fly_client.start() return status - def on_trigger(self): - pass - def on_complete( self, status: StatusBase | DeviceStatus | None = None ) -> StatusBase | DeviceStatus: @@ -330,7 +331,7 @@ if __name__ == "__main__": timepix.on_stage(other_config=config, pixel_map=pixel_map) print("TimepixFlyBackend staged with configuration and pixel map.") for ii in range(10): - status = timepix.on_pre_scan() + status = timepix.on_trigger() print("TimepixFlyBackend pre-scan started.") status.wait(timeout=10) mock_server.start_acquisition()