From 6189d6784323dfaee5249f1cd9b88cdbadfc138a Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Wed, 30 Sep 2026 21:21:55 +0200 Subject: [PATCH] chore: remove file events --- .../devices/gigafrost/gigafrostcamera.py | 30 ++++++++++--------- tomcat_bec/devices/pco_edge/pcoedgecamera.py | 27 +++++++++++------ 2 files changed, 34 insertions(+), 23 deletions(-) diff --git a/tomcat_bec/devices/gigafrost/gigafrostcamera.py b/tomcat_bec/devices/gigafrost/gigafrostcamera.py index 1844b1e..792813e 100644 --- a/tomcat_bec/devices/gigafrost/gigafrostcamera.py +++ b/tomcat_bec/devices/gigafrost/gigafrostcamera.py @@ -707,13 +707,14 @@ class GigaFrostCamera(PSIDeviceBase, GigaFrostBase): """ Emit a file event when the camera is ready. """ - self._run_subs( - sub_type=self.SUB_FILE_EVENT, - file_path=self.target_file, - done=False, - successful=False, - hinted_h5_entries={"data": "data"}, - ) + # FIXME: Migrate to a FileEventSignal component + # self._run_subs( + # sub_type=self.SUB_FILE_EVENT, + # file_path=self.target_file, + # done=False, + # successful=False, + # hinted_h5_entries={"data": "data"}, + # ) status.add_callback(_emit_file_event) return status @@ -853,13 +854,14 @@ class GigaFrostCamera(PSIDeviceBase, GigaFrostBase): self.backend.create_virtual_datasets( self.file_path.get(), file_prefix=self.file_prefix.get() # type: ignore ) - self._run_subs( - sub_type=self.SUB_FILE_EVENT, - file_path=self.target_file, - done=True, - successful=True, - hinted_location={"data": "data"}, - ) + # FIXME: Migrate to a FileEventSignal component + # self._run_subs( + # sub_type=self.SUB_FILE_EVENT, + # file_path=self.target_file, + # done=True, + # successful=True, + # hinted_location={"data": "data"}, + # ) status = self.acq_done() status.add_callback(_create_dataset) diff --git a/tomcat_bec/devices/pco_edge/pcoedgecamera.py b/tomcat_bec/devices/pco_edge/pcoedgecamera.py index aad85f7..1640f0b 100644 --- a/tomcat_bec/devices/pco_edge/pcoedgecamera.py +++ b/tomcat_bec/devices/pco_edge/pcoedgecamera.py @@ -70,13 +70,21 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase): analysis_signal = Cpt(Signal, name="analysis_signal", kind=Kind.hinted, doc="Analysis Signal") analysis_signal2 = Cpt(Signal, name="analysis_signal2", kind=Kind.hinted, doc="Analysis Signal") - preview = Cpt(PreviewSignal, ndim=2, name="preview", doc="Camera raw data preview signal", num_rotation_90=1, transpose=False) + preview = Cpt( + PreviewSignal, + ndim=2, + name="preview", + doc="Camera raw data preview signal", + num_rotation_90=1, + transpose=False, + ) preview_corrected = Cpt( PreviewSignal, ndim=2, name="preview_corrected", doc="Camera preview signal with flat and dark correction", - num_rotation_90=1, transpose=False + num_rotation_90=1, + transpose=False, ) progress = Cpt( ProgressSignal, @@ -553,13 +561,14 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase): self.backend.create_virtual_datasets( self.file_path.get(), file_prefix=self.file_prefix.get() # type: ignore ) - self._run_subs( - sub_type=self.SUB_FILE_EVENT, - file_path=self.target_file, - done=True, - successful=True, - hinted_location={"data": "tomcat-pco/data"}, - ) + # FIXME: Migrate to a FileEventSignal component + # self._run_subs( + # sub_type=self.SUB_FILE_EVENT, + # file_path=self.target_file, + # done=True, + # successful=True, + # hinted_location={"data": "tomcat-pco/data"}, + # ) self.converted_files.append(self.target_file) logger.info(f"Finished writing to {self.target_file}")