Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent issues with writing data with software scans #685

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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