Skip to content

Commit

Permalink
Prevent issues with writing data with software scans (#685)
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondJoseph authored Nov 29, 2024
1 parent 8b83909 commit 629e764
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ophyd_async/epics/adcore/_hdf_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
wait_for_value,
)

from ._core_io import NDArrayBaseIO, NDFileHDFIO
from ._core_io import Callback, NDArrayBaseIO, NDFileHDFIO
from ._utils import (
FileWriteMode,
convert_param_dtype_to_np,
Expand Down Expand Up @@ -71,6 +71,7 @@ async def open(self, multiplier: int = 1) -> dict[str, DataKey]:
# Never use custom xml layout file but use the one defined
# in the source code file NDFileHDF5LayoutXML.cpp
self.hdf.xml_file_name.set(""),
self.hdf.enable_callbacks.set(Callback.ENABLE),
)

assert (
Expand All @@ -80,7 +81,9 @@ async def open(self, multiplier: int = 1) -> dict[str, DataKey]:
# Overwrite num_capture to go forever
await self.hdf.num_capture.set(0)
# Wait for it to start, stashing the status that tells us when it finishes
self._capture_status = await set_and_wait_for_value(self.hdf.capture, True)
self._capture_status = await set_and_wait_for_value(
self.hdf.capture, True, wait_for_set_completion=False
)
name = self._name_provider()
detector_shape = await self._dataset_describer.shape()
np_dtype = await self._dataset_describer.np_datatype()
Expand Down

0 comments on commit 629e764

Please sign in to comment.