Skip to content

Commit

Permalink
Fix resource kwargs inconsistencies with nexus writer
Browse files Browse the repository at this point in the history
  • Loading branch information
callumforrester committed Jun 17, 2024
1 parent ff777c4 commit 61d0292
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ophyd_async/panda/writers/_hdf_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async def _update_datasets(self) -> None:

capture_table = await self.panda_device.data.datasets.get_value()
self._datasets = [
_HDFDataset(dataset_name, dataset_name, [1], multiplier=1)
_HDFDataset(dataset_name, "/" + dataset_name, [1], multiplier=1)
for dataset_name in capture_table["name"]
]

Expand Down
2 changes: 1 addition & 1 deletion src/ophyd_async/panda/writers/_panda_hdf_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(
data_key=ds.data_key,
resource_path=(f"{str(directory_info.root)}/{full_file_name}"),
resource_kwargs={
"internal_path": ds.internal_path,
"path": ds.internal_path,
"multiplier": ds.multiplier,
"timestamps": "/entry/instrument/NDAttributes/NDArrayTimeStamp",
},
Expand Down
2 changes: 1 addition & 1 deletion tests/panda/test_hdf_panda.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def flying_plan():
assert stream_resource["spec"] == "AD_HDF5_SWMR_SLICE"
assert stream_resource["run_start"] == docs["start"][0]["uid"]
assert stream_resource["resource_kwargs"] == {
"internal_path": dataset_name,
"path": "/" + dataset_name,
"multiplier": 1,
"timestamps": "/entry/instrument/NDAttributes/NDArrayTimeStamp",
}
Expand Down
2 changes: 1 addition & 1 deletion tests/panda/test_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async def test_collect_stream_docs(
"data_key": name,
"resource_path": str(tmp_path / "mock_panda" / "data.h5"),
"resource_kwargs": {
"internal_path": name,
"path": "/" + name,
"multiplier": 1,
"timestamps": "/entry/instrument/NDAttributes/NDArrayTimeStamp",
},
Expand Down

0 comments on commit 61d0292

Please sign in to comment.