bluesky / ophyd-async

Hardware abstraction for bluesky written using asyncio
https://blueskyproject.io/ophyd-async
BSD 3-Clause "New" or "Revised" License
7 stars 21 forks source link

PandA resource_path includes root #379

Open DiamondJoseph opened 2 weeks ago

DiamondJoseph commented 2 weeks ago

https://github.com/bluesky/ophyd-async/blob/b59d1e21c91a2697c36e519393f69a29b7601978/src/ophyd_async/panda/writers/_panda_hdf_file.py#L33

PandA hdf resource_path is entire path: e.g.:

    {
        "name": "stream_resource",
        "doc": {
            "uid": "8c37d78f-2f2f-47b5-ba74-b66831d0b962",
            "data_key": "panda1-pcap-ts_start-Value",
            "spec": "AD_HDF5_SWMR_SLICE",
            "root": "/dls/i22/data/2024/cm37271-2/bluesky",
            "resource_path": "/dls/i22/data/2024/cm37271-2/bluesky/i22-3-panda1.h5",
            "resource_kwargs": {
                "name": "panda1-pcap-ts_start-Value",
                "block": "pcap",
                "path": "PCAP-TS_START-Value",
                "multiplier": 1,
                "timestamps": "/entry/instrument/NDAttributes/NDArrayTimeStamp"
            },
            "path_semantics": "posix",
            "run_start": "0362ddf7-8f09-4539-9288-eb303e66c059"
        }
    }

which doesn't match with the expected root / resource_path = absolute_path

    {
        "name": "stream_resource",
        "doc": {
            "uid": "f43ec9cc-8b7f-4579-897d-991bbb552364",
            "data_key": "i0",
            "spec": "AD_HDF5_SWMR_SLICE",
            "root": "/dls/i22/data/2024/cm37271-2/bluesky",
            "resource_path": "i22-3-i0-hdf.h5",
            "resource_kwargs": {
                "path": "/entry/data/data",
                "multiplier": 1,
                "timestamps": "/entry/instrument/NDAttributes/NDArrayTimeStamp"
            },
            "path_semantics": "posix",
            "run_start": "0362ddf7-8f09-4539-9288-eb303e66c059"
        }
    }
DiamondJoseph commented 21 hours ago

This will presumably by solved by @subinsaji's change to consolidate the hdf writers