ophyd-async 0.9.0__py3-none-any.whl → 0.9.0a2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ophyd_async/_version.py +1 -1
- ophyd_async/core/_utils.py +0 -14
- ophyd_async/epics/adcore/_hdf_writer.py +6 -1
- ophyd_async/epics/core/_aioca.py +7 -21
- ophyd_async/epics/testing/_example_ioc.py +0 -1
- ophyd_async/epics/testing/test_records.db +0 -8
- {ophyd_async-0.9.0.dist-info → ophyd_async-0.9.0a2.dist-info}/METADATA +1 -1
- {ophyd_async-0.9.0.dist-info → ophyd_async-0.9.0a2.dist-info}/RECORD +11 -11
- {ophyd_async-0.9.0.dist-info → ophyd_async-0.9.0a2.dist-info}/LICENSE +0 -0
- {ophyd_async-0.9.0.dist-info → ophyd_async-0.9.0a2.dist-info}/WHEEL +0 -0
- {ophyd_async-0.9.0.dist-info → ophyd_async-0.9.0a2.dist-info}/top_level.txt +0 -0
ophyd_async/_version.py
CHANGED
ophyd_async/core/_utils.py
CHANGED
|
@@ -34,20 +34,6 @@ class StrictEnum(str, Enum, metaclass=StrictEnumMeta):
|
|
|
34
34
|
|
|
35
35
|
class SubsetEnumMeta(StrictEnumMeta):
|
|
36
36
|
def __call__(self, value, *args, **kwargs): # type: ignore
|
|
37
|
-
"""
|
|
38
|
-
Returns given value if it is a string and not a member of the enum.
|
|
39
|
-
If the value is not a string or is an enum member, default enum behavior
|
|
40
|
-
is applied. Type checking will complain if provided arbitrary string.
|
|
41
|
-
|
|
42
|
-
Returns:
|
|
43
|
-
Union[str, SubsetEnum]: If the value is a string and not a member of the
|
|
44
|
-
enum, the string is returned as is. Otherwise, the corresponding enum
|
|
45
|
-
member is returned.
|
|
46
|
-
|
|
47
|
-
Raises:
|
|
48
|
-
ValueError: If the value is not a string and cannot be converted to an enum
|
|
49
|
-
member.
|
|
50
|
-
"""
|
|
51
37
|
if isinstance(value, str) and not isinstance(value, self):
|
|
52
38
|
return value
|
|
53
39
|
return super().__call__(value, *args, **kwargs)
|
|
@@ -46,7 +46,7 @@ class ADHDFWriter(ADWriter[NDFileHDFIO]):
|
|
|
46
46
|
)
|
|
47
47
|
self._datasets: list[HDFDataset] = []
|
|
48
48
|
self._file: HDFFile | None = None
|
|
49
|
-
self.
|
|
49
|
+
self._include_file_number = False
|
|
50
50
|
|
|
51
51
|
async def open(self, multiplier: int = 1) -> dict[str, DataKey]:
|
|
52
52
|
self._file = None
|
|
@@ -63,6 +63,11 @@ class ADHDFWriter(ADWriter[NDFileHDFIO]):
|
|
|
63
63
|
self.fileio.xml_file_name.set(""),
|
|
64
64
|
)
|
|
65
65
|
|
|
66
|
+
# By default, don't add file number to filename
|
|
67
|
+
self._filename_template = "%s%s"
|
|
68
|
+
if self._include_file_number:
|
|
69
|
+
self._filename_template += "_%6.6d"
|
|
70
|
+
|
|
66
71
|
# Set common AD file plugin params, begin capturing
|
|
67
72
|
await self.begin_capture()
|
|
68
73
|
|
ophyd_async/epics/core/_aioca.py
CHANGED
|
@@ -293,27 +293,13 @@ class CaSignalBackend(EpicsSignalBackend[SignalDatatypeT]):
|
|
|
293
293
|
write_value = self.initial_values[self.write_pv]
|
|
294
294
|
else:
|
|
295
295
|
write_value = self.converter.write_value(value)
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
)
|
|
304
|
-
except CANothing as exc:
|
|
305
|
-
# If we ran into a write error, check to see if there is a list
|
|
306
|
-
# of valid choices, and if the value we tried to write is in that list.
|
|
307
|
-
valid_choices = self.converter.metadata.get("choices")
|
|
308
|
-
if valid_choices:
|
|
309
|
-
if value not in valid_choices:
|
|
310
|
-
msg = (
|
|
311
|
-
f"{value} is not a valid choice for {self.write_pv}, "
|
|
312
|
-
f"valid choices: {self.converter.metadata.get('choices')}"
|
|
313
|
-
)
|
|
314
|
-
raise ValueError(msg) from exc
|
|
315
|
-
raise
|
|
316
|
-
raise
|
|
296
|
+
await caput(
|
|
297
|
+
self.write_pv,
|
|
298
|
+
write_value,
|
|
299
|
+
datatype=self.converter.write_dbr,
|
|
300
|
+
wait=wait,
|
|
301
|
+
timeout=None,
|
|
302
|
+
)
|
|
317
303
|
|
|
318
304
|
async def get_datakey(self, source: str) -> DataKey:
|
|
319
305
|
value = await self._caget(self.read_pv, FORMAT_CTRL)
|
|
@@ -44,7 +44,6 @@ class EpicsTestCaDevice(EpicsDevice):
|
|
|
44
44
|
enum: A[SignalRW[EpicsTestEnum], PvSuffix("enum")]
|
|
45
45
|
enum2: A[SignalRW[EpicsTestEnum], PvSuffix("enum2")]
|
|
46
46
|
subset_enum: A[SignalRW[EpicsTestSubsetEnum], PvSuffix("subset_enum")]
|
|
47
|
-
enum_str_fallback: A[SignalRW[str], PvSuffix("enum_str_fallback")]
|
|
48
47
|
bool_unnamed: A[SignalRW[bool], PvSuffix("bool_unnamed")]
|
|
49
48
|
partialint: A[SignalRW[int], PvSuffix("partialint")]
|
|
50
49
|
lessint: A[SignalRW[int], PvSuffix("lessint")]
|
|
@@ -104,14 +104,6 @@ record(mbbo, "$(device)subset_enum") {
|
|
|
104
104
|
field(PINI, "YES")
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
record(mbbo, "$(device)enum_str_fallback") {
|
|
108
|
-
field(ZRST, "Aaa")
|
|
109
|
-
field(ONST, "Bbb")
|
|
110
|
-
field(TWST, "Ccc")
|
|
111
|
-
field(VAL, "1")
|
|
112
|
-
field(PINI, "YES")
|
|
113
|
-
}
|
|
114
|
-
|
|
115
107
|
record(waveform, "$(device)uint8a") {
|
|
116
108
|
field(NELM, "3")
|
|
117
109
|
field(FTVL, "UCHAR")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: ophyd-async
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.0a2
|
|
4
4
|
Summary: Asynchronous Bluesky hardware abstraction code, compatible with control systems like EPICS and Tango
|
|
5
5
|
Author-email: Tom Cobb <tom.cobb@diamond.ac.uk>
|
|
6
6
|
License: BSD 3-Clause License
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
ophyd_async/__init__.py,sha256=tEfgj45lRItQ-_u8SRFPM-mpBh3gWvHXr3emhiJJG_M,225
|
|
2
2
|
ophyd_async/__main__.py,sha256=n_U4O9bgm97OuboUB_9eK7eFiwy8BZSgXJ0OzbE0DqU,481
|
|
3
|
-
ophyd_async/_version.py,sha256=
|
|
3
|
+
ophyd_async/_version.py,sha256=WoGvWoWzvgTP0yQKepGyKWmDn7k5WHXOtFan55CTGSc,413
|
|
4
4
|
ophyd_async/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
ophyd_async/core/__init__.py,sha256=jNna-9AJLt9ZLpkjnNpE1im8Kv_IT5t4ftjsRMrVcgI,3739
|
|
6
6
|
ophyd_async/core/_detector.py,sha256=ZpoBmTmPqrOQZ8Y8zyMmsHz78VJVeAcZU7AHrdQf8lM,15241
|
|
@@ -19,7 +19,7 @@ ophyd_async/core/_signal_backend.py,sha256=LweJnF3n5cucpBX8XV20Pbh0k5pBnXhMg3GQe
|
|
|
19
19
|
ophyd_async/core/_soft_signal_backend.py,sha256=IJp2Teu8WGRG9To6PBmkp_sVOlxh_vfLbJYkKop9zZg,5959
|
|
20
20
|
ophyd_async/core/_status.py,sha256=OUKhblRQ4KU5PDsWbpvYduM7G60JMk1NqeV4eqyPtKc,5131
|
|
21
21
|
ophyd_async/core/_table.py,sha256=BSlLrgYA2rAeJl5J1bdZvGDB-YFqXUIUMiAtCWcy0xw,5897
|
|
22
|
-
ophyd_async/core/_utils.py,sha256=
|
|
22
|
+
ophyd_async/core/_utils.py,sha256=EIgbR5weOSBoRd75mxGZqWHx2qj8uPbIl5NuE9_mKSo,9925
|
|
23
23
|
ophyd_async/core/_yaml_settings.py,sha256=nfnebGXrnLKJgzd5D9In3ZPi2hATsgrehjrR0XRHTsk,2022
|
|
24
24
|
ophyd_async/epics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
ophyd_async/epics/motor.py,sha256=Sz3bxIKxxlCd8r-25eZgF81QvoetKPY0At8d4h0yi7Q,9352
|
|
@@ -37,7 +37,7 @@ ophyd_async/epics/adcore/_core_detector.py,sha256=-c5FDeMTJWniogtiyA9-8Yu67e7UgZ
|
|
|
37
37
|
ophyd_async/epics/adcore/_core_io.py,sha256=VNlpOL7cN8hExk_cIeushgDrUwDz33gm0K4iSpNB15w,6956
|
|
38
38
|
ophyd_async/epics/adcore/_core_logic.py,sha256=wevdDKYcoXiwAxchb__KjAPNtJe2g8Z6k9OzzGzP9p8,4356
|
|
39
39
|
ophyd_async/epics/adcore/_core_writer.py,sha256=JuEe4INxHW5SC37orhh8Q0sbI3RUdX1kaa0f2536Gr4,8010
|
|
40
|
-
ophyd_async/epics/adcore/_hdf_writer.py,sha256=
|
|
40
|
+
ophyd_async/epics/adcore/_hdf_writer.py,sha256=tWOgbY4a9afD5QhyhR4lfzdJm1qCPFU2UpJ-OYNRPRg,6000
|
|
41
41
|
ophyd_async/epics/adcore/_jpeg_writer.py,sha256=DFv3YdqKjNq0QCb-bLBlxTaGzmHSvdU_rLB29beI46w,748
|
|
42
42
|
ophyd_async/epics/adcore/_single_trigger.py,sha256=OGgZCQnicHr6IZ69nHCwzlA4YLUo3O-Zkgl6fQTZ0eg,1271
|
|
43
43
|
ophyd_async/epics/adcore/_tiff_writer.py,sha256=5WXdW0thL9nv2jSMSqF-bMGQjztQZEnx3enY-nGsLiY,749
|
|
@@ -57,7 +57,7 @@ ophyd_async/epics/advimba/_vimba.py,sha256=1ccSakYY4J-5dSw8Ttzvf4HzRk0hSrpOjAgkM
|
|
|
57
57
|
ophyd_async/epics/advimba/_vimba_controller.py,sha256=NW_QNxTTWjiGmZNZY_nNcdZlOCfgOhZ3U0GcQzAZw8g,1937
|
|
58
58
|
ophyd_async/epics/advimba/_vimba_io.py,sha256=il-SZSiApx5OUQCYHUGoa0Ywu9pY01DSDvOttU15khQ,1864
|
|
59
59
|
ophyd_async/epics/core/__init__.py,sha256=8NoQxEEc2Ny_L9nrD2fnGSf_2gJr1wCR1LwUeLNcIJo,588
|
|
60
|
-
ophyd_async/epics/core/_aioca.py,sha256=
|
|
60
|
+
ophyd_async/epics/core/_aioca.py,sha256=Fg2g9OUWcS2ebFt3TtLET7Yr44RRLbhpRk0t6WENyiI,12046
|
|
61
61
|
ophyd_async/epics/core/_epics_connector.py,sha256=n1FlQYui8HdobPxaX3VAflrzi2UT7QCe3cFasssmVLw,1789
|
|
62
62
|
ophyd_async/epics/core/_epics_device.py,sha256=kshNiKQhevsL2OZXa-r093L_sQGvGK_0J4PWVLg3Eqw,437
|
|
63
63
|
ophyd_async/epics/core/_p4p.py,sha256=axxV8iKpFJl9fNEW54IkXz32ki6_IOcilwnxQFnb0Vo,16169
|
|
@@ -76,9 +76,9 @@ ophyd_async/epics/sim/_sensor.py,sha256=VMxsjLV_V3LeLqnSqIsDHVJgpu5SmASV-rlzok_l
|
|
|
76
76
|
ophyd_async/epics/sim/mover.db,sha256=RFz0rxZue689Wh1sWTZwWeFMUrH04ttPq2u5xJH_Fp4,998
|
|
77
77
|
ophyd_async/epics/sim/sensor.db,sha256=AstyG9E0R4KZBz2FZQSrV_QlrfLoU6M2cvYc15Lf548,553
|
|
78
78
|
ophyd_async/epics/testing/__init__.py,sha256=aTIv4D2DYrpnGco5RQF8QuLG1SfFkIlTyM2uYEKXltA,522
|
|
79
|
-
ophyd_async/epics/testing/_example_ioc.py,sha256=
|
|
79
|
+
ophyd_async/epics/testing/_example_ioc.py,sha256=_crB_NVSVAwQTptU-upl3MVm0i8UsfA0QDBi9NPemoc,3505
|
|
80
80
|
ophyd_async/epics/testing/_utils.py,sha256=Y5aokH545rJfu-0JDZCha91Y8p08KYiIfxDc2wnq9CQ,1599
|
|
81
|
-
ophyd_async/epics/testing/test_records.db,sha256=
|
|
81
|
+
ophyd_async/epics/testing/test_records.db,sha256=zQ8QZ5OVMVFfLj7kSsjL7HTMcm74dzqypL0F4_6JkN8,3342
|
|
82
82
|
ophyd_async/epics/testing/test_records_pva.db,sha256=NyceNGaCZXNYaXjH2VLhvKl8Z-L6dwfE_kYZKqdIcTU,4054
|
|
83
83
|
ophyd_async/fastcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
84
84
|
ophyd_async/fastcs/core.py,sha256=MpbRLaPJwmaAuunnIV34oq1AUjT1nfv5ggtgw4I42vY,376
|
|
@@ -122,8 +122,8 @@ ophyd_async/testing/_assert.py,sha256=FvGhGVoYPul2-2ByM5U0AAdrIKc1y6gqLRK_CfYut-
|
|
|
122
122
|
ophyd_async/testing/_mock_signal_utils.py,sha256=PABE_2Hexx5mtINuaVLASHKJEYulO-nUqiI20vE9j6s,5212
|
|
123
123
|
ophyd_async/testing/_one_of_everything.py,sha256=pzj4-yM3buOKQJyUNfpMCKlg57cdALFY6hr0NDHQYZU,4160
|
|
124
124
|
ophyd_async/testing/_wait_for_pending.py,sha256=YZAR48n-CW0GsPey3zFRzMJ4byDAr3HvMIoawjmTrHw,732
|
|
125
|
-
ophyd_async-0.9.
|
|
126
|
-
ophyd_async-0.9.
|
|
127
|
-
ophyd_async-0.9.
|
|
128
|
-
ophyd_async-0.9.
|
|
129
|
-
ophyd_async-0.9.
|
|
125
|
+
ophyd_async-0.9.0a2.dist-info/LICENSE,sha256=pU5shZcsvWgz701EbT7yjFZ8rMvZcWgRH54CRt8ld_c,1517
|
|
126
|
+
ophyd_async-0.9.0a2.dist-info/METADATA,sha256=xleA5naK9np7q1T2ZXQgc3MiDFrVccBt_XTL-ReHprM,6753
|
|
127
|
+
ophyd_async-0.9.0a2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
128
|
+
ophyd_async-0.9.0a2.dist-info/top_level.txt,sha256=-hjorMsv5Rmjo3qrgqhjpal1N6kW5vMxZO3lD4iEaXs,12
|
|
129
|
+
ophyd_async-0.9.0a2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|