Skip to content

Commit

Permalink
to-squash: made recommended changes
Browse files Browse the repository at this point in the history
  • Loading branch information
evalott100 committed Jun 18, 2024
1 parent af2fb96 commit 4a0cc5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ classifiers = [
description = "Create an IOC from a PandA"
dependencies = [
"setuptools>=64",
"numpy<2",
"numpy<2", # until https://github.com/mdavidsaver/p4p/issues/145 is fixed
"click",
"h5py",
"softioc>=4.4.0",
Expand Down
11 changes: 6 additions & 5 deletions src/pandablocks_ioc/_hdf_ioc.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@

from ._pvi import PviGroup, add_automatic_pvi_info, add_data_capture_pvi_info
from ._tables import ReadOnlyPvaTable
from ._types import ONAM_STR, ZNAM_STR, EpicsName
from ._types import ONAM_STR, ZNAM_STR, EpicsName, epics_to_panda_name

HDFReceived = Union[ReadyData, StartData, FrameData, EndData]


class CaptureMode(Enum):
"""
The mode which the circular buffer will use to flush
The mode which the circular buffer will use to flush.
"""

#: Wait till N frames are recieved then write them
Expand Down Expand Up @@ -323,7 +323,9 @@ class DatasetNameCache:
"""Used for outputing formatted dataset names in the HDF5 writer, and creating
and updating the HDF5 `DATASETS` table record."""

def __init__(self, datasets: Dict[str, Dataset], datasets_record_name: EpicsName):
def __init__(
self, datasets: Dict[EpicsName, Dataset], datasets_record_name: EpicsName
):
self._datasets = datasets

self._datasets_table_record = ReadOnlyPvaTable(
Expand All @@ -341,8 +343,7 @@ def hdf_writer_names(self):
if not dataset.name or dataset.capture == "No":
continue

# COUNTER:OUT -> COUNTER.OUT
field_name = record_name.replace(":", ".")
field_name = epics_to_panda_name(record_name)

hdf_names[field_name] = hdf_name = {}

Expand Down

0 comments on commit 4a0cc5d

Please sign in to comment.