From 9cb7d6930885f203ee92ce8a3cf16d52141b9315 Mon Sep 17 00:00:00 2001 From: appel_c Date: Mon, 1 Dec 2025 12:25:14 +0100 Subject: [PATCH] w --- superxas_bec/devices/timepix/timepix.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/superxas_bec/devices/timepix/timepix.py b/superxas_bec/devices/timepix/timepix.py index 1354bec..ed91b5f 100644 --- a/superxas_bec/devices/timepix/timepix.py +++ b/superxas_bec/devices/timepix/timepix.py @@ -697,7 +697,7 @@ class Timepix(PSIDeviceBase, TimePixControl): status_backend = self.backend.on_trigger_finished() if status_backend is not None: - return_status = status_camera and status_backend + return_status = status_camera & status_backend else: return_status = status_camera self.cancel_on_stop(return_status) @@ -716,13 +716,13 @@ class Timepix(PSIDeviceBase, TimePixControl): status_backend = self.backend.on_complete(status=status_backend) # Combine the statuses if status_backend is not None: - combined_status = status_camera and status_backend + combined_status = status_camera & status_backend else: combined_status = status_camera # Status HDF5 file writing status_img_written = CompareStatus(self.hdf.num_captured, self._n_images) - return_status = combined_status and status_img_written + return_status = combined_status & status_img_written return_status.add_callback(self._complete_callback) self.cancel_on_stop(return_status) return return_status @@ -730,14 +730,14 @@ class Timepix(PSIDeviceBase, TimePixControl): def _complete_callback(self, status: CompareStatus) -> None: """Callback for when the device completes a scan.""" if status.success: - status.device.file_event.put( + status.obj.file_event.put( file_path=status.obj._full_path, # pylint: disable:protected-access done=True, successful=True, hinted_h5_entries={"data": "/entry/data/data"}, ) else: - status.device.file_event.put( + status.obj.file_event.put( file_path=status.obj._full_path, # pylint: disable:protected-access done=True, successful=False,