w
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user