Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions src/ophyd_async/fastcs/odin/_data_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ async def prepare_unbounded(self, datakey_name: str) -> StreamableDataProvider:
# Get the current bit depth
datatype = f"uint{await self.detector_bit_depth.get_value()}"
# Setup the HDF writer
filename = f"{path_info.filename}.h5"
filename = f"{path_info.filename}"
await self.odin.acquisition_id.set("")
await asyncio.gather(
self.odin.acquisition_id.set(filename),
self.odin.file_prefix.set(filename),
self.odin.file_path.set(str(path_info.directory_path)),
self.odin.fp.data_compression.set("BSLZ4"),
self.odin.fp.data_datatype.set(datatype),
Expand Down
3 changes: 2 additions & 1 deletion tests/unit_tests/fastcs/eiger/test_eiger_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ async def test_prepare_internal_calls_correct_parameters(
call.detector.nimages.put(10),
call.detector.count_time.put(0.1),
call.detector.frame_time.put(0.1),
call.od.acquisition_id.put("filename.h5"),
call.od.acquisition_id.put(""),
call.od.file_prefix.put("filename"),
call.od.file_path.put(str(tmp_path)),
call.od.fp.data_compression.put("BSLZ4"),
call.od.fp.data_datatype.put("uint16"),
Expand Down
5 changes: 3 additions & 2 deletions tests/unit_tests/fastcs/odin/test_odin_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async def test_describe_gives_detector_shape(odin_det: OdinDet, tmp_path):
768,
1024,
],
"source": f"file://localhost/{tmp_path.as_posix().lstrip('/')}/filename.h5_000001.h5",
"source": f"file://localhost/{tmp_path.as_posix().lstrip('/')}/filename_000001.h5",
},
}

Expand Down Expand Up @@ -88,7 +88,8 @@ async def test_wait_for_active_and_file_names_before_capture_then_wait_for_writi
assert_has_calls(
odin,
[
call.acquisition_id.put("filename.h5"),
call.acquisition_id.put(""),
call.file_prefix.put("filename"),
call.file_path.put(str(tmp_path)),
call.fp.data_compression.put("BSLZ4"),
call.fp.data_datatype.put("uint16"),
Expand Down