ophyd-async 0.9.0a1__py3-none-any.whl → 0.10.0a1__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/__init__.py +5 -8
- ophyd_async/_docs_parser.py +12 -0
- ophyd_async/_version.py +9 -4
- ophyd_async/core/__init__.py +102 -74
- ophyd_async/core/_derived_signal.py +271 -0
- ophyd_async/core/_derived_signal_backend.py +300 -0
- ophyd_async/core/_detector.py +158 -153
- ophyd_async/core/_device.py +143 -115
- ophyd_async/core/_device_filler.py +82 -9
- ophyd_async/core/_flyer.py +16 -7
- ophyd_async/core/_hdf_dataset.py +29 -22
- ophyd_async/core/_log.py +14 -23
- ophyd_async/core/_mock_signal_backend.py +11 -3
- ophyd_async/core/_protocol.py +65 -45
- ophyd_async/core/_providers.py +28 -9
- ophyd_async/core/_readable.py +74 -58
- ophyd_async/core/_settings.py +113 -0
- ophyd_async/core/_signal.py +304 -174
- ophyd_async/core/_signal_backend.py +60 -14
- ophyd_async/core/_soft_signal_backend.py +18 -12
- ophyd_async/core/_status.py +72 -24
- ophyd_async/core/_table.py +54 -17
- ophyd_async/core/_utils.py +101 -52
- ophyd_async/core/_yaml_settings.py +66 -0
- ophyd_async/epics/__init__.py +1 -0
- ophyd_async/epics/adandor/__init__.py +9 -0
- ophyd_async/epics/adandor/_andor.py +45 -0
- ophyd_async/epics/adandor/_andor_controller.py +51 -0
- ophyd_async/epics/adandor/_andor_io.py +34 -0
- ophyd_async/epics/adaravis/__init__.py +8 -1
- ophyd_async/epics/adaravis/_aravis.py +23 -41
- ophyd_async/epics/adaravis/_aravis_controller.py +23 -55
- ophyd_async/epics/adaravis/_aravis_io.py +13 -28
- ophyd_async/epics/adcore/__init__.py +36 -14
- ophyd_async/epics/adcore/_core_detector.py +81 -0
- ophyd_async/epics/adcore/_core_io.py +145 -95
- ophyd_async/epics/adcore/_core_logic.py +179 -88
- ophyd_async/epics/adcore/_core_writer.py +223 -0
- ophyd_async/epics/adcore/_hdf_writer.py +51 -92
- ophyd_async/epics/adcore/_jpeg_writer.py +26 -0
- ophyd_async/epics/adcore/_single_trigger.py +6 -5
- ophyd_async/epics/adcore/_tiff_writer.py +26 -0
- ophyd_async/epics/adcore/_utils.py +3 -2
- ophyd_async/epics/adkinetix/__init__.py +2 -1
- ophyd_async/epics/adkinetix/_kinetix.py +32 -27
- ophyd_async/epics/adkinetix/_kinetix_controller.py +11 -21
- ophyd_async/epics/adkinetix/_kinetix_io.py +12 -13
- ophyd_async/epics/adpilatus/__init__.py +7 -2
- ophyd_async/epics/adpilatus/_pilatus.py +28 -40
- ophyd_async/epics/adpilatus/_pilatus_controller.py +25 -22
- ophyd_async/epics/adpilatus/_pilatus_io.py +11 -9
- ophyd_async/epics/adsimdetector/__init__.py +8 -1
- ophyd_async/epics/adsimdetector/_sim.py +22 -16
- ophyd_async/epics/adsimdetector/_sim_controller.py +9 -43
- ophyd_async/epics/adsimdetector/_sim_io.py +10 -0
- ophyd_async/epics/advimba/__init__.py +10 -1
- ophyd_async/epics/advimba/_vimba.py +26 -25
- ophyd_async/epics/advimba/_vimba_controller.py +12 -24
- ophyd_async/epics/advimba/_vimba_io.py +23 -28
- ophyd_async/epics/core/_aioca.py +66 -30
- ophyd_async/epics/core/_epics_connector.py +4 -0
- ophyd_async/epics/core/_epics_device.py +2 -0
- ophyd_async/epics/core/_p4p.py +50 -18
- ophyd_async/epics/core/_pvi_connector.py +65 -8
- ophyd_async/epics/core/_signal.py +51 -51
- ophyd_async/epics/core/_util.py +5 -5
- ophyd_async/epics/demo/__init__.py +11 -49
- ophyd_async/epics/demo/__main__.py +31 -0
- ophyd_async/epics/demo/_ioc.py +32 -0
- ophyd_async/epics/demo/_motor.py +82 -0
- ophyd_async/epics/demo/_point_detector.py +42 -0
- ophyd_async/epics/demo/_point_detector_channel.py +22 -0
- ophyd_async/epics/demo/_stage.py +15 -0
- ophyd_async/epics/demo/{mover.db → motor.db} +2 -1
- ophyd_async/epics/demo/point_detector.db +59 -0
- ophyd_async/epics/demo/point_detector_channel.db +21 -0
- ophyd_async/epics/eiger/_eiger.py +1 -3
- ophyd_async/epics/eiger/_eiger_controller.py +11 -4
- ophyd_async/epics/eiger/_eiger_io.py +2 -0
- ophyd_async/epics/eiger/_odin_io.py +1 -2
- ophyd_async/epics/motor.py +83 -38
- ophyd_async/epics/signal.py +4 -1
- ophyd_async/epics/testing/__init__.py +14 -14
- ophyd_async/epics/testing/_example_ioc.py +68 -73
- ophyd_async/epics/testing/_utils.py +19 -44
- ophyd_async/epics/testing/test_records.db +16 -0
- ophyd_async/epics/testing/test_records_pva.db +17 -16
- ophyd_async/fastcs/__init__.py +1 -0
- ophyd_async/fastcs/core.py +6 -0
- ophyd_async/fastcs/odin/__init__.py +1 -0
- ophyd_async/fastcs/panda/__init__.py +8 -8
- ophyd_async/fastcs/panda/_block.py +29 -9
- ophyd_async/fastcs/panda/_control.py +12 -2
- ophyd_async/fastcs/panda/_hdf_panda.py +5 -1
- ophyd_async/fastcs/panda/_table.py +13 -7
- ophyd_async/fastcs/panda/_trigger.py +23 -9
- ophyd_async/fastcs/panda/_writer.py +27 -30
- ophyd_async/plan_stubs/__init__.py +16 -0
- ophyd_async/plan_stubs/_ensure_connected.py +12 -17
- ophyd_async/plan_stubs/_fly.py +3 -5
- ophyd_async/plan_stubs/_nd_attributes.py +9 -5
- ophyd_async/plan_stubs/_panda.py +14 -0
- ophyd_async/plan_stubs/_settings.py +152 -0
- ophyd_async/plan_stubs/_utils.py +3 -0
- ophyd_async/plan_stubs/_wait_for_awaitable.py +13 -0
- ophyd_async/sim/__init__.py +29 -0
- ophyd_async/sim/__main__.py +43 -0
- ophyd_async/sim/_blob_detector.py +33 -0
- ophyd_async/sim/_blob_detector_controller.py +48 -0
- ophyd_async/sim/_blob_detector_writer.py +105 -0
- ophyd_async/sim/_mirror_horizontal.py +46 -0
- ophyd_async/sim/_mirror_vertical.py +74 -0
- ophyd_async/sim/_motor.py +233 -0
- ophyd_async/sim/_pattern_generator.py +124 -0
- ophyd_async/sim/_point_detector.py +86 -0
- ophyd_async/sim/_stage.py +19 -0
- ophyd_async/tango/__init__.py +1 -0
- ophyd_async/tango/core/__init__.py +6 -1
- ophyd_async/tango/core/_base_device.py +41 -33
- ophyd_async/tango/core/_converters.py +81 -0
- ophyd_async/tango/core/_signal.py +21 -33
- ophyd_async/tango/core/_tango_readable.py +2 -19
- ophyd_async/tango/core/_tango_transport.py +148 -74
- ophyd_async/tango/core/_utils.py +47 -0
- ophyd_async/tango/demo/_counter.py +2 -0
- ophyd_async/tango/demo/_detector.py +2 -0
- ophyd_async/tango/demo/_mover.py +10 -6
- ophyd_async/tango/demo/_tango/_servers.py +4 -0
- ophyd_async/tango/testing/__init__.py +6 -0
- ophyd_async/tango/testing/_one_of_everything.py +200 -0
- ophyd_async/testing/__init__.py +48 -7
- ophyd_async/testing/__pytest_assert_rewrite.py +4 -0
- ophyd_async/testing/_assert.py +200 -96
- ophyd_async/testing/_mock_signal_utils.py +59 -73
- ophyd_async/testing/_one_of_everything.py +146 -0
- ophyd_async/testing/_single_derived.py +87 -0
- ophyd_async/testing/_utils.py +3 -0
- {ophyd_async-0.9.0a1.dist-info → ophyd_async-0.10.0a1.dist-info}/METADATA +25 -26
- ophyd_async-0.10.0a1.dist-info/RECORD +149 -0
- {ophyd_async-0.9.0a1.dist-info → ophyd_async-0.10.0a1.dist-info}/WHEEL +1 -1
- ophyd_async/core/_device_save_loader.py +0 -274
- ophyd_async/epics/demo/_mover.py +0 -95
- ophyd_async/epics/demo/_sensor.py +0 -37
- ophyd_async/epics/demo/sensor.db +0 -19
- ophyd_async/fastcs/panda/_utils.py +0 -16
- ophyd_async/sim/demo/__init__.py +0 -19
- ophyd_async/sim/demo/_pattern_detector/__init__.py +0 -13
- ophyd_async/sim/demo/_pattern_detector/_pattern_detector.py +0 -42
- ophyd_async/sim/demo/_pattern_detector/_pattern_detector_controller.py +0 -62
- ophyd_async/sim/demo/_pattern_detector/_pattern_detector_writer.py +0 -41
- ophyd_async/sim/demo/_pattern_detector/_pattern_generator.py +0 -207
- ophyd_async/sim/demo/_sim_motor.py +0 -107
- ophyd_async/sim/testing/__init__.py +0 -0
- ophyd_async-0.9.0a1.dist-info/RECORD +0 -119
- ophyd_async-0.9.0a1.dist-info/entry_points.txt +0 -2
- {ophyd_async-0.9.0a1.dist-info → ophyd_async-0.10.0a1.dist-info/licenses}/LICENSE +0 -0
- {ophyd_async-0.9.0a1.dist-info → ophyd_async-0.10.0a1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
ophyd_async/__init__.py,sha256=dcAA3qsj1nNIMe5l-v2tlduZ_ypwBmyuHe45Lsq4k4w,206
|
|
2
|
+
ophyd_async/__main__.py,sha256=n_U4O9bgm97OuboUB_9eK7eFiwy8BZSgXJ0OzbE0DqU,481
|
|
3
|
+
ophyd_async/_docs_parser.py,sha256=gPYrigfSbYCF7QoSf2UvE-cpQu4snSssl7ZWN-kKDzI,352
|
|
4
|
+
ophyd_async/_version.py,sha256=AdcjN4kVO4q5oA5MXB74BCO4OC6Vbb8sWbQTVnx9yt4,515
|
|
5
|
+
ophyd_async/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
ophyd_async/core/__init__.py,sha256=eFRVN5WJQKNcZbFtP8abDcra6d_mwFLA0A60AbXL2Vw,4484
|
|
7
|
+
ophyd_async/core/_derived_signal.py,sha256=UKhqC6RYJ7iAqUvAXwECofm_J4_uyWvTXrikK2Svn0U,10404
|
|
8
|
+
ophyd_async/core/_derived_signal_backend.py,sha256=5_J9AfRPueJZ-CEgpE7GSG9B1nHUFzanD0N2D1mrGrY,12216
|
|
9
|
+
ophyd_async/core/_detector.py,sha256=J5Chu4sI9WgupB_3qh1c7ZOtlv9tSMJ3tXkHnsc9WIw,14517
|
|
10
|
+
ophyd_async/core/_device.py,sha256=UjpKuGvwCYN0-I0qpdWzBI9uLSLieHryDsLf_9Qeu-Y,14593
|
|
11
|
+
ophyd_async/core/_device_filler.py,sha256=MDz8eQQ-eEAwo-UEMxfqPfpcBuMG01tLCGR6utwVnmE,14825
|
|
12
|
+
ophyd_async/core/_flyer.py,sha256=YPCGAokF0GofOOO2OLrsSLoZSXs_RzmmrNglBunA31o,1924
|
|
13
|
+
ophyd_async/core/_hdf_dataset.py,sha256=eKz5wJQrhpnfnnEG9kliFqlEEdaN4oHy98JXsp-tGNE,2956
|
|
14
|
+
ophyd_async/core/_log.py,sha256=DxKR4Nz3SgTaTzKBZWqt-w48yT8WUAr_3Qr223TEWRw,3587
|
|
15
|
+
ophyd_async/core/_mock_signal_backend.py,sha256=SPdCbVWss6-iL9C3t9u0IvR_Ln9JeDypVd18WlivdjE,3156
|
|
16
|
+
ophyd_async/core/_protocol.py,sha256=wQ_snxhTprHqEjQb1HgFwBljwolMY6A8C3xgV1PXwdU,4051
|
|
17
|
+
ophyd_async/core/_providers.py,sha256=VbpRqV9hjv-GV8ngiy52FUoQGnR0XpQ0ZzQ1SPo0NwU,7765
|
|
18
|
+
ophyd_async/core/_readable.py,sha256=o96tsAxOK81554TQtwJobDn6moDimu5u-k-IXfLttO8,11053
|
|
19
|
+
ophyd_async/core/_settings.py,sha256=_ZccbXKP7j5rG6-bMKk7aaLr8hChdRDAPY_YSR71XXM,4213
|
|
20
|
+
ophyd_async/core/_signal.py,sha256=kqIvQXRP3n34-uhgTmbwm2fTIz_phJYyTT4Rm7P-gSs,26412
|
|
21
|
+
ophyd_async/core/_signal_backend.py,sha256=T8vJi-QuMfjB_uBB6iu_aApAY0j5pAFkDn5g2oSCbmI,6826
|
|
22
|
+
ophyd_async/core/_soft_signal_backend.py,sha256=zrE7H2ojHY6oQBucLkFgukszrkdvbIZuavLjEUqc_xM,6227
|
|
23
|
+
ophyd_async/core/_status.py,sha256=h4TtWFM7wFtpxxyAYYSITgcVzArYZdYBHbya6qIX5t0,6553
|
|
24
|
+
ophyd_async/core/_table.py,sha256=46pR9CxNGA5E5-h-vpb2OT5tfaUXfZRSayKhDJHacs4,6888
|
|
25
|
+
ophyd_async/core/_utils.py,sha256=zEA3lLeOP0N17XGUH8irxvEW8hq0slkxY4gJV3f4YzE,11382
|
|
26
|
+
ophyd_async/core/_yaml_settings.py,sha256=txy4_Igbsr8Yo132yv8jnCcsLpal8klM7DcPNow2KBs,2078
|
|
27
|
+
ophyd_async/epics/__init__.py,sha256=ou4yEaH9VZHz70e8oM614-arLMQvUfQyXhRJsnEpWn8,60
|
|
28
|
+
ophyd_async/epics/motor.py,sha256=6AyLQmgqzabcJ4T2yTJBP1omSxxWeya5RbR_r4zYr10,10458
|
|
29
|
+
ophyd_async/epics/signal.py,sha256=0A-supp9ajr63O6aD7F9oG0-Q26YmRjk-ZGh57-jo1Y,239
|
|
30
|
+
ophyd_async/epics/adandor/__init__.py,sha256=qsBoZdljSaqM-kJSvTf0uq5TNwXAih9lP3yOZpKxOFQ,204
|
|
31
|
+
ophyd_async/epics/adandor/_andor.py,sha256=SxAIP9OLefUqKcxrxhjNzil5D8-59Ps0vADdR6scO44,1281
|
|
32
|
+
ophyd_async/epics/adandor/_andor_controller.py,sha256=BqHNo0CqQR9WoxkTYNy0wP0vHKmkQk7PTvEbigLZG6I,1757
|
|
33
|
+
ophyd_async/epics/adandor/_andor_io.py,sha256=L1HmugU6sHK3F_pT0LaN3U1hKlDkzmSwdqr6-LHieTg,1036
|
|
34
|
+
ophyd_async/epics/adaravis/__init__.py,sha256=ZQaJVQiwcQn9hUZADrYgBE1sDfFEwjhVBJRPth1_LBo,395
|
|
35
|
+
ophyd_async/epics/adaravis/_aravis.py,sha256=Ju2wuebz9_ovl-Kza39s5VQ1pV-Omt_BaIWKqP4kcGA,1315
|
|
36
|
+
ophyd_async/epics/adaravis/_aravis_controller.py,sha256=SP3Zpgv8xpOYKJECIrLisQkQMfvfbswHeW5W_mHHhWU,1906
|
|
37
|
+
ophyd_async/epics/adaravis/_aravis_io.py,sha256=af5RxeXF2ligvAXwMNMKHA4QHTR_WmNFz-f18qD2dbg,855
|
|
38
|
+
ophyd_async/epics/adcore/__init__.py,sha256=GipuBZwaAju4g15WjvGs78S4zjGVxmbPel4E29zHFvE,1583
|
|
39
|
+
ophyd_async/epics/adcore/_core_detector.py,sha256=a7S9RViLXd9XnKFWFOhcMrSbubqZoxdQt09BZr8apUQ,2617
|
|
40
|
+
ophyd_async/epics/adcore/_core_io.py,sha256=-MEsDO736idCrAxvT4BnX-NBWLvZGHTNO22c5H09_J8,7406
|
|
41
|
+
ophyd_async/epics/adcore/_core_logic.py,sha256=OPY-yF2lTHDC_KM5AarAfJnvhmmEA63FxKaIRaCCQ_4,8062
|
|
42
|
+
ophyd_async/epics/adcore/_core_writer.py,sha256=D3qOcW8n3FMSLNACpBdCbQG0hmXE3nweTqZNuxoTYME,8207
|
|
43
|
+
ophyd_async/epics/adcore/_hdf_writer.py,sha256=PTciHPAAqsQULncPBXUJ2tS_I232Ko6Hc6IdLHFfKmU,5519
|
|
44
|
+
ophyd_async/epics/adcore/_jpeg_writer.py,sha256=DFv3YdqKjNq0QCb-bLBlxTaGzmHSvdU_rLB29beI46w,748
|
|
45
|
+
ophyd_async/epics/adcore/_single_trigger.py,sha256=tFGLT1b_rZzAvbqWP-hyCccxJMRY26T5IER-VAqKXmc,1275
|
|
46
|
+
ophyd_async/epics/adcore/_tiff_writer.py,sha256=5WXdW0thL9nv2jSMSqF-bMGQjztQZEnx3enY-nGsLiY,749
|
|
47
|
+
ophyd_async/epics/adcore/_utils.py,sha256=wGWpvm2hi-80N-RxbKOO0-GcMf-vs7B9ZDBxpzGd4mA,3952
|
|
48
|
+
ophyd_async/epics/adkinetix/__init__.py,sha256=A9xq3lGMrmza9lfukRixC0Up_kUDVFII8JguLr2x7Bw,308
|
|
49
|
+
ophyd_async/epics/adkinetix/_kinetix.py,sha256=zZv0JZ8i1RSx7KBDn_1HGNOY0BoIP81mRK5TKq7d4eA,1302
|
|
50
|
+
ophyd_async/epics/adkinetix/_kinetix_controller.py,sha256=cL2nf9ntmXDq3BGku9aIUYdm85DdfB7PYhypGuY1PPg,1480
|
|
51
|
+
ophyd_async/epics/adkinetix/_kinetix_io.py,sha256=5u4TknhcoCSjyp16HQIEp_aOmvfNAKOBoGlMRJoVxuw,770
|
|
52
|
+
ophyd_async/epics/adpilatus/__init__.py,sha256=So7PrLHij7LWOqMbsHUhfqRzKp9iKtrojuWTDS1lID8,406
|
|
53
|
+
ophyd_async/epics/adpilatus/_pilatus.py,sha256=SqNjGpZde_9RVSghjx6h9g2SnoJP-EWU4ew3TMXPayc,1511
|
|
54
|
+
ophyd_async/epics/adpilatus/_pilatus_controller.py,sha256=gzGE3eTpsC-CFcNH_g_xQf3M08DcKO3Q0_LnAzKvpFc,2850
|
|
55
|
+
ophyd_async/epics/adpilatus/_pilatus_io.py,sha256=rzH0ciyzIOJUqDe7qdNwG1RhXyQqbJa-4h_88R1vTKc,827
|
|
56
|
+
ophyd_async/epics/adsimdetector/__init__.py,sha256=EQqxP5DUvZGLxpvSXPagTPy3ROwE-PikyRfcnZfD1KM,281
|
|
57
|
+
ophyd_async/epics/adsimdetector/_sim.py,sha256=r3SuBENGkOU-8X-i3zDyZljFxf0SmsUfryNPFvP1_os,1147
|
|
58
|
+
ophyd_async/epics/adsimdetector/_sim_controller.py,sha256=EmoorPTvRomEwfioA9UcrnhYaUBkvtLI2WY3zBLd4ec,476
|
|
59
|
+
ophyd_async/epics/adsimdetector/_sim_io.py,sha256=TOQcawMtb0ypwUlPcbwGfvp5ZI9jceB9OXm53WBF1_o,233
|
|
60
|
+
ophyd_async/epics/advimba/__init__.py,sha256=Onoe4N1DgjUZ0-00krm2-iJPXnNF8nPGs6I8pY9wB1g,429
|
|
61
|
+
ophyd_async/epics/advimba/_vimba.py,sha256=4XlEnsJMGDzHLuYaIDUmaxx0gtOAehn5BKBZMUAzoHQ,1241
|
|
62
|
+
ophyd_async/epics/advimba/_vimba_controller.py,sha256=vv133Eqgk9AI_P5Yy8ZUlry7w-ip56QZ2bPaWenspHo,1979
|
|
63
|
+
ophyd_async/epics/advimba/_vimba_io.py,sha256=cb2Nfp05fBZAcNVXpz-rqRIRS-TiZW5DPUJOmaFyAw0,1589
|
|
64
|
+
ophyd_async/epics/core/__init__.py,sha256=8NoQxEEc2Ny_L9nrD2fnGSf_2gJr1wCR1LwUeLNcIJo,588
|
|
65
|
+
ophyd_async/epics/core/_aioca.py,sha256=HcGYyYUQZmhdUgovf0M9xxL5Ly56ELJDAoRvyRCPq8U,13003
|
|
66
|
+
ophyd_async/epics/core/_epics_connector.py,sha256=S4z_wbj-aogVcjqCyUgjhcq5Y4gDC7y6wXbsSz2nODY,1918
|
|
67
|
+
ophyd_async/epics/core/_epics_device.py,sha256=wGdR24I7GSPh3HmM7jsWKZhBZgt4IyLrCn4Ut7Wx_xo,510
|
|
68
|
+
ophyd_async/epics/core/_p4p.py,sha256=EqelV3Uc7UO7KJ0Bnj5JoISnGVcrm3Hj3v8aTeVbFCo,16398
|
|
69
|
+
ophyd_async/epics/core/_pvi_connector.py,sha256=GSIcul0g6zMEFo_7f6YJCGhekZOm0bJfay_uASw1Hng,5521
|
|
70
|
+
ophyd_async/epics/core/_signal.py,sha256=2Cp5f5Xb2junnVigypjb3hWu4MuMmbrcHOBgPl5Mhv4,5776
|
|
71
|
+
ophyd_async/epics/core/_util.py,sha256=DcfX4VUTeqLrMhVlt1Q7cvBTuYzHePAA-jdR-OWcxMM,2056
|
|
72
|
+
ophyd_async/epics/demo/__init__.py,sha256=WR2M3D8dbHcisJW2OIU2ManZu5SWez8ytZEp4jSBfDY,416
|
|
73
|
+
ophyd_async/epics/demo/__main__.py,sha256=o6M0FSWduPHe2lN9yNEdsXb48NckSd54-XJGoLe20Pc,1116
|
|
74
|
+
ophyd_async/epics/demo/_ioc.py,sha256=UtwTReKTR-1_tPIhdGBr7OxP_Vqi6xWyCcFABd9BYPY,1040
|
|
75
|
+
ophyd_async/epics/demo/_motor.py,sha256=7A-htbAISgB8ZBipouSoSGmpe1wN00VH7H4To16sE4E,3218
|
|
76
|
+
ophyd_async/epics/demo/_point_detector.py,sha256=5m00mBh5knkChnuZD3JNDPaHIGLN0g0toksYm_hpFKo,1398
|
|
77
|
+
ophyd_async/epics/demo/_point_detector_channel.py,sha256=UkidtyaHR_u00lxLb64F7xYhqJowFQQe6kUXKMPHDqE,721
|
|
78
|
+
ophyd_async/epics/demo/_stage.py,sha256=KPnwr5EX8f_0xxkNWT-70a0AqB0D9DoiTbxMmy0iOTo,485
|
|
79
|
+
ophyd_async/epics/demo/motor.db,sha256=3xb6WTXo4crrvk-M8Y16G9pUidp27vD5vIKKBpLTUlk,1017
|
|
80
|
+
ophyd_async/epics/demo/point_detector.db,sha256=8kBa3XKpmfXCxetT4tq5_RFXa_XqS1Z2ZNzsa2AtLds,1366
|
|
81
|
+
ophyd_async/epics/demo/point_detector_channel.db,sha256=FZ9H6HjqplhcF2jgimv_dT1nn-CBlfjs7Y--iCfHp5Y,632
|
|
82
|
+
ophyd_async/epics/eiger/__init__.py,sha256=b3Tt4pVLk23Giyj50R4e94d2MxWDDmNHWhWwNq2jlaw,221
|
|
83
|
+
ophyd_async/epics/eiger/_eiger.py,sha256=YBEGPHFqAwrA6tvNqn9HlPkN0d7GoXlDcT6vjFhhT5Y,1123
|
|
84
|
+
ophyd_async/epics/eiger/_eiger_controller.py,sha256=p_SdYPfSSQvQ3QXZIr7TLOSpPjC-Ce0C7azVOLfZnwY,2544
|
|
85
|
+
ophyd_async/epics/eiger/_eiger_io.py,sha256=AorI8ybAMYQqJZG8QoE3wioPode7fwzRWptNzD5Ynfo,1873
|
|
86
|
+
ophyd_async/epics/eiger/_odin_io.py,sha256=_KdvMEk-c2jrWYflx2a0k5RLDGal-6SVtlGqG10iQA8,4123
|
|
87
|
+
ophyd_async/epics/testing/__init__.py,sha256=aTIv4D2DYrpnGco5RQF8QuLG1SfFkIlTyM2uYEKXltA,522
|
|
88
|
+
ophyd_async/epics/testing/_example_ioc.py,sha256=lGPubU3aXP-8N-Y-6xW1ksRqoawKExFFe1l8zMZqmjk,3864
|
|
89
|
+
ophyd_async/epics/testing/_utils.py,sha256=6sqJ0BCwubSkK-WOJbmpKNqZKG0AmCoevzaMGaRmuJs,1702
|
|
90
|
+
ophyd_async/epics/testing/test_records.db,sha256=hUD9jIzFmN6DgRDGv4-PkeJxCjRjfjvDq5GoTXMz4Zo,3492
|
|
91
|
+
ophyd_async/epics/testing/test_records_pva.db,sha256=HJAJSvLtPWG5B5dKv8OZ0_hPJxRFrDoYp6ROcF2lqyA,4202
|
|
92
|
+
ophyd_async/fastcs/__init__.py,sha256=qlIM9-pjJ8yWfnzTM9-T9cw7zQLKjeeNROQTni5Dr6M,80
|
|
93
|
+
ophyd_async/fastcs/core.py,sha256=pL_srtTrfuoBHUjDFpxES92owFq9M4Jve0Skk1oeuFA,517
|
|
94
|
+
ophyd_async/fastcs/odin/__init__.py,sha256=da1PTClDMl-IBkrSvq6JC1lnS-K_BASzCvxVhNxN5Ls,13
|
|
95
|
+
ophyd_async/fastcs/panda/__init__.py,sha256=ugrScVm4HPQFc-d1kTAfZ5UUzW9T3SPgTi0OD2s8ZH0,1003
|
|
96
|
+
ophyd_async/fastcs/panda/_block.py,sha256=YzAxdMsE-kzyz5v47TZHRvCbdbYrSvSrfega53MyX9U,2342
|
|
97
|
+
ophyd_async/fastcs/panda/_control.py,sha256=xtW3dH_MLQoycgP-4vJtYx1M9alHjWo13iu9UFTgwzY,1306
|
|
98
|
+
ophyd_async/fastcs/panda/_hdf_panda.py,sha256=eDxEO5L3tlmPsH06fe2AluXjbGclTpPTj0CnMcVQceU,1277
|
|
99
|
+
ophyd_async/fastcs/panda/_table.py,sha256=maKGoKypEuYqTSVWGgDO6GMEKOtlDm9Dn5YiYdBzu6c,2486
|
|
100
|
+
ophyd_async/fastcs/panda/_trigger.py,sha256=dy4kYdVIU4T90a2bhD7cdnfGrqMxZ_n0AZxkFI5txfA,3388
|
|
101
|
+
ophyd_async/fastcs/panda/_writer.py,sha256=Xh3fNA7wr2tFuqCtnMfAbJT00rziiNypHWDnStGolXg,6143
|
|
102
|
+
ophyd_async/plan_stubs/__init__.py,sha256=2ngpkB4wwqlx1dn9JPSHjQdbyWLmY6n-3XVh3RDE8-g,939
|
|
103
|
+
ophyd_async/plan_stubs/_ensure_connected.py,sha256=YR6VRj7koccJ4x35NV-Ugl4ZbxgAoGN9PjVIjhv0gpw,894
|
|
104
|
+
ophyd_async/plan_stubs/_fly.py,sha256=QdodnmBJ0zrUGxcNY7EzLsiPSD8O3Rq9lE9VrWUX5ik,6233
|
|
105
|
+
ophyd_async/plan_stubs/_nd_attributes.py,sha256=kwzyUSeidUH714gaZQtJLxCgDZtmIRyyoKBBRbvqg38,2350
|
|
106
|
+
ophyd_async/plan_stubs/_panda.py,sha256=5_Mf9kGzNjXpf_YscpCUE8tgq284nOHWCG7o_LNFfII,463
|
|
107
|
+
ophyd_async/plan_stubs/_settings.py,sha256=e3dGVSUV-Htay_9fKXyQTAQLdjunetGI3OBYp_oC_FY,5574
|
|
108
|
+
ophyd_async/plan_stubs/_utils.py,sha256=zClRo5ve8RGia7wQnby41W-Zprj-slOA5da1LfYnuhw,45
|
|
109
|
+
ophyd_async/plan_stubs/_wait_for_awaitable.py,sha256=PGct_dGezKrLhm0W_GD83dwevSccG_vsmj0WSlMNVWc,364
|
|
110
|
+
ophyd_async/sim/__init__.py,sha256=PzmOQS7suApaZros4h9ec5K6ehFWEjf3qYMvwFGeKsc,749
|
|
111
|
+
ophyd_async/sim/__main__.py,sha256=mx6natJxnvUBTQXbS4R5OGH_MZVgYiXQkoh3JBJ8NxU,1693
|
|
112
|
+
ophyd_async/sim/_blob_detector.py,sha256=4zWsVdn21TM2bHLA-uZRK98t5c2II68fr3Al37apCmc,1082
|
|
113
|
+
ophyd_async/sim/_blob_detector_controller.py,sha256=DBPX3Ig0tS1kzu7uOkFzSdmRjsRP-epA7iMZsggaxhw,1787
|
|
114
|
+
ophyd_async/sim/_blob_detector_writer.py,sha256=ao6RJ9DM_64HoMOp-vR-BaweKwQstLs3E4_MpRzXXZ4,3623
|
|
115
|
+
ophyd_async/sim/_mirror_horizontal.py,sha256=_AfsHxp5V3rYbK-goI0iwPuDDvx1BrNoUQ4smXzqFbc,1452
|
|
116
|
+
ophyd_async/sim/_mirror_vertical.py,sha256=PyWpyCrW_FCzzGN7Dk0tTB-SKbDIV4GD1fl8AXUJbEI,2029
|
|
117
|
+
ophyd_async/sim/_motor.py,sha256=-YMANsq4ZvI7nZolrYaTYe44kMoIcvPKCpBbCeC7pxw,10167
|
|
118
|
+
ophyd_async/sim/_pattern_generator.py,sha256=QU6Hk3TK0TslrDcITTzcB_UDLVIYQ_a8x4nBGJGx_ig,3652
|
|
119
|
+
ophyd_async/sim/_point_detector.py,sha256=nXgL_1aJZciNBw8Zr2wMYaMbzzAEKXV3yV8FQz2nS_4,2940
|
|
120
|
+
ophyd_async/sim/_stage.py,sha256=qaeyZbUVL1v2pTHJiZxq-y6BKpA1l_DAKyzAQppQx70,772
|
|
121
|
+
ophyd_async/tango/__init__.py,sha256=g9xzjlzPpUAP12YI-kYwfAoLSYPAQdL1S11R2c-cius,60
|
|
122
|
+
ophyd_async/tango/core/__init__.py,sha256=IMvQ7MWcTof99h_pr483KWKvQV2-h7zo_iRpLA2PUYQ,1108
|
|
123
|
+
ophyd_async/tango/core/_base_device.py,sha256=mXQnhCzFAdSrynelubhz7iLx_akINJ6s1M08mikFFME,5032
|
|
124
|
+
ophyd_async/tango/core/_converters.py,sha256=auBUdvbsEU8XXNDzX-fiBap0SvvID3ZOAUEP_wjHgBU,2201
|
|
125
|
+
ophyd_async/tango/core/_signal.py,sha256=XZ38hPnThZ-__RDgwH8UfUk78NLcrZ8zVCH8sklr_3U,5798
|
|
126
|
+
ophyd_async/tango/core/_tango_readable.py,sha256=ctR6YcBGGatW6Jp2kvddA1hVZ2v1CidPsF9FmJK9BYg,406
|
|
127
|
+
ophyd_async/tango/core/_tango_transport.py,sha256=FlvadKRW9H_ggcQ3MTiAGHE4HDTKu_rAk5WODMxwk_E,31903
|
|
128
|
+
ophyd_async/tango/core/_utils.py,sha256=FrX524jwa-0EQxpcGaKF6yqyHm5BWIFSE82FcIB0aAY,1430
|
|
129
|
+
ophyd_async/tango/demo/__init__.py,sha256=_j-UicTnckuIBp8PnieFMOMnLFGivnaKdmo9o0hYtzc,256
|
|
130
|
+
ophyd_async/tango/demo/_counter.py,sha256=2J4SCHnBWLF0O5mFWlJdO4tmnElvlx5sRrk4op_AC9U,1139
|
|
131
|
+
ophyd_async/tango/demo/_detector.py,sha256=X5YWHAjukKZ7iYF1fBNle4CBDj1X5rvj0lnPMOcnRCU,1340
|
|
132
|
+
ophyd_async/tango/demo/_mover.py,sha256=c-IxrWQN0YX-Iuf720xlKfsPbNfh7bUz_AVnbwYkW08,2984
|
|
133
|
+
ophyd_async/tango/demo/_tango/__init__.py,sha256=FfONT7vM49nNo3a1Lv-LcMZO9EHv6bv91yY-RnxIib4,85
|
|
134
|
+
ophyd_async/tango/demo/_tango/_servers.py,sha256=nyuKgufKKqtngDeaufbUcHO6byV5MEElf9442ivtUk0,2992
|
|
135
|
+
ophyd_async/tango/testing/__init__.py,sha256=SYXPAS00ny3jlUMOJKpaewO4ljPjK1_z1smj7IfsBQg,148
|
|
136
|
+
ophyd_async/tango/testing/_one_of_everything.py,sha256=rPAgOoNGvaHMVhB79Gz70NI9tWk3QV5iKg5wAlAtqxU,6571
|
|
137
|
+
ophyd_async/testing/__init__.py,sha256=f53HUj2hpIfrza9OlcOpHmq5wnziQNwixawAK4F1xgc,1698
|
|
138
|
+
ophyd_async/testing/__pytest_assert_rewrite.py,sha256=_SU2UfChPgEf7CFY7aYH2B7MLp-07_qYnVLyu6QtDL8,129
|
|
139
|
+
ophyd_async/testing/_assert.py,sha256=sBa2KnNzP01dWDHPKbujIiQk1bw1nTjUyRJKnVPH8Q0,7439
|
|
140
|
+
ophyd_async/testing/_mock_signal_utils.py,sha256=d-n_923ii59-ae9TbqVuIK9MAJpDmu0k47fzgJLj8t8,5195
|
|
141
|
+
ophyd_async/testing/_one_of_everything.py,sha256=Di0hPoKwrDOSsx50-2UdSHM2EbIKrPG9s0Vp11nE9V8,4773
|
|
142
|
+
ophyd_async/testing/_single_derived.py,sha256=icuTFUSaNf_9dZQ37Nt4VHUUERlFdqObhq8S4URdBCo,2694
|
|
143
|
+
ophyd_async/testing/_utils.py,sha256=zClRo5ve8RGia7wQnby41W-Zprj-slOA5da1LfYnuhw,45
|
|
144
|
+
ophyd_async/testing/_wait_for_pending.py,sha256=YZAR48n-CW0GsPey3zFRzMJ4byDAr3HvMIoawjmTrHw,732
|
|
145
|
+
ophyd_async-0.10.0a1.dist-info/licenses/LICENSE,sha256=pU5shZcsvWgz701EbT7yjFZ8rMvZcWgRH54CRt8ld_c,1517
|
|
146
|
+
ophyd_async-0.10.0a1.dist-info/METADATA,sha256=8nZ_nv3FefQVDkrlIo6ilDFx8ijbY9tAD6PDvoLAtjE,7075
|
|
147
|
+
ophyd_async-0.10.0a1.dist-info/WHEEL,sha256=DK49LOLCYiurdXXOXwGJm6U4DkHkg4lcxjhqwRa0CP4,91
|
|
148
|
+
ophyd_async-0.10.0a1.dist-info/top_level.txt,sha256=-hjorMsv5Rmjo3qrgqhjpal1N6kW5vMxZO3lD4iEaXs,12
|
|
149
|
+
ophyd_async-0.10.0a1.dist-info/RECORD,,
|
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
from collections.abc import Callable, Generator, Sequence
|
|
2
|
-
from enum import Enum
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
from typing import Any
|
|
5
|
-
|
|
6
|
-
import numpy as np
|
|
7
|
-
import numpy.typing as npt
|
|
8
|
-
import yaml
|
|
9
|
-
from bluesky.plan_stubs import abs_set, wait
|
|
10
|
-
from bluesky.protocols import Location
|
|
11
|
-
from bluesky.utils import Msg
|
|
12
|
-
from pydantic import BaseModel
|
|
13
|
-
|
|
14
|
-
from ._device import Device
|
|
15
|
-
from ._signal import SignalRW
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
def ndarray_representer(dumper: yaml.Dumper, array: npt.NDArray[Any]) -> yaml.Node:
|
|
19
|
-
return dumper.represent_sequence(
|
|
20
|
-
"tag:yaml.org,2002:seq", array.tolist(), flow_style=True
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def pydantic_model_abstraction_representer(
|
|
25
|
-
dumper: yaml.Dumper, model: BaseModel
|
|
26
|
-
) -> yaml.Node:
|
|
27
|
-
return dumper.represent_data(model.model_dump(mode="python"))
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
def enum_representer(dumper: yaml.Dumper, enum: Enum) -> yaml.Node:
|
|
31
|
-
return dumper.represent_data(enum.value)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def get_signal_values(
|
|
35
|
-
signals: dict[str, SignalRW[Any]], ignore: list[str] | None = None
|
|
36
|
-
) -> Generator[Msg, Sequence[Location[Any]], dict[str, Any]]:
|
|
37
|
-
"""Get signal values in bulk.
|
|
38
|
-
|
|
39
|
-
Used as part of saving the signals of a device to a yaml file.
|
|
40
|
-
|
|
41
|
-
Parameters
|
|
42
|
-
----------
|
|
43
|
-
signals : Dict[str, SignalRW]
|
|
44
|
-
Dictionary with pv names and matching SignalRW values. Often the direct result
|
|
45
|
-
of :func:`walk_rw_signals`.
|
|
46
|
-
|
|
47
|
-
ignore : Optional[List[str]]
|
|
48
|
-
Optional list of PVs that should be ignored.
|
|
49
|
-
|
|
50
|
-
Returns
|
|
51
|
-
-------
|
|
52
|
-
Dict[str, Any]
|
|
53
|
-
A dictionary containing pv names and their associated values. Ignored pvs are
|
|
54
|
-
set to None.
|
|
55
|
-
|
|
56
|
-
See Also
|
|
57
|
-
--------
|
|
58
|
-
:func:`ophyd_async.core.walk_rw_signals`
|
|
59
|
-
:func:`ophyd_async.core.save_to_yaml`
|
|
60
|
-
"""
|
|
61
|
-
|
|
62
|
-
ignore = ignore or []
|
|
63
|
-
selected_signals = {
|
|
64
|
-
key: signal for key, signal in signals.items() if key not in ignore
|
|
65
|
-
}
|
|
66
|
-
selected_values = yield Msg("locate", *selected_signals.values())
|
|
67
|
-
|
|
68
|
-
assert selected_values is not None, "No signalRW's were able to be located"
|
|
69
|
-
named_values = {
|
|
70
|
-
key: value["setpoint"]
|
|
71
|
-
for key, value in zip(selected_signals, selected_values, strict=False)
|
|
72
|
-
}
|
|
73
|
-
# Ignored values place in with value None so we know which ones were ignored
|
|
74
|
-
named_values.update(dict.fromkeys(ignore))
|
|
75
|
-
return named_values
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
def walk_rw_signals(
|
|
79
|
-
device: Device, path_prefix: str | None = ""
|
|
80
|
-
) -> dict[str, SignalRW[Any]]:
|
|
81
|
-
"""Retrieve all SignalRWs from a device.
|
|
82
|
-
|
|
83
|
-
Stores retrieved signals with their dotted attribute paths in a dictionary. Used as
|
|
84
|
-
part of saving and loading a device.
|
|
85
|
-
|
|
86
|
-
Parameters
|
|
87
|
-
----------
|
|
88
|
-
device : Device
|
|
89
|
-
Ophyd device to retrieve read-write signals from.
|
|
90
|
-
|
|
91
|
-
path_prefix : str
|
|
92
|
-
For internal use, leave blank when calling the method.
|
|
93
|
-
|
|
94
|
-
Returns
|
|
95
|
-
-------
|
|
96
|
-
SignalRWs : dict
|
|
97
|
-
A dictionary matching the string attribute path of a SignalRW with the
|
|
98
|
-
signal itself.
|
|
99
|
-
|
|
100
|
-
See Also
|
|
101
|
-
--------
|
|
102
|
-
:func:`ophyd_async.core.get_signal_values`
|
|
103
|
-
:func:`ophyd_async.core.save_to_yaml`
|
|
104
|
-
|
|
105
|
-
"""
|
|
106
|
-
|
|
107
|
-
if not path_prefix:
|
|
108
|
-
path_prefix = ""
|
|
109
|
-
|
|
110
|
-
signals: dict[str, SignalRW[Any]] = {}
|
|
111
|
-
|
|
112
|
-
for attr_name, attr in device.children():
|
|
113
|
-
dot_path = f"{path_prefix}{attr_name}"
|
|
114
|
-
if type(attr) is SignalRW:
|
|
115
|
-
signals[dot_path] = attr
|
|
116
|
-
attr_signals = walk_rw_signals(attr, path_prefix=dot_path + ".")
|
|
117
|
-
signals.update(attr_signals)
|
|
118
|
-
return signals
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
def save_to_yaml(phases: Sequence[dict[str, Any]], save_path: str | Path) -> None:
|
|
122
|
-
"""Plan which serialises a phase or set of phases of SignalRWs to a yaml file.
|
|
123
|
-
|
|
124
|
-
Parameters
|
|
125
|
-
----------
|
|
126
|
-
phases : dict or list of dicts
|
|
127
|
-
The values to save. Each item in the list is a seperate phase used when loading
|
|
128
|
-
a device. In general this variable be the return value of `get_signal_values`.
|
|
129
|
-
|
|
130
|
-
save_path : str
|
|
131
|
-
Path of the yaml file to write to
|
|
132
|
-
|
|
133
|
-
See Also
|
|
134
|
-
--------
|
|
135
|
-
:func:`ophyd_async.core.walk_rw_signals`
|
|
136
|
-
:func:`ophyd_async.core.get_signal_values`
|
|
137
|
-
:func:`ophyd_async.core.load_from_yaml`
|
|
138
|
-
"""
|
|
139
|
-
|
|
140
|
-
yaml.add_representer(np.ndarray, ndarray_representer, Dumper=yaml.Dumper)
|
|
141
|
-
yaml.add_multi_representer(
|
|
142
|
-
BaseModel,
|
|
143
|
-
pydantic_model_abstraction_representer,
|
|
144
|
-
Dumper=yaml.Dumper,
|
|
145
|
-
)
|
|
146
|
-
yaml.add_multi_representer(Enum, enum_representer, Dumper=yaml.Dumper)
|
|
147
|
-
|
|
148
|
-
with open(save_path, "w") as file:
|
|
149
|
-
yaml.dump(phases, file)
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
def load_from_yaml(save_path: str) -> Sequence[dict[str, Any]]:
|
|
153
|
-
"""Plan that returns a list of dicts with saved signal values from a yaml file.
|
|
154
|
-
|
|
155
|
-
Parameters
|
|
156
|
-
----------
|
|
157
|
-
save_path : str
|
|
158
|
-
Path of the yaml file to load from
|
|
159
|
-
|
|
160
|
-
See Also
|
|
161
|
-
--------
|
|
162
|
-
:func:`ophyd_async.core.save_to_yaml`
|
|
163
|
-
:func:`ophyd_async.core.set_signal_values`
|
|
164
|
-
"""
|
|
165
|
-
with open(save_path) as file:
|
|
166
|
-
return yaml.full_load(file)
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
def set_signal_values(
|
|
170
|
-
signals: dict[str, SignalRW[Any]], values: Sequence[dict[str, Any]]
|
|
171
|
-
) -> Generator[Msg, None, None]:
|
|
172
|
-
"""Maps signals from a yaml file into device signals.
|
|
173
|
-
|
|
174
|
-
``values`` contains signal values in phases, which are loaded in sequentially
|
|
175
|
-
into the provided signals, to ensure signals are set in the correct order.
|
|
176
|
-
|
|
177
|
-
Parameters
|
|
178
|
-
----------
|
|
179
|
-
signals : Dict[str, SignalRW[Any]]
|
|
180
|
-
Dictionary of named signals to be updated if value found in values argument.
|
|
181
|
-
Can be the output of :func:`walk_rw_signals()` for a device.
|
|
182
|
-
|
|
183
|
-
values : Sequence[Dict[str, Any]]
|
|
184
|
-
List of dictionaries of signal name and value pairs, if a signal matches
|
|
185
|
-
the name of one in the signals argument, sets the signal to that value.
|
|
186
|
-
The groups of signals are loaded in their list order.
|
|
187
|
-
Can be the output of :func:`load_from_yaml()` for a yaml file.
|
|
188
|
-
|
|
189
|
-
See Also
|
|
190
|
-
--------
|
|
191
|
-
:func:`ophyd_async.core.load_from_yaml`
|
|
192
|
-
:func:`ophyd_async.core.walk_rw_signals`
|
|
193
|
-
"""
|
|
194
|
-
# For each phase, set all the signals,
|
|
195
|
-
# load them to the correct value and wait for the load to complete
|
|
196
|
-
for phase_number, phase in enumerate(values):
|
|
197
|
-
# Key is signal name
|
|
198
|
-
for key, value in phase.items():
|
|
199
|
-
# Skip ignored values
|
|
200
|
-
if value is None:
|
|
201
|
-
continue
|
|
202
|
-
|
|
203
|
-
if key in signals:
|
|
204
|
-
yield from abs_set(
|
|
205
|
-
signals[key], value, group=f"load-phase{phase_number}"
|
|
206
|
-
)
|
|
207
|
-
|
|
208
|
-
yield from wait(f"load-phase{phase_number}")
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
def load_device(device: Device, path: str):
|
|
212
|
-
"""Plan which loads PVs from a yaml file into a device.
|
|
213
|
-
|
|
214
|
-
Parameters
|
|
215
|
-
----------
|
|
216
|
-
device: Device
|
|
217
|
-
The device to load PVs into
|
|
218
|
-
path: str
|
|
219
|
-
Path of the yaml file to load
|
|
220
|
-
|
|
221
|
-
See Also
|
|
222
|
-
--------
|
|
223
|
-
:func:`ophyd_async.core.save_device`
|
|
224
|
-
"""
|
|
225
|
-
values = load_from_yaml(path)
|
|
226
|
-
signals_to_set = walk_rw_signals(device)
|
|
227
|
-
yield from set_signal_values(signals_to_set, values)
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
def all_at_once(values: dict[str, Any]) -> Sequence[dict[str, Any]]:
|
|
231
|
-
"""Sort all the values into a single phase so they are set all at once"""
|
|
232
|
-
return [values]
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
def save_device(
|
|
236
|
-
device: Device,
|
|
237
|
-
path: str,
|
|
238
|
-
sorter: Callable[[dict[str, Any]], Sequence[dict[str, Any]]] = all_at_once,
|
|
239
|
-
ignore: list[str] | None = None,
|
|
240
|
-
):
|
|
241
|
-
"""Plan that saves the state of all PV's on a device using a sorter.
|
|
242
|
-
|
|
243
|
-
The default sorter assumes all saved PVs can be loaded at once, and therefore
|
|
244
|
-
can be saved at one time, i.e. all PVs will appear on one list in the
|
|
245
|
-
resulting yaml file.
|
|
246
|
-
|
|
247
|
-
This can be a problem, because when the yaml is ingested with
|
|
248
|
-
:func:`ophyd_async.core.load_device`, it will set all of those PVs at once.
|
|
249
|
-
However, some PV's need to be set before others - this is device specific.
|
|
250
|
-
|
|
251
|
-
Therefore, users should consider the order of device loading and write their
|
|
252
|
-
own sorter algorithms accordingly.
|
|
253
|
-
|
|
254
|
-
See :func:`ophyd_async.fastcs.panda.phase_sorter` for a valid implementation of the
|
|
255
|
-
sorter.
|
|
256
|
-
|
|
257
|
-
Parameters
|
|
258
|
-
----------
|
|
259
|
-
device : Device
|
|
260
|
-
The device whose PVs should be saved.
|
|
261
|
-
|
|
262
|
-
path : str
|
|
263
|
-
The path where the resulting yaml should be saved to
|
|
264
|
-
|
|
265
|
-
sorter : Callable[[Dict[str, Any]], Sequence[Dict[str, Any]]]
|
|
266
|
-
|
|
267
|
-
ignore : Optional[List[str]]
|
|
268
|
-
|
|
269
|
-
See Also
|
|
270
|
-
--------
|
|
271
|
-
:func:`ophyd_async.core.load_device`
|
|
272
|
-
"""
|
|
273
|
-
values = yield from get_signal_values(walk_rw_signals(device), ignore=ignore)
|
|
274
|
-
save_to_yaml(sorter(values), path)
|
ophyd_async/epics/demo/_mover.py
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import asyncio
|
|
2
|
-
|
|
3
|
-
import numpy as np
|
|
4
|
-
from bluesky.protocols import Movable, Stoppable
|
|
5
|
-
|
|
6
|
-
from ophyd_async.core import (
|
|
7
|
-
CALCULATE_TIMEOUT,
|
|
8
|
-
DEFAULT_TIMEOUT,
|
|
9
|
-
AsyncStatus,
|
|
10
|
-
CalculatableTimeout,
|
|
11
|
-
Device,
|
|
12
|
-
StandardReadable,
|
|
13
|
-
WatchableAsyncStatus,
|
|
14
|
-
WatcherUpdate,
|
|
15
|
-
observe_value,
|
|
16
|
-
)
|
|
17
|
-
from ophyd_async.core import StandardReadableFormat as Format
|
|
18
|
-
from ophyd_async.epics.core import epics_signal_r, epics_signal_rw, epics_signal_x
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class Mover(StandardReadable, Movable, Stoppable):
|
|
22
|
-
"""A demo movable that moves based on velocity"""
|
|
23
|
-
|
|
24
|
-
def __init__(self, prefix: str, name="") -> None:
|
|
25
|
-
# Define some signals
|
|
26
|
-
with self.add_children_as_readables(Format.HINTED_SIGNAL):
|
|
27
|
-
self.readback = epics_signal_r(float, prefix + "Readback")
|
|
28
|
-
with self.add_children_as_readables(Format.CONFIG_SIGNAL):
|
|
29
|
-
self.velocity = epics_signal_rw(float, prefix + "Velocity")
|
|
30
|
-
self.units = epics_signal_r(str, prefix + "Readback.EGU")
|
|
31
|
-
self.setpoint = epics_signal_rw(float, prefix + "Setpoint")
|
|
32
|
-
self.precision = epics_signal_r(int, prefix + "Readback.PREC")
|
|
33
|
-
# Signals that collide with standard methods should have a trailing underscore
|
|
34
|
-
self.stop_ = epics_signal_x(prefix + "Stop.PROC")
|
|
35
|
-
# Whether set() should complete successfully or not
|
|
36
|
-
self._set_success = True
|
|
37
|
-
|
|
38
|
-
super().__init__(name=name)
|
|
39
|
-
|
|
40
|
-
def set_name(self, name: str, *, child_name_separator: str | None = None) -> None:
|
|
41
|
-
super().set_name(name, child_name_separator=child_name_separator)
|
|
42
|
-
# Readback should be named the same as its parent in read()
|
|
43
|
-
self.readback.set_name(name)
|
|
44
|
-
|
|
45
|
-
@WatchableAsyncStatus.wrap
|
|
46
|
-
async def set(self, value: float, timeout: CalculatableTimeout = CALCULATE_TIMEOUT):
|
|
47
|
-
new_position = value
|
|
48
|
-
self._set_success = True
|
|
49
|
-
old_position, units, precision, velocity = await asyncio.gather(
|
|
50
|
-
self.setpoint.get_value(),
|
|
51
|
-
self.units.get_value(),
|
|
52
|
-
self.precision.get_value(),
|
|
53
|
-
self.velocity.get_value(),
|
|
54
|
-
)
|
|
55
|
-
if timeout == CALCULATE_TIMEOUT:
|
|
56
|
-
assert velocity > 0, "Mover has zero velocity"
|
|
57
|
-
timeout = abs(new_position - old_position) / velocity + DEFAULT_TIMEOUT
|
|
58
|
-
# Make an Event that will be set on completion, and a Status that will
|
|
59
|
-
# error if not done in time
|
|
60
|
-
done = asyncio.Event()
|
|
61
|
-
done_status = AsyncStatus(asyncio.wait_for(done.wait(), timeout))
|
|
62
|
-
# Wait for the value to set, but don't wait for put completion callback
|
|
63
|
-
await self.setpoint.set(new_position, wait=False)
|
|
64
|
-
async for current_position in observe_value(
|
|
65
|
-
self.readback, done_status=done_status
|
|
66
|
-
):
|
|
67
|
-
yield WatcherUpdate(
|
|
68
|
-
current=current_position,
|
|
69
|
-
initial=old_position,
|
|
70
|
-
target=new_position,
|
|
71
|
-
name=self.name,
|
|
72
|
-
unit=units,
|
|
73
|
-
precision=precision,
|
|
74
|
-
)
|
|
75
|
-
if np.isclose(current_position, new_position):
|
|
76
|
-
done.set()
|
|
77
|
-
break
|
|
78
|
-
if not self._set_success:
|
|
79
|
-
raise RuntimeError("Motor was stopped")
|
|
80
|
-
|
|
81
|
-
async def stop(self, success=True):
|
|
82
|
-
self._set_success = success
|
|
83
|
-
status = self.stop_.trigger()
|
|
84
|
-
await status
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
class SampleStage(Device):
|
|
88
|
-
"""A demo sample stage with X and Y movables"""
|
|
89
|
-
|
|
90
|
-
def __init__(self, prefix: str, name="") -> None:
|
|
91
|
-
# Define some child Devices
|
|
92
|
-
self.x = Mover(prefix + "X:")
|
|
93
|
-
self.y = Mover(prefix + "Y:")
|
|
94
|
-
# Set name of device and child devices
|
|
95
|
-
super().__init__(name=name)
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
from typing import Annotated as A
|
|
2
|
-
|
|
3
|
-
from ophyd_async.core import (
|
|
4
|
-
DeviceVector,
|
|
5
|
-
SignalR,
|
|
6
|
-
SignalRW,
|
|
7
|
-
StandardReadable,
|
|
8
|
-
StrictEnum,
|
|
9
|
-
)
|
|
10
|
-
from ophyd_async.core import StandardReadableFormat as Format
|
|
11
|
-
from ophyd_async.epics.core import EpicsDevice, PvSuffix
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class EnergyMode(StrictEnum):
|
|
15
|
-
"""Energy mode for `Sensor`"""
|
|
16
|
-
|
|
17
|
-
#: Low energy mode
|
|
18
|
-
LOW = "Low Energy"
|
|
19
|
-
#: High energy mode
|
|
20
|
-
HIGH = "High Energy"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class Sensor(StandardReadable, EpicsDevice):
|
|
24
|
-
"""A demo sensor that produces a scalar value based on X and Y Movers"""
|
|
25
|
-
|
|
26
|
-
value: A[SignalR[float], PvSuffix("Value"), Format.HINTED_SIGNAL]
|
|
27
|
-
mode: A[SignalRW[EnergyMode], PvSuffix("Mode"), Format.CONFIG_SIGNAL]
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class SensorGroup(StandardReadable):
|
|
31
|
-
def __init__(self, prefix: str, name: str = "", sensor_count: int = 3) -> None:
|
|
32
|
-
with self.add_children_as_readables():
|
|
33
|
-
self.sensors = DeviceVector(
|
|
34
|
-
{i: Sensor(f"{prefix}{i}:") for i in range(1, sensor_count + 1)}
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
super().__init__(name)
|
ophyd_async/epics/demo/sensor.db
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
record(mbbo, "$(P)Mode") {
|
|
2
|
-
field(DESC, "Energy sensitivity of the image")
|
|
3
|
-
field(DTYP, "Raw Soft Channel")
|
|
4
|
-
field(PINI, "YES")
|
|
5
|
-
field(ZRVL, "10")
|
|
6
|
-
field(ZRST, "Low Energy")
|
|
7
|
-
field(ONVL, "100")
|
|
8
|
-
field(ONST, "High Energy")
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
record(calc, "$(P)Value") {
|
|
12
|
-
field(DESC, "Sensor value simulated from X and Y")
|
|
13
|
-
field(INPA, "$(P)X:Readback CP")
|
|
14
|
-
field(INPB, "$(P)Y:Readback CP")
|
|
15
|
-
field(INPC, "$(P)Mode.RVAL CP")
|
|
16
|
-
field(CALC, "SIN(A)**10+COS(C+B*A)*COS(A)")
|
|
17
|
-
field(EGU, "$(EGU=cts/s)")
|
|
18
|
-
field(PREC, "$(PREC=3)")
|
|
19
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
from collections.abc import Sequence
|
|
2
|
-
from typing import Any
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def phase_sorter(panda_signal_values: dict[str, Any]) -> Sequence[dict[str, Any]]:
|
|
6
|
-
# Panda has two load phases. If the signal name ends in the string "UNITS",
|
|
7
|
-
# it needs to be loaded first so put in first phase
|
|
8
|
-
phase_1, phase_2 = {}, {}
|
|
9
|
-
|
|
10
|
-
for key, value in panda_signal_values.items():
|
|
11
|
-
if key.endswith("units"):
|
|
12
|
-
phase_1[key] = value
|
|
13
|
-
else:
|
|
14
|
-
phase_2[key] = value
|
|
15
|
-
|
|
16
|
-
return [phase_1, phase_2]
|
ophyd_async/sim/demo/__init__.py
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
from ._pattern_detector import (
|
|
2
|
-
DATA_PATH,
|
|
3
|
-
SUM_PATH,
|
|
4
|
-
PatternDetector,
|
|
5
|
-
PatternDetectorController,
|
|
6
|
-
PatternDetectorWriter,
|
|
7
|
-
PatternGenerator,
|
|
8
|
-
)
|
|
9
|
-
from ._sim_motor import SimMotor
|
|
10
|
-
|
|
11
|
-
__all__ = [
|
|
12
|
-
"DATA_PATH",
|
|
13
|
-
"SUM_PATH",
|
|
14
|
-
"PatternGenerator",
|
|
15
|
-
"PatternDetector",
|
|
16
|
-
"PatternDetectorController",
|
|
17
|
-
"PatternDetectorWriter",
|
|
18
|
-
"SimMotor",
|
|
19
|
-
]
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
from ._pattern_detector import PatternDetector
|
|
2
|
-
from ._pattern_detector_controller import PatternDetectorController
|
|
3
|
-
from ._pattern_detector_writer import PatternDetectorWriter
|
|
4
|
-
from ._pattern_generator import DATA_PATH, SUM_PATH, PatternGenerator
|
|
5
|
-
|
|
6
|
-
__all__ = [
|
|
7
|
-
"PatternDetector",
|
|
8
|
-
"PatternDetectorController",
|
|
9
|
-
"PatternDetectorWriter",
|
|
10
|
-
"DATA_PATH",
|
|
11
|
-
"SUM_PATH",
|
|
12
|
-
"PatternGenerator",
|
|
13
|
-
]
|