From c0fc133cf0096e8666aae413f9cb5fe52b428393 Mon Sep 17 00:00:00 2001 From: appel_c Date: Wed, 18 Jun 2025 09:09:59 +0200 Subject: [PATCH] wip test --- superxas_bec/devices/falcon_direct.py | 7 ++++--- superxas_bec/devices/trigger.py | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/superxas_bec/devices/falcon_direct.py b/superxas_bec/devices/falcon_direct.py index 75b4df8..8f34f8d 100644 --- a/superxas_bec/devices/falcon_direct.py +++ b/superxas_bec/devices/falcon_direct.py @@ -256,8 +256,9 @@ class FalconSuperXASDirect(PSIDeviceBase, FalconControlDirect): This method blocks until the acquiring status is DONE. """ - CompareStatus(self.acquiring, FalconAcquiringStatus.DONE).wait(self._pv_timeout) - logger.info(f"Sending data for {self.name} at {time.time()}") + time_started = time.time() + # CompareStatus(self.acquiring, FalconAcquiringStatus.DONE).wait(self._pv_timeout) + logger.info(f"Sending data for {self.name} at {time_started}") self.icr.put( {self.icr.name: {"value": self.dxp1.input_count_rate.get(), "timestamp": time.time()}} ) @@ -288,4 +289,4 @@ class FalconSuperXASDirect(PSIDeviceBase, FalconControlDirect): } } ) - logger.info(f"Data sent for {self.name} at {time.time()}") + logger.info(f"Data sent for {self.name} at {time.time()- time_started}") diff --git a/superxas_bec/devices/trigger.py b/superxas_bec/devices/trigger.py index 6175639..6950177 100644 --- a/superxas_bec/devices/trigger.py +++ b/superxas_bec/devices/trigger.py @@ -124,6 +124,7 @@ class Trigger(PSIDeviceBase, TriggerControl): if falcon is not None: falcon: FalconSuperXASDirect falcon.erase_start.put(1) + time.sleep(0.4) # Wait for erase to complete logger.info( f"Erase and start acquiring for {falcon.name} at {time.time() - time_started}" ) @@ -139,14 +140,14 @@ class Trigger(PSIDeviceBase, TriggerControl): logger.info(f"Sampling done for {self.name} at {time.time() - time_started}") time.sleep(0.4) if falcon is not None: - falcon.stop_all.put(1) + # falcon.stop_all.put(1) logger.info( f"Waiting for Falcon to be ready after sampling at {time.time() - time_started}" ) # Wait for the Falcon to be done with acquiring data - CompareStatus(falcon.acquiring, FalconAcquiringStatus.DONE).wait( - timeout=self._falcon_ready_timeout - ) + # CompareStatus(falcon.acquiring, FalconAcquiringStatus.DONE).wait( + # timeout=self._falcon_ready_timeout + # ) falcon.send_data() return status_smpl