diff --git a/debye_bec/devices/mo1_bragg/mo1_bragg.py b/debye_bec/devices/mo1_bragg/mo1_bragg.py index dea3421..dd451d0 100644 --- a/debye_bec/devices/mo1_bragg/mo1_bragg.py +++ b/debye_bec/devices/mo1_bragg/mo1_bragg.py @@ -81,6 +81,8 @@ class Mo1Bragg(PSIDeviceBase, Mo1BraggPositioner): "nidaq_continuous_scan", ] + self.stage_start = None + ######################################## # Beamline Specific Implementations # ######################################## @@ -106,6 +108,7 @@ class Mo1Bragg(PSIDeviceBase, Mo1BraggPositioner): Information about the upcoming scan can be accessed from the scan_info (self.scan_info.msg) object. """ + self.stage_start = time.time() self.scan_parameters = fetch_scan_info(self.scan_info) if self.scan_control.scan_msg.get() != ScanControlLoadMessage.PENDING: status = CompareStatus(self.scan_control.scan_msg, ScanControlLoadMessage.PENDING) @@ -290,9 +293,9 @@ class Mo1Bragg(PSIDeviceBase, Mo1BraggPositioner): else: return # Setting scan duration seems to lag behind slightly in the backend, include small sleep - logger.info(f"Sleeping for one second") - time.sleep(1) - logger.info(f"Device {self.name}, done sleeping") + # logger.info(f"Sleeping for one second") + # time.sleep(1) + # logger.info(f"Device {self.name}, done sleeping") # Load the scan parameters to the controller status = CompareStatus( self.scan_control.scan_msg, @@ -303,6 +306,7 @@ class Mo1Bragg(PSIDeviceBase, Mo1BraggPositioner): self.scan_control.scan_load.put(1) # Wait for params to be checked from controller status.wait(self.timeout_for_pvwait) + # logger.info(f"Starting scan took {time.time() - self.stage_start} s") return None def on_unstage(self) -> DeviceStatus | StatusBase | None: