-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
bugSomething isn't workingSomething isn't working
Description
If we make our triggers too close together then the detector will only produce half the images required, then stall waiting for another trigger. This is meant to be caught by the timeout observing the number of frames written, but the following code catches that and waits for the detector to be idle:
ophyd-async/src/ophyd_async/core/_detector.py
Lines 366 to 387 in e2de04d
| try: | |
| async for index in indices_written: | |
| yield WatcherUpdate( | |
| name=self.name, | |
| current=index, | |
| initial=self._initial_frame, | |
| target=self._events_to_complete, | |
| unit="", | |
| precision=0, | |
| time_elapsed=time.monotonic() - self._fly_start | |
| if self._fly_start | |
| else None, | |
| ) | |
| if index >= self._events_to_complete: | |
| break | |
| finally: | |
| await indices_written.aclose() | |
| if self._completable_exposures >= trigger_info.total_number_of_exposures: | |
| self._completable_exposures = 0 | |
| self._events_to_complete = 0 | |
| self._number_of_events_iter = None | |
| await self._controller.wait_for_idle() |
This will never happen as it is waiting for a trigger.
This needs investigating as to why the finally block was added, and another way of doing this found.
Acceptance Criteria
- Raises TimeoutError if HDF writer stalls even if detector is still active
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working