ophyd-async 0.3a1__py3-none-any.whl → 0.3a2__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.
Files changed (58) hide show
  1. ophyd_async/__init__.py +1 -4
  2. ophyd_async/_version.py +1 -1
  3. ophyd_async/core/__init__.py +12 -2
  4. ophyd_async/core/_providers.py +3 -1
  5. ophyd_async/core/detector.py +65 -38
  6. ophyd_async/core/device.py +8 -0
  7. ophyd_async/core/flyer.py +10 -19
  8. ophyd_async/core/signal.py +36 -17
  9. ophyd_async/core/signal_backend.py +5 -2
  10. ophyd_async/core/sim_signal_backend.py +28 -16
  11. ophyd_async/core/standard_readable.py +4 -2
  12. ophyd_async/core/utils.py +18 -1
  13. ophyd_async/epics/_backend/_aioca.py +13 -11
  14. ophyd_async/epics/_backend/_p4p.py +19 -16
  15. ophyd_async/epics/_backend/common.py +16 -11
  16. ophyd_async/epics/areadetector/__init__.py +4 -0
  17. ophyd_async/epics/areadetector/aravis.py +69 -0
  18. ophyd_async/epics/areadetector/controllers/aravis_controller.py +73 -0
  19. ophyd_async/epics/areadetector/controllers/pilatus_controller.py +36 -24
  20. ophyd_async/epics/areadetector/drivers/aravis_driver.py +154 -0
  21. ophyd_async/epics/areadetector/drivers/pilatus_driver.py +4 -4
  22. ophyd_async/epics/areadetector/pilatus.py +50 -0
  23. ophyd_async/epics/areadetector/writers/_hdffile.py +4 -4
  24. ophyd_async/epics/areadetector/writers/hdf_writer.py +6 -1
  25. ophyd_async/epics/demo/__init__.py +33 -3
  26. ophyd_async/epics/motion/motor.py +20 -14
  27. ophyd_async/epics/pvi/__init__.py +3 -0
  28. ophyd_async/epics/pvi/pvi.py +318 -0
  29. ophyd_async/epics/signal/signal.py +26 -9
  30. ophyd_async/panda/__init__.py +17 -6
  31. ophyd_async/panda/_common_blocks.py +49 -0
  32. ophyd_async/panda/_hdf_panda.py +48 -0
  33. ophyd_async/panda/{panda_controller.py → _panda_controller.py} +3 -7
  34. ophyd_async/panda/_trigger.py +39 -0
  35. ophyd_async/panda/writers/__init__.py +3 -0
  36. ophyd_async/panda/writers/_hdf_writer.py +220 -0
  37. ophyd_async/panda/writers/_panda_hdf_file.py +58 -0
  38. ophyd_async/planstubs/__init__.py +5 -0
  39. ophyd_async/planstubs/prepare_trigger_and_dets.py +57 -0
  40. ophyd_async/protocols.py +73 -0
  41. ophyd_async/sim/__init__.py +11 -0
  42. ophyd_async/sim/demo/__init__.py +3 -0
  43. ophyd_async/sim/demo/sim_motor.py +116 -0
  44. ophyd_async/sim/pattern_generator.py +318 -0
  45. ophyd_async/sim/sim_pattern_detector_control.py +55 -0
  46. ophyd_async/sim/sim_pattern_detector_writer.py +34 -0
  47. ophyd_async/sim/sim_pattern_generator.py +37 -0
  48. {ophyd_async-0.3a1.dist-info → ophyd_async-0.3a2.dist-info}/METADATA +19 -75
  49. ophyd_async-0.3a2.dist-info/RECORD +76 -0
  50. ophyd_async/epics/pvi.py +0 -70
  51. ophyd_async/panda/panda.py +0 -241
  52. ophyd_async-0.3a1.dist-info/RECORD +0 -56
  53. /ophyd_async/panda/{table.py → _table.py} +0 -0
  54. /ophyd_async/panda/{utils.py → _utils.py} +0 -0
  55. {ophyd_async-0.3a1.dist-info → ophyd_async-0.3a2.dist-info}/LICENSE +0 -0
  56. {ophyd_async-0.3a1.dist-info → ophyd_async-0.3a2.dist-info}/WHEEL +0 -0
  57. {ophyd_async-0.3a1.dist-info → ophyd_async-0.3a2.dist-info}/entry_points.txt +0 -0
  58. {ophyd_async-0.3a1.dist-info → ophyd_async-0.3a2.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ophyd-async
3
- Version: 0.3a1
3
+ Version: 0.3a2
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
@@ -35,21 +35,19 @@ License: BSD 3-Clause License
35
35
  Project-URL: GitHub, https://github.com/bluesky/ophyd-async
36
36
  Classifier: Development Status :: 3 - Alpha
37
37
  Classifier: License :: OSI Approved :: BSD License
38
- Classifier: Programming Language :: Python :: 3.9
39
38
  Classifier: Programming Language :: Python :: 3.10
40
39
  Classifier: Programming Language :: Python :: 3.11
41
- Requires-Python: >=3.9
42
- Description-Content-Type: text/x-rst
40
+ Requires-Python: >=3.10
41
+ Description-Content-Type: text/markdown
43
42
  License-File: LICENSE
44
43
  Requires-Dist: networkx >=2.0
45
44
  Requires-Dist: numpy
46
45
  Requires-Dist: packaging
47
46
  Requires-Dist: pint
48
47
  Requires-Dist: bluesky >=1.13.0a3
49
- Requires-Dist: event-model
48
+ Requires-Dist: event-model <1.21.0
50
49
  Requires-Dist: p4p
51
50
  Requires-Dist: pyyaml
52
- Requires-Dist: typing-extensions ; python_version < "3.8"
53
51
  Provides-Extra: ca
54
52
  Requires-Dist: aioca >=1.6 ; extra == 'ca'
55
53
  Provides-Extra: dev
@@ -64,7 +62,6 @@ Requires-Dist: inflection ; extra == 'dev'
64
62
  Requires-Dist: ipython ; extra == 'dev'
65
63
  Requires-Dist: ipywidgets ; extra == 'dev'
66
64
  Requires-Dist: matplotlib ; extra == 'dev'
67
- Requires-Dist: mypy ; extra == 'dev'
68
65
  Requires-Dist: myst-parser ; extra == 'dev'
69
66
  Requires-Dist: numpydoc ; extra == 'dev'
70
67
  Requires-Dist: ophyd ; extra == 'dev'
@@ -73,13 +70,14 @@ Requires-Dist: pipdeptree ; extra == 'dev'
73
70
  Requires-Dist: pre-commit ; extra == 'dev'
74
71
  Requires-Dist: pydata-sphinx-theme >=0.12 ; extra == 'dev'
75
72
  Requires-Dist: pyepics >=3.4.2 ; extra == 'dev'
76
- Requires-Dist: pyside6 ; extra == 'dev'
73
+ Requires-Dist: pyside6 ==6.6.2 ; extra == 'dev'
77
74
  Requires-Dist: pytest ; extra == 'dev'
78
75
  Requires-Dist: pytest-asyncio ; extra == 'dev'
79
76
  Requires-Dist: pytest-cov ; extra == 'dev'
80
77
  Requires-Dist: pytest-faulthandler ; extra == 'dev'
81
78
  Requires-Dist: pytest-rerunfailures ; extra == 'dev'
82
79
  Requires-Dist: pytest-timeout ; extra == 'dev'
80
+ Requires-Dist: ruff ; extra == 'dev'
83
81
  Requires-Dist: sphinx-autobuild ; extra == 'dev'
84
82
  Requires-Dist: sphinx-copybutton ; extra == 'dev'
85
83
  Requires-Dist: sphinx-design ; extra == 'dev'
@@ -89,75 +87,21 @@ Requires-Dist: types-pyyaml ; extra == 'dev'
89
87
  Provides-Extra: pva
90
88
  Requires-Dist: p4p ; extra == 'pva'
91
89
 
92
- Ophyd Async
93
- ===========
90
+ [![CI](https://github.com/bluesky/ophyd-async/actions/workflows/ci.yml/badge.svg)](https://github.com/bluesky/ophyd-async/actions/workflows/ci.yml)
91
+ [![Coverage](https://codecov.io/gh/bluesky/ophyd-async/branch/main/graph/badge.svg)](https://codecov.io/gh/bluesky/ophyd-async)
92
+ [![PyPI](https://img.shields.io/pypi/v/ophyd-async.svg)](https://pypi.org/project/ophyd-async)
93
+ [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
94
94
 
95
- |code_ci| |docs_ci| |coverage| |pypi_version| |license|
95
+ # ophyd_async
96
96
 
97
- Asynchronous device abstraction framework, building on `Ophyd`_.
97
+ Asynchronous Bluesky hardware abstraction code, compatible with control systems like EPICS and Tango
98
98
 
99
- ============== ==============================================================
100
- PyPI ``pip install ophyd-async``
101
- Source code https://github.com/bluesky/ophyd-async
102
- Documentation https://blueskyproject.io/ophyd-async
103
- ============== ==============================================================
99
+ | Source | <https://github.com/bluesky/ophyd-async> |
100
+ | :-----------: | :-----------------------------------------------: |
101
+ | PyPI | `pip install ophyd-async` |
102
+ | Documentation | <https://bluesky.github.io/ophyd-async> |
103
+ | Releases | <https://github.com/bluesky/ophyd-async/releases> |
104
104
 
105
- Python library for asynchronously interfacing with hardware, intended to
106
- be used as an abstraction layer that enables experiment orchestration and data
107
- acquisition code to operate above the specifics of particular devices and control
108
- systems.
105
+ <!-- README only content. Anything below this line won't be included in index.md -->
109
106
 
110
- Both ophyd and ophyd-async are typically used with the `Bluesky Run Engine`_ for
111
- experiment orchestration and data acquisition. However, these libraries are
112
- able to be used in a stand-alone fashion. For an example of how a facility defines
113
- and uses ophyd-async devices, see `dls-dodal`_, which is currently using a
114
- mixture of ophyd and ophyd-async devices.
115
-
116
- While `EPICS`_ is the most common control system layer that ophyd-async can
117
- interface with, other control systems like `Tango`_ are used by some facilities
118
- also. In addition to the abstractions provided by ophyd, ophyd-async allows:
119
-
120
- * Asynchronous signal access, opening the possibility for hardware-triggered
121
- scanning (also known as fly-scanning)
122
- * Simpler instantiation of devices (groupings of signals) with less reliance
123
- upon complex class hierarchies
124
-
125
- NOTE: ophyd-async is included on a provisional basis until the v1.0 release.
126
-
127
- See the tutorials for usage examples.
128
-
129
- .. |code_ci| image:: https://github.com/bluesky/ophyd-async/actions/workflows/code.yml/badge.svg?branch=main
130
- :target: https://github.com/bluesky/ophyd-async/actions/workflows/code.yml
131
- :alt: Code CI
132
-
133
- .. |docs_ci| image:: https://github.com/bluesky/ophyd-async/actions/workflows/docs.yml/badge.svg?branch=main
134
- :target: https://github.com/bluesky/ophyd-async/actions/workflows/docs.yml
135
- :alt: Docs CI
136
-
137
- .. |coverage| image:: https://codecov.io/gh/bluesky/ophyd-async/branch/master/graph/badge.svg
138
- :target: https://codecov.io/gh/bluesky/ophyd-async
139
- :alt: Test Coverage
140
-
141
- .. |pypi_version| image:: https://img.shields.io/pypi/v/ophyd-async.svg
142
- :target: https://pypi.org/project/ophyd-async
143
- :alt: Latest PyPI version
144
-
145
- .. |license| image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg
146
- :target: https://opensource.org/licenses/BSD-3-Clause
147
- :alt: BSD 3-Clause License
148
-
149
- .. _Bluesky Run Engine: http://blueskyproject.io/bluesky
150
-
151
- .. _Ophyd: http://blueskyproject.io/ophyd
152
-
153
- .. _dls-dodal: https://github.com/DiamondLightSource/dodal
154
-
155
- .. _EPICS: http://www.aps.anl.gov/epics/
156
-
157
- .. _Tango: https://www.tango-controls.org/
158
-
159
- ..
160
- Anything below this line is used when viewing README.rst and will be replaced
161
- when included in index.rst
162
-
163
- See https://blueskyproject.io/ophyd-async for more detailed documentation.
107
+ See https://bluesky.github.io/ophyd-async for more detailed documentation.
@@ -0,0 +1,76 @@
1
+ ophyd_async/__init__.py,sha256=v-rRiDOgZ3sQSMQKq0vgUQZvpeOkoHFXissAx6Ktg84,61
2
+ ophyd_async/__main__.py,sha256=G-Zcv_G9zK7Nhx6o5L5w-wyhMxdl_WgyMELu8IMFqAE,328
3
+ ophyd_async/_version.py,sha256=qiI6_8XDVi-QTRXglHkCWQmocyDKhwu0_7zIjyy3JmQ,408
4
+ ophyd_async/protocols.py,sha256=8kQms6exvlMRqK0DESv4LyhhweUf7bskUj0ODWBLra8,2283
5
+ ophyd_async/core/__init__.py,sha256=pzR-cIfjKTOoL8BFkvhwwflMIYzCOpeXU1xkppC1V7c,2252
6
+ ophyd_async/core/_providers.py,sha256=LrlTMPHKXWOPVkpAOw-pqBq0kip-c3C9ZZPoFfiaV4M,2212
7
+ ophyd_async/core/async_status.py,sha256=-sfIf7VhwAP25kSVwKZjAIYOTROpfnh2jgkDw5_afSU,2801
8
+ ophyd_async/core/detector.py,sha256=bc_9rXDaRiD2tciSZtP57h64r8wOCG4ZcWnmnJORRlI,11220
9
+ ophyd_async/core/device.py,sha256=Bm8u1wEN6PuJgCgis_msVRvfrO1_RumxAIMPag8k-cI,5813
10
+ ophyd_async/core/device_save_loader.py,sha256=RXA3dPUPihAR2ZGDStlGiA-TAsr_xqL0snsCjMsMnfA,9138
11
+ ophyd_async/core/flyer.py,sha256=rTAcFIyfGJwzwP-oI-V6nPNQiZazKDHn278wC9-sZgQ,2305
12
+ ophyd_async/core/signal.py,sha256=ZNHP9yh81l3kOpyQvnXuASVBlU8SJiKEQczKvJXXCxI,12549
13
+ ophyd_async/core/signal_backend.py,sha256=z0bwzM9IYp-hOZGlxy0u8JHfMGlULP17p14l2eVuk6A,1528
14
+ ophyd_async/core/sim_signal_backend.py,sha256=HK6-_jAvH3Uc8ijnVgLtjl1SsGWyiEH7ptkyUQPv_E4,6071
15
+ ophyd_async/core/standard_readable.py,sha256=ZoArn8sk31Kz389_CDe_Z70L9L6qjT5uVqYi5ywj2oM,2614
16
+ ophyd_async/core/utils.py,sha256=AVF5e42CVG_GaLoHJSI82iC4KAO60fb9fEJMISHBCNM,5043
17
+ ophyd_async/epics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ ophyd_async/epics/_backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ ophyd_async/epics/_backend/_aioca.py,sha256=TZiV5r7CvEbM40t3TrTG4mVJBZGI_NDIaQlhfUHm0us,8789
20
+ ophyd_async/epics/_backend/_p4p.py,sha256=NtGncTdiou9HPt0fLPhPjRDcvUsUJ_6em9bhcQew-C8,12061
21
+ ophyd_async/epics/_backend/common.py,sha256=o0heeQEM7aP-QYCicwOEtNHs5c5OD6raR-5cTs9yRX0,840
22
+ ophyd_async/epics/areadetector/__init__.py,sha256=T5coX2Osb59uzQFlpHykp_spV-SBRQZYWdAIpDDsYQc,442
23
+ ophyd_async/epics/areadetector/aravis.py,sha256=cCugTlUs0b7mtzKTyxtWCRXO27tYA7zycPVPMhgkMyU,2335
24
+ ophyd_async/epics/areadetector/pilatus.py,sha256=gEJVUphr5gj8TwSYcc07ZakWk9tRIKKZRnPva5LZVBE,1537
25
+ ophyd_async/epics/areadetector/single_trigger_det.py,sha256=q5mG-OUVagIjvXLb28lsrGj4eUSoH2pNW2rT4rQR8fA,1206
26
+ ophyd_async/epics/areadetector/utils.py,sha256=dez54oElIkGMnhSM9qghToUB1opSqjdWTV2vhHCgRMA,3133
27
+ ophyd_async/epics/areadetector/controllers/__init__.py,sha256=UG2-M5d2ykp2T8isQJCbAsGZF1aH0BtC_OPlzzPTjnA,149
28
+ ophyd_async/epics/areadetector/controllers/ad_sim_controller.py,sha256=mthZ6WxajMEgUKptq3bnkIctbLhjzTagV66i1auB8cg,1587
29
+ ophyd_async/epics/areadetector/controllers/aravis_controller.py,sha256=vRiSexnFzijG8eEwowMAFIe730xFNMmgjjbXQVi4zrc,2394
30
+ ophyd_async/epics/areadetector/controllers/pilatus_controller.py,sha256=cd1CKkaXlwkpQ0I1VL7nN0U8R4VweTsa08WhvHYI4nY,2243
31
+ ophyd_async/epics/areadetector/drivers/__init__.py,sha256=AOpIEYfoBhG9Nc4-SId99v4PpyEh4_RBXfNaqiXlwUI,315
32
+ ophyd_async/epics/areadetector/drivers/ad_base.py,sha256=ikfyNcZwJa5ah52DckjrBzkMMT_eDY1smM4XWfb6A6E,3689
33
+ ophyd_async/epics/areadetector/drivers/aravis_driver.py,sha256=Z96xXKfGJbLYehyy0wmP3mCW5lVRmdypmX-9U8cYbD8,5607
34
+ ophyd_async/epics/areadetector/drivers/pilatus_driver.py,sha256=fc3vNHqop9oLg-fvaU-diQNEV5U1qzA9vX2T8Hwy_E8,478
35
+ ophyd_async/epics/areadetector/writers/__init__.py,sha256=tpPcrYd1hs8WS7C0gmCnR2EBwjE5RzCljI7WwZ2V_LM,191
36
+ ophyd_async/epics/areadetector/writers/_hdfdataset.py,sha256=E0C9VgsPyY35h7k0mvcIhjsIVNavApLxizqNWlM388w,167
37
+ ophyd_async/epics/areadetector/writers/_hdffile.py,sha256=YtUgOKX53m0TaFEGBW671qXqNuuEKxEyLV5Ein1fjvo,1799
38
+ ophyd_async/epics/areadetector/writers/hdf_writer.py,sha256=oons06X8OAw3fh3IggvvQazjIgWpZAQ9jo_PBdtYewM,5259
39
+ ophyd_async/epics/areadetector/writers/nd_file_hdf.py,sha256=rutCstILCGGwhP5pH_2lWM2QUcZ88-uxx5dTZIJUMWQ,1562
40
+ ophyd_async/epics/areadetector/writers/nd_plugin.py,sha256=l0yBBEazviyFsWJv_4_sfGn_YM_Iyd0_SlMdAmUlXDU,871
41
+ ophyd_async/epics/demo/__init__.py,sha256=XSoP6xZVuQtxcDe6ZBIUy76iEgOywJgR4Z-ASEyyc90,6237
42
+ ophyd_async/epics/demo/demo_ad_sim_detector.py,sha256=06y65yvaqXvL2rDocjYyLz9kTVzuwV-LeuPhEfExdOA,944
43
+ ophyd_async/epics/demo/mover.db,sha256=RFz0rxZue689Wh1sWTZwWeFMUrH04ttPq2u5xJH_Fp4,998
44
+ ophyd_async/epics/demo/sensor.db,sha256=AVtiydrdtwAz2EFurO2Ult9SSRtre3r0akOBbL98LT0,554
45
+ ophyd_async/epics/motion/__init__.py,sha256=tnmVRIwKa9PdN_xonJdAUD04UpEceh-hoD7XI62yDB0,46
46
+ ophyd_async/epics/motion/motor.py,sha256=PBnkPuoCU1u1HD8IGEOM9GF2d1kwd0Hi7V9tr2rahZY,3786
47
+ ophyd_async/epics/pvi/__init__.py,sha256=TbOQNY4enQWgtr1T7x129vpo2p7FIFlr8cyZqqv5Lk4,158
48
+ ophyd_async/epics/pvi/pvi.py,sha256=hpn7GeO0xk_-UDoy42LIsi0adER9IZO3HPP2iu6Nmu4,11320
49
+ ophyd_async/epics/signal/__init__.py,sha256=wb93RTqvSbGKVFQj8OHykbVLGLmwKHU72oi5xYu2UaY,188
50
+ ophyd_async/epics/signal/_epics_transport.py,sha256=DEIL0iYUAWssysVEgWGu1fHSM1l-ATV2kjUgPtDN9LY,858
51
+ ophyd_async/epics/signal/signal.py,sha256=J3Kush7lK0lGj9dZG6qfNPFGNDsv4s-Ggv__1O9qaqA,3165
52
+ ophyd_async/panda/__init__.py,sha256=ZaD1nRgGKAGFGdpP1WWF-FnX3wcGuYqqq0QRZbaSBYQ,692
53
+ ophyd_async/panda/_common_blocks.py,sha256=n0PPc1rar43oDSIA-yNubTc8fR5YCW1tyjQU58whsg0,1038
54
+ ophyd_async/panda/_hdf_panda.py,sha256=zZxIdNIXHwjlZA-HTezQNfcCh98P2Pst6Pcld92rPLM,1414
55
+ ophyd_async/panda/_panda_controller.py,sha256=dIqcjmaIHVrki8UXSoDx46kk6I2Lhpe2o3sXNg5f-RQ,1238
56
+ ophyd_async/panda/_table.py,sha256=dLoRP4zYNOkD_s0Vkp2wVYAwkjVG8nNdf8-FaXOTfPo,5655
57
+ ophyd_async/panda/_trigger.py,sha256=tBH8uq_4o1ASG9yofVxq3tjf5v8LPzniDTRL4yjramI,1195
58
+ ophyd_async/panda/_utils.py,sha256=VHW5kPVISyEkmse_qQcyisBkkEwMO6GG2Ago-CH1AFA,487
59
+ ophyd_async/panda/writers/__init__.py,sha256=xy7BguVQG4HNIDBfKPjMj0KQo1tptC9LbCpEuMcVGaM,70
60
+ ophyd_async/panda/writers/_hdf_writer.py,sha256=tmIMWKQhURZu3PnmJyEn0xd94CWijpErXo_oJTSfefA,7626
61
+ ophyd_async/panda/writers/_panda_hdf_file.py,sha256=42iHaTax4JjOBpNC7d4nkNL9SM14OTnFPTIcXv2jg-4,1759
62
+ ophyd_async/planstubs/__init__.py,sha256=G9B80_d87lnOThUsGbAYPqzMw9xDelq2TbS7dkB692o,188
63
+ ophyd_async/planstubs/prepare_trigger_and_dets.py,sha256=0c4XDAxVkSanyDKtaMda0VgPEbk2jM0geVzAx707DhI,1772
64
+ ophyd_async/sim/__init__.py,sha256=ScjH1g7FMo5yPACfJRZE6xGBWCHU4bKDzNQk1tqObnA,366
65
+ ophyd_async/sim/pattern_generator.py,sha256=R9iC4ofkcM6KI1cLFDdgyggBccXrGmb5_MNIIlPVgQc,10646
66
+ ophyd_async/sim/sim_pattern_detector_control.py,sha256=Ypz8IuRYAY2J243IhVbNyGr_Z-XtpJZ1qxma6NR3TgM,1838
67
+ ophyd_async/sim/sim_pattern_detector_writer.py,sha256=X7AUYKL19Z0CLAI_wzQvJMo5CUYlebT_7-q7CgZ9FsA,1243
68
+ ophyd_async/sim/sim_pattern_generator.py,sha256=w5oc5QaFpAxzM0S5irvcOqsyASgN0rZQRzMjbZ5r8cE,1326
69
+ ophyd_async/sim/demo/__init__.py,sha256=9mxKpslrL89cfSj4g3og8Br3O--pMj3hhWZS-Xu6kyA,56
70
+ ophyd_async/sim/demo/sim_motor.py,sha256=Nt8mD_RY4pl80wQOQ3g0KIfNep4_9teJh4ioYgIsLj8,4036
71
+ ophyd_async-0.3a2.dist-info/LICENSE,sha256=pU5shZcsvWgz701EbT7yjFZ8rMvZcWgRH54CRt8ld_c,1517
72
+ ophyd_async-0.3a2.dist-info/METADATA,sha256=_ZQVR2K-Bjx7gL7Z6kmlFbOjeEGG8ttArDfMshOri9g,5249
73
+ ophyd_async-0.3a2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
74
+ ophyd_async-0.3a2.dist-info/entry_points.txt,sha256=O0YNJTEufO0w9BozXi-JurTy2U1_o0ypeCgJLQ727Jk,58
75
+ ophyd_async-0.3a2.dist-info/top_level.txt,sha256=-hjorMsv5Rmjo3qrgqhjpal1N6kW5vMxZO3lD4iEaXs,12
76
+ ophyd_async-0.3a2.dist-info/RECORD,,
ophyd_async/epics/pvi.py DELETED
@@ -1,70 +0,0 @@
1
- from typing import Callable, Dict, FrozenSet, Optional, Type, TypedDict, TypeVar
2
-
3
- from ophyd_async.core.signal import Signal
4
- from ophyd_async.core.signal_backend import SignalBackend
5
- from ophyd_async.core.utils import DEFAULT_TIMEOUT
6
- from ophyd_async.epics._backend._p4p import PvaSignalBackend
7
- from ophyd_async.epics.signal.signal import (
8
- epics_signal_r,
9
- epics_signal_rw,
10
- epics_signal_w,
11
- epics_signal_x,
12
- )
13
-
14
- T = TypeVar("T")
15
-
16
-
17
- _pvi_mapping: Dict[FrozenSet[str], Callable[..., Signal]] = {
18
- frozenset({"r", "w"}): lambda dtype, read_pv, write_pv: epics_signal_rw(
19
- dtype, read_pv, write_pv
20
- ),
21
- frozenset({"rw"}): lambda dtype, read_pv, write_pv: epics_signal_rw(
22
- dtype, read_pv, write_pv
23
- ),
24
- frozenset({"r"}): lambda dtype, read_pv, _: epics_signal_r(dtype, read_pv),
25
- frozenset({"w"}): lambda dtype, _, write_pv: epics_signal_w(dtype, write_pv),
26
- frozenset({"x"}): lambda _, __, write_pv: epics_signal_x(write_pv),
27
- }
28
-
29
-
30
- class PVIEntry(TypedDict, total=False):
31
- d: str
32
- r: str
33
- rw: str
34
- w: str
35
- x: str
36
-
37
-
38
- async def pvi_get(
39
- read_pv: str, timeout: float = DEFAULT_TIMEOUT
40
- ) -> Dict[str, PVIEntry]:
41
- """Makes a PvaSignalBackend purely to connect to PVI information.
42
-
43
- This backend is simply thrown away at the end of this method. This is useful
44
- because the backend handles a CancelledError exception that gets thrown on
45
- timeout, and therefore can be used for error reporting."""
46
- backend: SignalBackend = PvaSignalBackend(None, read_pv, read_pv)
47
- await backend.connect(timeout=timeout)
48
- d: Dict[str, Dict[str, Dict[str, str]]] = await backend.get_value()
49
- pv_info = d.get("pvi") or {}
50
- result = {}
51
-
52
- for attr_name, attr_info in pv_info.items():
53
- result[attr_name] = PVIEntry(**attr_info) # type: ignore
54
-
55
- return result
56
-
57
-
58
- def make_signal(signal_pvi: PVIEntry, dtype: Optional[Type[T]] = None) -> Signal[T]:
59
- """Make a signal.
60
-
61
- This assumes datatype is None so it can be used to create dynamic signals.
62
- """
63
- operations = frozenset(signal_pvi.keys())
64
- pvs = [signal_pvi[i] for i in operations] # type: ignore
65
- signal_factory = _pvi_mapping[operations]
66
-
67
- write_pv = "pva://" + pvs[0]
68
- read_pv = write_pv if len(pvs) < 2 else "pva://" + pvs[1]
69
-
70
- return signal_factory(dtype, read_pv, write_pv)
@@ -1,241 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import re
4
- from typing import Dict, Optional, Tuple, cast, get_args, get_origin, get_type_hints
5
-
6
- from ophyd_async.core import (
7
- DEFAULT_TIMEOUT,
8
- Device,
9
- DeviceVector,
10
- Signal,
11
- SignalBackend,
12
- SignalR,
13
- SignalRW,
14
- SignalX,
15
- SimSignalBackend,
16
- )
17
- from ophyd_async.epics.pvi import PVIEntry, make_signal, pvi_get
18
- from ophyd_async.panda.table import SeqTable
19
-
20
-
21
- class PulseBlock(Device):
22
- delay: SignalRW[float]
23
- width: SignalRW[float]
24
-
25
-
26
- class SeqBlock(Device):
27
- table: SignalRW[SeqTable]
28
- active: SignalRW[bool]
29
-
30
-
31
- class PcapBlock(Device):
32
- active: SignalR[bool]
33
- arm: SignalRW[bool]
34
-
35
-
36
- def _block_name_number(block_name: str) -> Tuple[str, Optional[int]]:
37
- """Maps a panda block name to a block and number.
38
-
39
- There are exceptions to this rule; some blocks like pcap do not contain numbers.
40
- Other blocks may contain numbers and letters, but no numbers at the end.
41
-
42
- Such block names will only return the block name, and not a number.
43
-
44
- If this function returns both a block name and number, it should be instantiated
45
- into a device vector."""
46
- m = re.match("^([0-9a-z_-]*)([0-9]+)$", block_name)
47
- if m is not None:
48
- name, num = m.groups()
49
- return name, int(num or 1) # just to pass type checks.
50
-
51
- return block_name, None
52
-
53
-
54
- def _remove_inconsistent_blocks(pvi_info: Optional[Dict[str, PVIEntry]]) -> None:
55
- """Remove blocks from pvi information.
56
-
57
- This is needed because some pandas have 'pcap' and 'pcap1' blocks, which are
58
- inconsistent with the assumption that pandas should only have a 'pcap' block,
59
- for example.
60
-
61
- """
62
- if pvi_info is None:
63
- return
64
- pvi_keys = set(pvi_info.keys())
65
- for k in pvi_keys:
66
- kn = re.sub(r"\d*$", "", k)
67
- if kn and k != kn and kn in pvi_keys:
68
- del pvi_info[k]
69
-
70
-
71
- class PandA(Device):
72
- pulse: DeviceVector[PulseBlock]
73
- seq: DeviceVector[SeqBlock]
74
- pcap: PcapBlock
75
-
76
- def __init__(self, prefix: str, name: str = "") -> None:
77
- super().__init__(name)
78
- self._prefix = prefix
79
-
80
- def verify_block(self, name: str, num: Optional[int]):
81
- """Given a block name and number, return information about a block."""
82
- anno = get_type_hints(self, globalns=globals()).get(name)
83
-
84
- block: Device = Device()
85
-
86
- if anno:
87
- type_args = get_args(anno)
88
- block = type_args[0]() if type_args else anno()
89
-
90
- if not type_args:
91
- assert num is None, f"Only expected one {name} block, got {num}"
92
-
93
- return block
94
-
95
- async def _make_block(
96
- self,
97
- name: str,
98
- num: Optional[int],
99
- block_pv: str,
100
- sim: bool = False,
101
- timeout: float = DEFAULT_TIMEOUT,
102
- ):
103
- """Makes a block given a block name containing relevant signals.
104
-
105
- Loops through the signals in the block (found using type hints), if not in
106
- sim mode then does a pvi call, and identifies this signal from the pvi call.
107
- """
108
- block = self.verify_block(name, num)
109
-
110
- field_annos = get_type_hints(block, globalns=globals())
111
- block_pvi = await pvi_get(block_pv, timeout=timeout) if not sim else None
112
-
113
- # finds which fields this class actually has, e.g. delay, width...
114
- for sig_name, sig_type in field_annos.items():
115
- origin = get_origin(sig_type)
116
- args = get_args(sig_type)
117
-
118
- # if not in sim mode,
119
- if block_pvi:
120
- # try to get this block in the pvi.
121
- entry: Optional[PVIEntry] = block_pvi.get(sig_name)
122
- if entry is None:
123
- raise Exception(
124
- f"{self.__class__.__name__} has a {name} block containing a/"
125
- + f"an {sig_name} signal which has not been retrieved by PVI."
126
- )
127
-
128
- signal: Signal = make_signal(entry, args[0] if len(args) > 0 else None)
129
-
130
- else:
131
- backend: SignalBackend = SimSignalBackend(
132
- args[0] if len(args) > 0 else None, block_pv
133
- )
134
- signal = SignalX(backend) if not origin else origin(backend)
135
-
136
- setattr(block, sig_name, signal)
137
-
138
- # checks for any extra pvi information not contained in this class
139
- if block_pvi:
140
- for attr, attr_pvi in block_pvi.items():
141
- if not hasattr(block, attr):
142
- # makes any extra signals
143
- setattr(block, attr, make_signal(attr_pvi))
144
-
145
- return block
146
-
147
- async def _make_untyped_block(
148
- self, block_pv: str, timeout: float = DEFAULT_TIMEOUT
149
- ):
150
- """Populates a block using PVI information.
151
-
152
- This block is not typed as part of the PandA interface but needs to be
153
- included dynamically anyway.
154
- """
155
- block = Device()
156
- block_pvi: Dict[str, PVIEntry] = await pvi_get(block_pv, timeout=timeout)
157
-
158
- for signal_name, signal_pvi in block_pvi.items():
159
- setattr(block, signal_name, make_signal(signal_pvi))
160
-
161
- return block
162
-
163
- # TODO redo to set_panda_block? confusing name
164
- def set_attribute(self, name: str, num: Optional[int], block: Device):
165
- """Set a block on the panda.
166
-
167
- Need to be able to set device vectors on the panda as well, e.g. if num is not
168
- None, need to be able to make a new device vector and start populating it...
169
- """
170
- anno = get_type_hints(self, globalns=globals()).get(name)
171
-
172
- # if it's an annotated device vector, or it isn't but we've got a number then
173
- # make a DeviceVector on the class
174
- if get_origin(anno) == DeviceVector or (not anno and num is not None):
175
- self.__dict__.setdefault(name, DeviceVector())[num] = block
176
- else:
177
- setattr(self, name, block)
178
-
179
- async def connect(
180
- self, sim: bool = False, timeout: float = DEFAULT_TIMEOUT
181
- ) -> None:
182
- """Initialises all blocks and connects them.
183
-
184
- First, checks for pvi information. If it exists, make all blocks from this.
185
- Then, checks that all required blocks in the PandA have been made.
186
-
187
- If there's no pvi information, that's because we're in sim mode. In that case,
188
- makes all required blocks.
189
- """
190
- pvi_info = (
191
- await pvi_get(self._prefix + "PVI", timeout=timeout) if not sim else None
192
- )
193
- _remove_inconsistent_blocks(pvi_info)
194
-
195
- hints = {
196
- attr_name: attr_type
197
- for attr_name, attr_type in get_type_hints(self, globalns=globals()).items()
198
- if not attr_name.startswith("_")
199
- }
200
-
201
- # create all the blocks pvi says it should have,
202
- if pvi_info:
203
- pvi_info = cast(Dict[str, PVIEntry], pvi_info)
204
- for block_name, block_pvi in pvi_info.items():
205
- name, num = _block_name_number(block_name)
206
-
207
- if name in hints:
208
- block = await self._make_block(
209
- name, num, block_pvi["d"], timeout=timeout
210
- )
211
- else:
212
- block = await self._make_untyped_block(
213
- block_pvi["d"], timeout=timeout
214
- )
215
-
216
- self.set_attribute(name, num, block)
217
-
218
- # then check if the ones defined in this class are in the pvi info
219
- # make them if there is no pvi info, i.e. sim mode.
220
- for block_name in hints.keys():
221
- if pvi_info is not None:
222
- pvi_name = block_name
223
-
224
- if get_origin(hints[block_name]) == DeviceVector:
225
- pvi_name += "1"
226
-
227
- entry: Optional[PVIEntry] = pvi_info.get(pvi_name)
228
-
229
- assert entry, f"Expected PandA to contain {block_name} block."
230
- assert list(entry) == [
231
- "d"
232
- ], f"Expected PandA to only contain blocks, got {entry}"
233
- else:
234
- num = 1 if get_origin(hints[block_name]) == DeviceVector else None
235
- block = await self._make_block(
236
- block_name, num, "sim://", sim=sim, timeout=timeout
237
- )
238
- self.set_attribute(block_name, num, block)
239
-
240
- self.set_name(self.name)
241
- await super().connect(sim)
@@ -1,56 +0,0 @@
1
- ophyd_async/__init__.py,sha256=WJoRU7gO-hRzyf7a-C952zF6-7zwPjP7qZ1Qu5GTUC8,124
2
- ophyd_async/__main__.py,sha256=G-Zcv_G9zK7Nhx6o5L5w-wyhMxdl_WgyMELu8IMFqAE,328
3
- ophyd_async/_version.py,sha256=nSi77MfFtahju9XLwmhCTVsEygz__it8HHOvmBHSgKI,408
4
- ophyd_async/core/__init__.py,sha256=Vy0m53wHwRSQ8FVeqzyZ5c6qdWIkkLA4vmEwbdk7iqc,2121
5
- ophyd_async/core/_providers.py,sha256=HJbXQGocNxGDr5fv13zOkONXN1JqCfqJ3P0pR_sIy1Y,2137
6
- ophyd_async/core/async_status.py,sha256=-sfIf7VhwAP25kSVwKZjAIYOTROpfnh2jgkDw5_afSU,2801
7
- ophyd_async/core/detector.py,sha256=-KttT_gPniRB5xalfh5xj2aH5nLV6KoDVLlXaM-d0rw,9989
8
- ophyd_async/core/device.py,sha256=Ai5FRThlDeXnzKwTuVlmD8RFzlF_cq88Y6xcEiHOTho,5545
9
- ophyd_async/core/device_save_loader.py,sha256=RXA3dPUPihAR2ZGDStlGiA-TAsr_xqL0snsCjMsMnfA,9138
10
- ophyd_async/core/flyer.py,sha256=PBfxH9XMYqhFzNFqR2H6U_FxY2L5Un5mUD_3GMDZvdo,2780
11
- ophyd_async/core/signal.py,sha256=PgoUzcmMaQczoBSlHDA4AmRKoDwoDH9uNmF_5DgJa6k,11800
12
- ophyd_async/core/signal_backend.py,sha256=hwrDrwJK9rzOW4fsN_T2RFdCHhYwSFkR325i5L0lHE8,1363
13
- ophyd_async/core/sim_signal_backend.py,sha256=h7if2Oqr4jNOLfQoD_sqJOZd3uyTNHpfn1oJ4apug84,5590
14
- ophyd_async/core/standard_readable.py,sha256=9cBetIYttAho-7wOB3T1YgSJy0iWEFTAdn9jZkrGvLA,2560
15
- ophyd_async/core/utils.py,sha256=10cGVTR73oa_05ZVfdNzdTlr3-s1VHxvgtT1PD5LJ8Q,4585
16
- ophyd_async/epics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- ophyd_async/epics/pvi.py,sha256=BGhAXLyY2Z2e3ujyJ2ObnW19hogGvTZbHZY6Iq_nQeU,2331
18
- ophyd_async/epics/_backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- ophyd_async/epics/_backend/_aioca.py,sha256=0PmpDNohm52461plfrxirLJsyhZXgYIDJv12Y6zfQ0A,8731
20
- ophyd_async/epics/_backend/_p4p.py,sha256=aikjxQUgBRqNmMNMzOx3-N0rPdn-D1E8P5vQwvmYIgM,11970
21
- ophyd_async/epics/_backend/common.py,sha256=3zxGLNcBtss6WUGAwfAjxWnUF4YbFbYvpOUmoFJaG5Y,753
22
- ophyd_async/epics/areadetector/__init__.py,sha256=oEOzL7gEVVSULeT2WkFrva8lUKeX0zmQD0tmwFz6L24,325
23
- ophyd_async/epics/areadetector/single_trigger_det.py,sha256=q5mG-OUVagIjvXLb28lsrGj4eUSoH2pNW2rT4rQR8fA,1206
24
- ophyd_async/epics/areadetector/utils.py,sha256=dez54oElIkGMnhSM9qghToUB1opSqjdWTV2vhHCgRMA,3133
25
- ophyd_async/epics/areadetector/controllers/__init__.py,sha256=UG2-M5d2ykp2T8isQJCbAsGZF1aH0BtC_OPlzzPTjnA,149
26
- ophyd_async/epics/areadetector/controllers/ad_sim_controller.py,sha256=mthZ6WxajMEgUKptq3bnkIctbLhjzTagV66i1auB8cg,1587
27
- ophyd_async/epics/areadetector/controllers/pilatus_controller.py,sha256=TSWry-eWfDl4LqafMH75aVqYTrsdmSEbBzCLDUcR2aY,1552
28
- ophyd_async/epics/areadetector/drivers/__init__.py,sha256=AOpIEYfoBhG9Nc4-SId99v4PpyEh4_RBXfNaqiXlwUI,315
29
- ophyd_async/epics/areadetector/drivers/ad_base.py,sha256=ikfyNcZwJa5ah52DckjrBzkMMT_eDY1smM4XWfb6A6E,3689
30
- ophyd_async/epics/areadetector/drivers/pilatus_driver.py,sha256=cn5WNz913UOnOttw2bssjV2Bo3p9SuJma3ckRyCdvw8,442
31
- ophyd_async/epics/areadetector/writers/__init__.py,sha256=tpPcrYd1hs8WS7C0gmCnR2EBwjE5RzCljI7WwZ2V_LM,191
32
- ophyd_async/epics/areadetector/writers/_hdfdataset.py,sha256=E0C9VgsPyY35h7k0mvcIhjsIVNavApLxizqNWlM388w,167
33
- ophyd_async/epics/areadetector/writers/_hdffile.py,sha256=Zh7nWzK9-q0ASCi88tLAFUuWRL_rbz8XTNzKXwRmi88,1797
34
- ophyd_async/epics/areadetector/writers/hdf_writer.py,sha256=lJHP1CzpXYH82GcgEA-D4qI27Uj1_W8pAVgexFSXmgk,5011
35
- ophyd_async/epics/areadetector/writers/nd_file_hdf.py,sha256=rutCstILCGGwhP5pH_2lWM2QUcZ88-uxx5dTZIJUMWQ,1562
36
- ophyd_async/epics/areadetector/writers/nd_plugin.py,sha256=l0yBBEazviyFsWJv_4_sfGn_YM_Iyd0_SlMdAmUlXDU,871
37
- ophyd_async/epics/demo/__init__.py,sha256=DbVO4ufJWjQnZteilW8SBs5A8DN-Xajn0YibM0q8UkE,5500
38
- ophyd_async/epics/demo/demo_ad_sim_detector.py,sha256=06y65yvaqXvL2rDocjYyLz9kTVzuwV-LeuPhEfExdOA,944
39
- ophyd_async/epics/demo/mover.db,sha256=RFz0rxZue689Wh1sWTZwWeFMUrH04ttPq2u5xJH_Fp4,998
40
- ophyd_async/epics/demo/sensor.db,sha256=AVtiydrdtwAz2EFurO2Ult9SSRtre3r0akOBbL98LT0,554
41
- ophyd_async/epics/motion/__init__.py,sha256=tnmVRIwKa9PdN_xonJdAUD04UpEceh-hoD7XI62yDB0,46
42
- ophyd_async/epics/motion/motor.py,sha256=lQcA3PSPxA6XOnk8y5VuJGnKTq2VjkcO6ldCrssGr3M,3392
43
- ophyd_async/epics/signal/__init__.py,sha256=wb93RTqvSbGKVFQj8OHykbVLGLmwKHU72oi5xYu2UaY,188
44
- ophyd_async/epics/signal/_epics_transport.py,sha256=DEIL0iYUAWssysVEgWGu1fHSM1l-ATV2kjUgPtDN9LY,858
45
- ophyd_async/epics/signal/signal.py,sha256=7GnGa4CgFgTwyHeh4wYOJ2GEWwdXsC6vHD3z9LsaHaM,2543
46
- ophyd_async/panda/__init__.py,sha256=rVM7PdHnON5h0Hcpz_49N5bVfcNmSH5V6ApdaGcBSno,533
47
- ophyd_async/panda/panda.py,sha256=f_bEYUn7HwMCfVsZxPJ43e4Mo9FQrluHh7_vOHErwYE,8335
48
- ophyd_async/panda/panda_controller.py,sha256=CK9TTXAGXne31C3HZfBo_grk9pIM1y9Lyo0lms37dLY,1236
49
- ophyd_async/panda/table.py,sha256=dLoRP4zYNOkD_s0Vkp2wVYAwkjVG8nNdf8-FaXOTfPo,5655
50
- ophyd_async/panda/utils.py,sha256=VHW5kPVISyEkmse_qQcyisBkkEwMO6GG2Ago-CH1AFA,487
51
- ophyd_async-0.3a1.dist-info/LICENSE,sha256=pU5shZcsvWgz701EbT7yjFZ8rMvZcWgRH54CRt8ld_c,1517
52
- ophyd_async-0.3a1.dist-info/METADATA,sha256=Ypyn4I7_5JESeLA3lNZUyld4MB3vNrWGw_bpTnYvq0g,7208
53
- ophyd_async-0.3a1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
54
- ophyd_async-0.3a1.dist-info/entry_points.txt,sha256=O0YNJTEufO0w9BozXi-JurTy2U1_o0ypeCgJLQ727Jk,58
55
- ophyd_async-0.3a1.dist-info/top_level.txt,sha256=-hjorMsv5Rmjo3qrgqhjpal1N6kW5vMxZO3lD4iEaXs,12
56
- ophyd_async-0.3a1.dist-info/RECORD,,
File without changes
File without changes