dls-dodal 1.43.0__py3-none-any.whl → 1.44.0__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.
- {dls_dodal-1.43.0.dist-info → dls_dodal-1.44.0.dist-info}/METADATA +4 -3
- {dls_dodal-1.43.0.dist-info → dls_dodal-1.44.0.dist-info}/RECORD +42 -34
- {dls_dodal-1.43.0.dist-info → dls_dodal-1.44.0.dist-info}/WHEEL +1 -1
- dodal/_version.py +2 -2
- dodal/beamlines/b01_1.py +8 -0
- dodal/beamlines/i03.py +11 -0
- dodal/beamlines/i13_1.py +22 -48
- dodal/beamlines/i19_1.py +16 -5
- dodal/beamlines/i19_2.py +12 -3
- dodal/beamlines/i19_optics.py +4 -2
- dodal/common/data_util.py +20 -0
- dodal/common/signal_utils.py +43 -4
- dodal/devices/aperturescatterguard.py +3 -3
- dodal/devices/baton.py +17 -0
- dodal/devices/current_amplifiers/current_amplifier.py +1 -6
- dodal/devices/current_amplifiers/current_amplifier_detector.py +2 -2
- dodal/devices/current_amplifiers/femto.py +0 -5
- dodal/devices/current_amplifiers/sr570.py +0 -5
- dodal/devices/electron_analyser/__init__.py +0 -0
- dodal/devices/electron_analyser/base_region.py +64 -0
- dodal/devices/electron_analyser/specs/__init__.py +0 -0
- dodal/devices/electron_analyser/specs/specs_region.py +24 -0
- dodal/devices/electron_analyser/vgscienta/__init__.py +0 -0
- dodal/devices/electron_analyser/vgscienta/vgscienta_region.py +77 -0
- dodal/devices/fast_grid_scan.py +2 -2
- dodal/devices/i03/beamstop.py +2 -2
- dodal/devices/i13_1/merlin.py +1 -2
- dodal/devices/i13_1/merlin_controller.py +12 -8
- dodal/devices/i19/beamstop.py +30 -0
- dodal/devices/i19/hutch_access.py +2 -0
- dodal/devices/i19/shutter.py +52 -30
- dodal/devices/i22/nxsas.py +1 -3
- dodal/devices/i24/focus_mirrors.py +3 -3
- dodal/devices/i24/pilatus_metadata.py +2 -2
- dodal/devices/oav/oav_detector.py +7 -9
- dodal/devices/oav/snapshots/snapshot.py +21 -0
- dodal/devices/oav/snapshots/snapshot_image_processing.py +74 -0
- dodal/plan_stubs/motor_utils.py +10 -12
- dodal/utils.py +0 -7
- dodal/devices/i13_1/merlin_io.py +0 -17
- dodal/devices/oav/microns_for_zoom_levels.json +0 -55
- dodal/devices/oav/snapshots/snapshot_with_beam_centre.py +0 -64
- {dls_dodal-1.43.0.dist-info → dls_dodal-1.44.0.dist-info}/entry_points.txt +0 -0
- {dls_dodal-1.43.0.dist-info → dls_dodal-1.44.0.dist-info/licenses}/LICENSE +0 -0
- {dls_dodal-1.43.0.dist-info → dls_dodal-1.44.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: dls-dodal
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.44.0
|
|
4
4
|
Summary: Ophyd devices and other utils that could be used across DLS beamlines
|
|
5
5
|
Author-email: Dominic Oram <dominic.oram@diamond.ac.uk>
|
|
6
6
|
License: Apache License
|
|
@@ -216,7 +216,7 @@ Description-Content-Type: text/markdown
|
|
|
216
216
|
License-File: LICENSE
|
|
217
217
|
Requires-Dist: click
|
|
218
218
|
Requires-Dist: ophyd
|
|
219
|
-
Requires-Dist: ophyd-async>=0.
|
|
219
|
+
Requires-Dist: ophyd-async>=0.10.0a1
|
|
220
220
|
Requires-Dist: bluesky
|
|
221
221
|
Requires-Dist: pyepics
|
|
222
222
|
Requires-Dist: dataclasses-json
|
|
@@ -264,6 +264,7 @@ Requires-Dist: types-requests; extra == "dev"
|
|
|
264
264
|
Requires-Dist: types-mock; extra == "dev"
|
|
265
265
|
Requires-Dist: types-PyYAML; extra == "dev"
|
|
266
266
|
Requires-Dist: types-aiofiles; extra == "dev"
|
|
267
|
+
Dynamic: license-file
|
|
267
268
|
|
|
268
269
|
[](https://github.com/DiamondLightSource/dodal/actions/workflows/ci.yml)
|
|
269
270
|
[](https://codecov.io/gh/DiamondLightSource/dodal)
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
+
dls_dodal-1.44.0.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1
2
|
dodal/__init__.py,sha256=Ksms_WJF8LTkbm38gEpm1jBpGqcQ8NGvmb2ZJlOE1j8,198
|
|
2
3
|
dodal/__main__.py,sha256=kP2S2RPitnOWpNGokjZ1Yq-1umOtp5sNOZk2B3tBPLM,111
|
|
3
|
-
dodal/_version.py,sha256=
|
|
4
|
+
dodal/_version.py,sha256=lzdyl5oWyNXQa2wYjsrnkoqFidbsGyIRXKHeWRarZpw,513
|
|
4
5
|
dodal/cli.py,sha256=NieWNUgLUxyck1rHoFAPJjX1xXLzHNdQ-s4wvxYFfps,3757
|
|
5
6
|
dodal/log.py,sha256=ry8WMq1S4WMIAPqtqGeKuegMRN7Jy3qdVTJlkpKXkL8,9503
|
|
6
|
-
dodal/utils.py,sha256=
|
|
7
|
+
dodal/utils.py,sha256=rqQNalufZPxUPSD2SYuUgWSCpefb8FnqvR6N0t-YcEY,19675
|
|
7
8
|
dodal/beamline_specific_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
9
|
dodal/beamline_specific_utils/i03.py,sha256=P6Ls4FoVtcacH0RJM3v6ZwwGx27oMppcBdW0la-ohTY,377
|
|
9
10
|
dodal/beamlines/README.md,sha256=K9MkL_GomxlsoTB7Mz-_dJA5NNSbmCfMiutchGg3C8o,404
|
|
10
11
|
dodal/beamlines/__init__.py,sha256=dTmVSfeEVUHgxOTQO94lbQQiJHfFcvK2RAwVeTpCqxo,3150
|
|
11
12
|
dodal/beamlines/adsim.py,sha256=uOmFYZIGyput93XHk9R5ydZdxnTrS_wA2zSEm62UCVU,1930
|
|
12
13
|
dodal/beamlines/aithre.py,sha256=1q7zeMYunOBIWCm203NIkCl5tgVl_-jMWc0f5af-W_E,263
|
|
13
|
-
dodal/beamlines/b01_1.py,sha256
|
|
14
|
+
dodal/beamlines/b01_1.py,sha256=hHv9YJtUVmxAQ0UqF00-9wUYC_OtNo9awd04RM8b_HI,1993
|
|
14
15
|
dodal/beamlines/i02_1.py,sha256=d2IyqFMgeaSEyZYm7GMSjTKr7_02SakyC_oARx-XwnY,1204
|
|
15
|
-
dodal/beamlines/i03.py,sha256=
|
|
16
|
+
dodal/beamlines/i03.py,sha256=MS91uQArCsvg92eX_AR_DsUiRPQtnKkMgKV4ca1fosw,15259
|
|
16
17
|
dodal/beamlines/i04.py,sha256=V0fgXfEJnkh0spDXelK6zwjFChN6VaV9_CtrxJLZx2E,12100
|
|
17
18
|
dodal/beamlines/i10.py,sha256=lkn_xg0pt-vFuWkUGyl62A0xT-Rzs71JztJ1EeQkMi0,11487
|
|
18
|
-
dodal/beamlines/i13_1.py,sha256=
|
|
19
|
+
dodal/beamlines/i13_1.py,sha256=RF8AXBqVKPY7rVf4j1gOxcURAToYVk-Yo9t4FWyaphU,1650
|
|
19
20
|
dodal/beamlines/i18.py,sha256=Y5qLniqUkbYHcGGLPdBbiMILQHonPT2oz5M1hKMGqzs,3434
|
|
20
|
-
dodal/beamlines/i19_1.py,sha256=
|
|
21
|
-
dodal/beamlines/i19_2.py,sha256=
|
|
22
|
-
dodal/beamlines/i19_optics.py,sha256=
|
|
21
|
+
dodal/beamlines/i19_1.py,sha256=mae50OVHBywNDL1dQ77GvcltWLNnvXSMlhgn48Xcld4,2794
|
|
22
|
+
dodal/beamlines/i19_2.py,sha256=aDtb41JuS9WVFDcWK7MmN7lUFHE3d5J0AZg9nkcxZFQ,2285
|
|
23
|
+
dodal/beamlines/i19_optics.py,sha256=RztOdru0lvPXpaIXSUfzSsPVIuwAMKZsEA8vJFU4_Mk,1184
|
|
23
24
|
dodal/beamlines/i20_1.py,sha256=7ZZhPfjjKAhGjdXOI6mu2FPbMbsSjFHJOPa1toZRa0U,1725
|
|
24
25
|
dodal/beamlines/i22.py,sha256=XCAVBkZxN9cmxfpGoWaCvo77lu8hVIJ_e3BUc_qxdu0,7664
|
|
25
26
|
dodal/beamlines/i23.py,sha256=Qnu3Rk9gb2BD3YolMqUXiupt0ehxw5rVnfPJXBWFoCU,973
|
|
@@ -31,8 +32,9 @@ dodal/beamlines/training_rig.py,sha256=TzJnKAfL8Nn5nxCyyt9D9-71YnrvmS8oyGavI_N-i
|
|
|
31
32
|
dodal/common/__init__.py,sha256=ZC4ICKUDB0BDxRaVy8nmqclVmDBne-dPtk6UJsoFq6I,258
|
|
32
33
|
dodal/common/coordination.py,sha256=OxIjDiO1-9A9KESRPFtzwkvvQlavbgA5RHemlbubBPg,1168
|
|
33
34
|
dodal/common/crystal_metadata.py,sha256=XGr-X81G9SZvPx5b4nBCH4FOnywyX_zYVy6zwDxIMVM,1926
|
|
35
|
+
dodal/common/data_util.py,sha256=y3Dy2OyDKKZ9K8CK3MoAYxzy1-L_pSHXi3fIC52rDF4,451
|
|
34
36
|
dodal/common/maths.py,sha256=K9x7iL3xXLtWYTV-xlFHDNSTIL9a2UP3Ws7wr6Dm2rQ,1803
|
|
35
|
-
dodal/common/signal_utils.py,sha256
|
|
37
|
+
dodal/common/signal_utils.py,sha256=o9jTKNgObrEQGJPJJO1h-lKUzqroXupGYpwhzP0nJR4,3206
|
|
36
38
|
dodal/common/types.py,sha256=fkL7UOwDbe3v2_VJ5f1W5RxR98Wx-Ra-LxUZWkNDtls,486
|
|
37
39
|
dodal/common/udc_directory_provider.py,sha256=v5OBaCUwjtQZAsRQUw6LlVL58UvwwDO1l2MKlilXjdk,2403
|
|
38
40
|
dodal/common/visit.py,sha256=SfsjH-pf0KubwH1Kteke_OXJej_AW1as-t-ZnrfOtik,7435
|
|
@@ -44,16 +46,17 @@ dodal/devices/CTAB.py,sha256=5_261Ox6NG2cJIzzwnjWz289BG0nZoE0wKOaI5V5jqM,1998
|
|
|
44
46
|
dodal/devices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
47
|
dodal/devices/adsim.py,sha256=vCexraF4zLssHdjfPod-XuQGJE_sWoCttFdx__HDS8w,488
|
|
46
48
|
dodal/devices/aperture.py,sha256=yyw2ei3gM_lmZWDQ6VTbydB58RCDTen_nqBZyoTP2IM,583
|
|
47
|
-
dodal/devices/aperturescatterguard.py,sha256=
|
|
49
|
+
dodal/devices/aperturescatterguard.py,sha256=jmtiUg9lg3Erj9KmCvMKGI97LP0-f_hWLfNh7DTqJE4,12428
|
|
48
50
|
dodal/devices/apple2_undulator.py,sha256=R4KDgA4HcFj9zg1rPAEP9E0mKVzE06bhyxNRUrsi3Sw,20826
|
|
49
51
|
dodal/devices/backlight.py,sha256=RcgeA1hE3Z_5jA-jH8S8uLMpBfZjenRLz1lx6HTYeAo,1653
|
|
52
|
+
dodal/devices/baton.py,sha256=BnakfZxx3cIIX6Kxj8-abxn8Z9LaQODhcPbStbD0as4,485
|
|
50
53
|
dodal/devices/bimorph_mirror.py,sha256=D5PkrOggJRVAnv38lTdy8rErKLu_O2juLEvSqwcotxY,4825
|
|
51
54
|
dodal/devices/cryostream.py,sha256=K-ldpredpeDTzNt4qtQMg99nKJNjBYoXBbK0WJGexzw,656
|
|
52
55
|
dodal/devices/dcm.py,sha256=JbyxLnrS68nnnv39l9XEWgJgXUBqxX6aFo19MZnL36E,2574
|
|
53
56
|
dodal/devices/diamond_filter.py,sha256=A--RHd7WuH-IBhvCyENcRCTP4K-mm_Kqpa0pojpHZow,1098
|
|
54
57
|
dodal/devices/eiger.py,sha256=RN3klVASvdTT_jer2HJHUCZWZBKoOUQQdTpsKdgTPfo,15836
|
|
55
58
|
dodal/devices/eiger_odin.py,sha256=ytUH_18YuM1nJDhplS6OTdtADloYvHpO6ppENjVd4jU,7411
|
|
56
|
-
dodal/devices/fast_grid_scan.py,sha256=
|
|
59
|
+
dodal/devices/fast_grid_scan.py,sha256=eQK8Oh1jL_jjlaXpKadCG6nLCYQwk7hjvnyrWoDTc94,12048
|
|
57
60
|
dodal/devices/fluorescence_detector_motion.py,sha256=-1qCSvW0PdT0m6BcoLxrtc0OJ5UDIBsEe11EOLr-gFw,501
|
|
58
61
|
dodal/devices/flux.py,sha256=1CDsq9yU2-ho8MfYBl50Tl9ABZwpUBHnV486PQXKNoQ,462
|
|
59
62
|
dodal/devices/focusing_mirror.py,sha256=vdUPkwyCAZBSR3LQ-EojDOoxVy1ZmOaD_nevETbj7BA,6592
|
|
@@ -89,10 +92,10 @@ dodal/devices/attenuator/attenuator.py,sha256=Vq9Zsyf56S5fePHGeluImTUtxdwEqttBa2
|
|
|
89
92
|
dodal/devices/attenuator/filter.py,sha256=ZoPsTWXjllyMtKBdSIFLB7Cbc88rGof5k3ymL13VczE,422
|
|
90
93
|
dodal/devices/attenuator/filter_selections.py,sha256=lcmTprCXgSggp2L6uQ6YU0xLMljXvbspAug-WWKCXks,1410
|
|
91
94
|
dodal/devices/current_amplifiers/__init__.py,sha256=-MhT-t-GJ83rrvTDBCoWub_NKYkRtu4sEj8-y5XZBP0,782
|
|
92
|
-
dodal/devices/current_amplifiers/current_amplifier.py,sha256=
|
|
93
|
-
dodal/devices/current_amplifiers/current_amplifier_detector.py,sha256=
|
|
94
|
-
dodal/devices/current_amplifiers/femto.py,sha256=
|
|
95
|
-
dodal/devices/current_amplifiers/sr570.py,sha256
|
|
95
|
+
dodal/devices/current_amplifiers/current_amplifier.py,sha256=erDVtstLNFVb4wdSqWwRCQX_ifPxOc07x_2Ba_8Y1Wg,2660
|
|
96
|
+
dodal/devices/current_amplifiers/current_amplifier_detector.py,sha256=YKA769KpU1V4GyYF3ckMgE8sXnaJyzRPUbBqIo7UruM,3968
|
|
97
|
+
dodal/devices/current_amplifiers/femto.py,sha256=VIGWKSPyC8iYuToI12-Q0v10DjZcX3t8Vca7vXCAckM,4462
|
|
98
|
+
dodal/devices/current_amplifiers/sr570.py,sha256=rYxMLmMKr3uQkz0l0bebTpLtJzCr3w4hmtJPgY0NBZ0,7550
|
|
96
99
|
dodal/devices/current_amplifiers/struck_scaler_counter.py,sha256=lMKClJsxsWFX-dtdDN99N6IUHMKcoGlna54wUTYVVmE,2591
|
|
97
100
|
dodal/devices/detector/__init__.py,sha256=-RdACL3tzc3lLArWOoGNje48UUlv2fElOmGOz9yOuO0,317
|
|
98
101
|
dodal/devices/detector/det_dim_constants.py,sha256=arBWvzMwybatdSiCMAiwB4Bq1dX-wkLi54xPPfTfQhY,2772
|
|
@@ -100,8 +103,14 @@ dodal/devices/detector/det_dist_to_beam_converter.py,sha256=7keoqZYfvgayePVx97lH
|
|
|
100
103
|
dodal/devices/detector/det_resolution.py,sha256=aQkKp24LpRGiwzPAQM3wLVa4ANw32HdrKc2kftHfKQA,3253
|
|
101
104
|
dodal/devices/detector/detector.py,sha256=sIOGwkixbJTYPdNiwZjDiY7DfYuYzRomKltO2EztDZE,4770
|
|
102
105
|
dodal/devices/detector/detector_motion.py,sha256=UGDQriDWRluDZOZh1mDX9w_fPjMD-_BGe11kA36Kezs,1616
|
|
106
|
+
dodal/devices/electron_analyser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
107
|
+
dodal/devices/electron_analyser/base_region.py,sha256=aQXcShdYz63f0b8OoDF7hsguPU6fMyCuykkZbVuuz34,1907
|
|
108
|
+
dodal/devices/electron_analyser/specs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
109
|
+
dodal/devices/electron_analyser/specs/specs_region.py,sha256=RNLcBgrQ7Rs-bVW-4zTpMQuTiWUqGYUYxLFViOOznzU,821
|
|
110
|
+
dodal/devices/electron_analyser/vgscienta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
111
|
+
dodal/devices/electron_analyser/vgscienta/vgscienta_region.py,sha256=E6smDEXbQIXb3Hc5rXsFNNuAW4RCIfECVaPj8nHy_RM,2139
|
|
103
112
|
dodal/devices/i03/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
104
|
-
dodal/devices/i03/beamstop.py,sha256=
|
|
113
|
+
dodal/devices/i03/beamstop.py,sha256=sJ2i9yEgaKPIbv23NNhUDTTIKIPN9MNfmwt2XqjBT1E,2806
|
|
105
114
|
dodal/devices/i04/transfocator.py,sha256=sVI4Bgv-2-DH4-F1nIXMp5Aktevrm3agZnCA-WgjmW8,3780
|
|
106
115
|
dodal/devices/i10/i10_apple2.py,sha256=ErObNNE59NuYssde6ojWJb8wo3SVohkQsvK0Bjnf1T8,13192
|
|
107
116
|
dodal/devices/i10/i10_setting_data.py,sha256=69XWgE-YNTiW7C3t67MNcTL5JDDhOo7h-X7DCTpFE5g,164
|
|
@@ -111,35 +120,34 @@ dodal/devices/i10/rasor/rasor_current_amp.py,sha256=hImaPI3veKiS5YVfYwv-qrQ1AYNB
|
|
|
111
120
|
dodal/devices/i10/rasor/rasor_motors.py,sha256=0w31rKDuzRL-9tGbLDj0JZljaDjfXvKHQyzMs6fc3sw,1653
|
|
112
121
|
dodal/devices/i10/rasor/rasor_scaler_cards.py,sha256=sfWJKNx6pq342PEAlmg_Yt_Tijq7mO1XFjcCDtToQiU,467
|
|
113
122
|
dodal/devices/i13_1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
114
|
-
dodal/devices/i13_1/merlin.py,sha256=
|
|
115
|
-
dodal/devices/i13_1/merlin_controller.py,sha256=
|
|
116
|
-
dodal/devices/i13_1/merlin_io.py,sha256=0To4dzeg1GNRTlsdKL7RbF2aXFyLlACGh9ZhEvIOhUc,531
|
|
123
|
+
dodal/devices/i13_1/merlin.py,sha256=ML-AzjvvO0kgpVv1vaG2hyVwrkfXeysF-mTvj7h8AoI,1015
|
|
124
|
+
dodal/devices/i13_1/merlin_controller.py,sha256=FwKVesrDostoKGRJYTxvcfR1Bo16KtEeFXQgMVLNwvA,1452
|
|
117
125
|
dodal/devices/i18/KBMirror.py,sha256=W4R3TeulSjosUqAFIIznyWzje_Y2AoEf9f8N-NkisYM,710
|
|
118
126
|
dodal/devices/i18/diode.py,sha256=q8ddVYT7yDXwURzxw5gfXlGT1tFirNfHBmiKnpvvXHk,406
|
|
119
127
|
dodal/devices/i18/table.py,sha256=f6OtVSqCFIpXyoHX97CPLpaVDVXUNc2EvgSFP3qVFKo,446
|
|
120
128
|
dodal/devices/i18/thor_labs_stage.py,sha256=I9JSKY-UqTjN-yBxQWL4CycTNNkUj3vknRrXjA6KZR8,364
|
|
121
129
|
dodal/devices/i19/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
122
|
-
dodal/devices/i19/
|
|
123
|
-
dodal/devices/i19/
|
|
130
|
+
dodal/devices/i19/beamstop.py,sha256=aV5gjTN-LEZxd3HnbotagJBB1GMdVB8VbvFPZvIw2U4,885
|
|
131
|
+
dodal/devices/i19/hutch_access.py,sha256=hnClUWCL1qTYzuBMmhXX85jiNak7mbYfyHEh54tZ27U,377
|
|
132
|
+
dodal/devices/i19/shutter.py,sha256=f4prmJGziHuRN0tRgPc-PkFMpQQkvxsRhlyX9cm3SvE,3236
|
|
124
133
|
dodal/devices/i20_1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
125
134
|
dodal/devices/i22/dcm.py,sha256=SQDh-Sj1OvplHZ9yTWblJwv8PJrUqxseDPupZOWmcLo,4701
|
|
126
135
|
dodal/devices/i22/fswitch.py,sha256=LSMoo9aDkH0SLcojbUh2NxTWIpUXHZxauTqThc3XtSk,3073
|
|
127
|
-
dodal/devices/i22/nxsas.py,sha256=
|
|
136
|
+
dodal/devices/i22/nxsas.py,sha256=lFB_h6ns6yETPFZjDghOMZLg16nDnWveMOJV34TDSYk,5994
|
|
128
137
|
dodal/devices/i24/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
129
138
|
dodal/devices/i24/aperture.py,sha256=XlnOyQsvdTom1dJHVUg8CUSthq3jlBlZFOUaa9b1eZ4,837
|
|
130
139
|
dodal/devices/i24/beam_center.py,sha256=m6LWsG9e_lhtPfZ8pc_hoLNyTYQQGGdRNav8J_2scTo,483
|
|
131
140
|
dodal/devices/i24/beamstop.py,sha256=89ncXUisia1rn1Faf5iWg3k0QW6Rm99j1vq9A8l9Xv8,1221
|
|
132
141
|
dodal/devices/i24/dcm.py,sha256=Q3qqlgsiLJga2cgI8L4jczjyUgQixJh6QWg7shrFpTQ,1988
|
|
133
142
|
dodal/devices/i24/dual_backlight.py,sha256=CbQ9mYUNhhozVdNXqR5ac73tEIAWT2RnEpRwXB3EFog,2049
|
|
134
|
-
dodal/devices/i24/focus_mirrors.py,sha256=
|
|
143
|
+
dodal/devices/i24/focus_mirrors.py,sha256=vkDUxnvGG3vqrsDR90YM84U8_fPUesmiD5XE1Fb4k2c,1863
|
|
135
144
|
dodal/devices/i24/i24_detector_motion.py,sha256=_HgdsZqFYY0tKqUgMzViHaPEUFXL3WlXXioGvDehRUw,364
|
|
136
|
-
dodal/devices/i24/pilatus_metadata.py,sha256=
|
|
145
|
+
dodal/devices/i24/pilatus_metadata.py,sha256=PAibx6V_JU57BWkiLtvgMI6nErU-_3DwaMSfJXaqomA,1831
|
|
137
146
|
dodal/devices/i24/pmac.py,sha256=pghm0jM24N1GZ1EOazPEoSxcn6zyizp6E4H28jnUn1s,6862
|
|
138
147
|
dodal/devices/i24/vgonio.py,sha256=sxSmcYZayVJPJz_D_91j9PmNor7Tbl1RGQFRrdtESlw,533
|
|
139
148
|
dodal/devices/oav/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
140
|
-
dodal/devices/oav/microns_for_zoom_levels.json,sha256=kJTkbu2v6_Ccc_cDy7FRTX-gRhXxfYskjVqwBCZIqCQ,1209
|
|
141
149
|
dodal/devices/oav/oav_calculations.py,sha256=tr3Z2pFT7v_enAiNuSZV0esPsiHfRGrj7t0-g_Ix5Do,2363
|
|
142
|
-
dodal/devices/oav/oav_detector.py,sha256=
|
|
150
|
+
dodal/devices/oav/oav_detector.py,sha256=cE7gx-5Ad8JVJjsnon9Rnb2cHcEA6Et9RHBn2IorIo4,4223
|
|
143
151
|
dodal/devices/oav/oav_parameters.py,sha256=gGN73TQGUiRzlIO5YKiqCRkjpTKsV6LFGo7Eu4Vs82g,6074
|
|
144
152
|
dodal/devices/oav/oav_to_redis_forwarder.py,sha256=pfhaW6Uo_1wDNfywyPkS5UTrY8yhkerhjgJfRMqrJRA,6259
|
|
145
153
|
dodal/devices/oav/utils.py,sha256=3IvSTw6Ygkaz4Hzoz0eU2l6mljpq0NO57M15e-K4jOE,3182
|
|
@@ -147,7 +155,8 @@ dodal/devices/oav/pin_image_recognition/__init__.py,sha256=_eCq-rEtGNXVfrpahfKML
|
|
|
147
155
|
dodal/devices/oav/pin_image_recognition/manual_test.py,sha256=h1Rto6ZDCB3jWhjSy9N8ECxRN583iYDJr9LxrTJ8kfE,903
|
|
148
156
|
dodal/devices/oav/pin_image_recognition/utils.py,sha256=L9ypluYqeOFoS7gQuws-vTNc8LqaKl2ZIDNeQ2JaNpg,8592
|
|
149
157
|
dodal/devices/oav/snapshots/grid_overlay.py,sha256=CdvCdTKMCiwMwxm2lV28KpcIUSXlscZmWxb73_KKmiI,3694
|
|
150
|
-
dodal/devices/oav/snapshots/
|
|
158
|
+
dodal/devices/oav/snapshots/snapshot.py,sha256=VDHYxko97sATMKvD5wClgvN7WQUtUAjcXXSyoQAL8q8,499
|
|
159
|
+
dodal/devices/oav/snapshots/snapshot_image_processing.py,sha256=wDxH9WPmB0nsotr49PUpw2Ke4l4RFxirrbpPzOUF9s4,2318
|
|
151
160
|
dodal/devices/oav/snapshots/snapshot_with_grid.py,sha256=KAM7KjF0BzhGxx-MXd4Zc16IBbi1BF8S_VT8T84_2OY,2309
|
|
152
161
|
dodal/devices/p99/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
153
162
|
dodal/devices/p99/sample_stage.py,sha256=DvHU556Gp0wFiufZiwY3o2W4xmsCL5uSwNnhd8HPAnc,528
|
|
@@ -173,7 +182,7 @@ dodal/parameters/experiment_parameter_base.py,sha256=O7JamfuJ5cYHkPf9tsHJPqn-OMH
|
|
|
173
182
|
dodal/plan_stubs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
174
183
|
dodal/plan_stubs/check_topup.py,sha256=3gyLHfHNQBCgEWuAg4QE-ONx7y2Do1vVv5HP8ss0Z1I,5371
|
|
175
184
|
dodal/plan_stubs/data_session.py,sha256=PsRrGceZg7M5LkjQZ8DD2FlSX1fmoyhMPgLDXTEX3m4,1873
|
|
176
|
-
dodal/plan_stubs/motor_utils.py,sha256=
|
|
185
|
+
dodal/plan_stubs/motor_utils.py,sha256=Mf8utOA_xmxUa2dLmQ1uRkdfyDTip7D8YcKeCBCQLUQ,4458
|
|
177
186
|
dodal/plan_stubs/wrapped.py,sha256=kC8HH7bx3-sLYu2oieY_502tAdT2OECF8n-fqoL5Bfc,4266
|
|
178
187
|
dodal/plans/__init__.py,sha256=nH1jNxw3DzDMg9O8Uda0kqKIalRVEWBrq07OLY6Ey38,93
|
|
179
188
|
dodal/plans/save_panda.py,sha256=1fumH7Ih8uDIv8ahAtgQ_vUuR3dz0sfUs4n9TEtEbSs,3053
|
|
@@ -182,9 +191,8 @@ dodal/plans/verify_undulator_gap.py,sha256=mq2fHtc5o5rSgdTM2xhULOImfjwa6x29tPpeo
|
|
|
182
191
|
dodal/plans/wrapped.py,sha256=BPMw__RcWvk9v5XnhMsi9_k4KsDEbmXogzD2n1ecbUg,2098
|
|
183
192
|
dodal/plans/preprocessors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
184
193
|
dodal/plans/preprocessors/verify_undulator_gap.py,sha256=cBZEGq8TW1jrXFXB00iClQVXSEaE_jP_rHMY9WTgYyY,1813
|
|
185
|
-
dls_dodal-1.
|
|
186
|
-
dls_dodal-1.
|
|
187
|
-
dls_dodal-1.
|
|
188
|
-
dls_dodal-1.
|
|
189
|
-
dls_dodal-1.
|
|
190
|
-
dls_dodal-1.43.0.dist-info/RECORD,,
|
|
194
|
+
dls_dodal-1.44.0.dist-info/METADATA,sha256=oP4ZiLT1uNpP5A8RwfEk5WxBqWoPuONaUZeRZL2Ci6M,16806
|
|
195
|
+
dls_dodal-1.44.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
196
|
+
dls_dodal-1.44.0.dist-info/entry_points.txt,sha256=bycw_EKUzup_rxfCetOwcauXV4kLln_OPpPT8jEnr-I,94
|
|
197
|
+
dls_dodal-1.44.0.dist-info/top_level.txt,sha256=xIozdmZk_wmMV4wugpq9-6eZs0vgADNUKz3j2UAwlhc,6
|
|
198
|
+
dls_dodal-1.44.0.dist-info/RECORD,,
|
dodal/_version.py
CHANGED
dodal/beamlines/b01_1.py
CHANGED
|
@@ -11,6 +11,7 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
11
11
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
12
12
|
from dodal.common.beamlines.device_helpers import CAM_SUFFIX, HDF5_SUFFIX
|
|
13
13
|
from dodal.common.visit import LocalDirectoryServiceClient, StaticVisitPathProvider
|
|
14
|
+
from dodal.devices.motors import XYZPositioner
|
|
14
15
|
from dodal.devices.synchrotron import Synchrotron
|
|
15
16
|
from dodal.log import set_beamline as set_log_beamline
|
|
16
17
|
from dodal.utils import BeamlinePrefix
|
|
@@ -60,3 +61,10 @@ def manta() -> AravisDetector:
|
|
|
60
61
|
drv_suffix=CAM_SUFFIX,
|
|
61
62
|
fileio_suffix=HDF5_SUFFIX,
|
|
62
63
|
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
@device_factory()
|
|
67
|
+
def sample_stage() -> XYZPositioner:
|
|
68
|
+
return XYZPositioner(
|
|
69
|
+
f"{PREFIX.beamline_prefix}-MO-PPMAC-01:",
|
|
70
|
+
)
|
dodal/beamlines/i03.py
CHANGED
|
@@ -16,6 +16,7 @@ from dodal.devices.aperturescatterguard import (
|
|
|
16
16
|
)
|
|
17
17
|
from dodal.devices.attenuator.attenuator import BinaryFilterAttenuator
|
|
18
18
|
from dodal.devices.backlight import Backlight
|
|
19
|
+
from dodal.devices.baton import Baton
|
|
19
20
|
from dodal.devices.cryostream import CryoStream
|
|
20
21
|
from dodal.devices.dcm import DCM
|
|
21
22
|
from dodal.devices.detector.detector_motion import DetectorMotion
|
|
@@ -436,3 +437,13 @@ def qbpm() -> QBPM:
|
|
|
436
437
|
f"{PREFIX.beamline_prefix}-DI-QBPM-01:",
|
|
437
438
|
"qbpm",
|
|
438
439
|
)
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
@device_factory(
|
|
443
|
+
skip=True
|
|
444
|
+
) # Skipping as not yet on the beamline, see https://jira.diamond.ac.uk/browse/I03-894
|
|
445
|
+
def baton() -> Baton:
|
|
446
|
+
"""Get the i03 baton device, instantiate it if it hasn't already been.
|
|
447
|
+
If this is called when already instantiated in i03, it will return the existing object.
|
|
448
|
+
"""
|
|
449
|
+
return Baton(f"{PREFIX.beamline_prefix}:")
|
dodal/beamlines/i13_1.py
CHANGED
|
@@ -3,19 +3,20 @@ from pathlib import Path
|
|
|
3
3
|
from ophyd_async.epics.adaravis import AravisDetector
|
|
4
4
|
|
|
5
5
|
from dodal.common.beamlines.beamline_utils import (
|
|
6
|
-
|
|
6
|
+
device_factory,
|
|
7
7
|
get_path_provider,
|
|
8
8
|
set_path_provider,
|
|
9
9
|
)
|
|
10
10
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
11
|
-
from dodal.common.beamlines.device_helpers import CAM_SUFFIX, HDF5_SUFFIX
|
|
12
11
|
from dodal.common.visit import LocalDirectoryServiceClient, StaticVisitPathProvider
|
|
13
12
|
from dodal.devices.i13_1.merlin import Merlin
|
|
14
13
|
from dodal.devices.motors import XYZPositioner
|
|
15
14
|
from dodal.log import set_beamline as set_log_beamline
|
|
16
|
-
from dodal.utils import get_beamline_name
|
|
15
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
17
16
|
|
|
18
17
|
BL = get_beamline_name("i13-1")
|
|
18
|
+
PREFIX_BL13I = BeamlinePrefix(BL) # Can't use this yet as returns BL13I
|
|
19
|
+
PREFIX = "BL13J"
|
|
19
20
|
set_log_beamline(BL)
|
|
20
21
|
set_utils_beamline(BL)
|
|
21
22
|
set_path_provider(
|
|
@@ -27,59 +28,32 @@ set_path_provider(
|
|
|
27
28
|
)
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return device_instantiation(
|
|
34
|
-
XYZPositioner,
|
|
35
|
-
prefix="BL13J-MO-PI-02:",
|
|
36
|
-
name="sample_xyz_stage",
|
|
37
|
-
wait=wait_for_connection,
|
|
38
|
-
fake=fake_with_ophyd_sim,
|
|
39
|
-
bl_prefix=False,
|
|
40
|
-
)
|
|
31
|
+
@device_factory()
|
|
32
|
+
def sample_xyz_stage() -> XYZPositioner:
|
|
33
|
+
return XYZPositioner(prefix=f"{PREFIX}-MO-PI-02:")
|
|
41
34
|
|
|
42
35
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return device_instantiation(
|
|
47
|
-
XYZPositioner,
|
|
48
|
-
prefix="BL13J-MO-PI-02:FIXANG:",
|
|
49
|
-
name="sample_xyz_lab_fa_stage",
|
|
50
|
-
wait=wait_for_connection,
|
|
51
|
-
fake=fake_with_ophyd_sim,
|
|
52
|
-
bl_prefix=False,
|
|
53
|
-
)
|
|
36
|
+
@device_factory()
|
|
37
|
+
def sample_xyz_lab_fa_stage() -> XYZPositioner:
|
|
38
|
+
return XYZPositioner(prefix=f"{PREFIX}-MO-PI-02:FIXANG:")
|
|
54
39
|
|
|
55
40
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
name="side_camera",
|
|
63
|
-
bl_prefix=False,
|
|
64
|
-
drv_suffix=CAM_SUFFIX,
|
|
65
|
-
fileio_suffix=HDF5_SUFFIX,
|
|
41
|
+
@device_factory()
|
|
42
|
+
def side_camera() -> AravisDetector:
|
|
43
|
+
return AravisDetector(
|
|
44
|
+
prefix=f"{PREFIX}-OP-FLOAT-03:",
|
|
45
|
+
drv_suffix="CAM:",
|
|
46
|
+
fileio_suffix="HDF5:",
|
|
66
47
|
path_provider=get_path_provider(),
|
|
67
|
-
wait=wait_for_connection,
|
|
68
|
-
fake=fake_with_ophyd_sim,
|
|
69
48
|
)
|
|
70
49
|
|
|
71
50
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
Merlin,
|
|
77
|
-
prefix="BL13J-EA-DET-04:",
|
|
51
|
+
@device_factory()
|
|
52
|
+
def merlin() -> Merlin:
|
|
53
|
+
return Merlin(
|
|
54
|
+
prefix=f"{PREFIX}-EA-DET-04:",
|
|
78
55
|
name="merlin",
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
fileio_suffix=HDF5_SUFFIX,
|
|
56
|
+
drv_suffix="CAM:",
|
|
57
|
+
fileio_suffix="HDF5:",
|
|
82
58
|
path_provider=get_path_provider(),
|
|
83
|
-
wait=wait_for_connection,
|
|
84
|
-
fake=fake_with_ophyd_sim,
|
|
85
59
|
)
|
dodal/beamlines/i19_1.py
CHANGED
|
@@ -4,7 +4,8 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
4
4
|
from dodal.common.beamlines.beamline_utils import (
|
|
5
5
|
set_beamline as set_utils_beamline,
|
|
6
6
|
)
|
|
7
|
-
from dodal.devices.i19.
|
|
7
|
+
from dodal.devices.i19.beamstop import BeamStop
|
|
8
|
+
from dodal.devices.i19.shutter import AccessControlledShutter, HutchState
|
|
8
9
|
from dodal.devices.oav.oav_detector import OAV
|
|
9
10
|
from dodal.devices.oav.oav_parameters import OAVConfig
|
|
10
11
|
from dodal.devices.synchrotron import Synchrotron
|
|
@@ -35,10 +36,20 @@ ZOOM_PARAMS_FILE = (
|
|
|
35
36
|
DISPLAY_CONFIG = "/dls_sw/i19-1/software/daq_configuration/domain/display.configuration"
|
|
36
37
|
|
|
37
38
|
|
|
39
|
+
# Needs to wait until enum is fixed on the beamline
|
|
40
|
+
# See https://github.com/DiamondLightSource/dodal/issues/1150
|
|
41
|
+
@device_factory(skip=True)
|
|
42
|
+
def beamstop() -> BeamStop:
|
|
43
|
+
"""Get the i19-1 beamstop device, instantiate it if it hasn't already been.
|
|
44
|
+
If this is called when already instantiated in i19-1, it will return the existing object.
|
|
45
|
+
"""
|
|
46
|
+
return BeamStop(prefix=f"{PREFIX.beamline_prefix}-RS-ABSB-01:")
|
|
47
|
+
|
|
48
|
+
|
|
38
49
|
@device_factory()
|
|
39
50
|
def oav() -> OAV:
|
|
40
51
|
return OAV(
|
|
41
|
-
prefix=f"{PREFIX.beamline_prefix}-
|
|
52
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-OAV-01:",
|
|
42
53
|
config=OAVConfig(ZOOM_PARAMS_FILE, DISPLAY_CONFIG),
|
|
43
54
|
)
|
|
44
55
|
|
|
@@ -56,11 +67,11 @@ def zebra() -> Zebra:
|
|
|
56
67
|
|
|
57
68
|
|
|
58
69
|
@device_factory()
|
|
59
|
-
def shutter() ->
|
|
60
|
-
"""Get the i19-
|
|
70
|
+
def shutter() -> AccessControlledShutter:
|
|
71
|
+
"""Get the i19-1 hutch shutter device, instantiate it if it hasn't already been.
|
|
61
72
|
If this is called when already instantiated, it will return the existing object.
|
|
62
73
|
"""
|
|
63
|
-
return
|
|
74
|
+
return AccessControlledShutter(
|
|
64
75
|
prefix=f"{PREFIX.beamline_prefix}-PS-SHTR-01:",
|
|
65
76
|
hutch=HutchState.EH1,
|
|
66
77
|
)
|
dodal/beamlines/i19_2.py
CHANGED
|
@@ -4,7 +4,8 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
4
4
|
from dodal.common.beamlines.beamline_utils import (
|
|
5
5
|
set_beamline as set_utils_beamline,
|
|
6
6
|
)
|
|
7
|
-
from dodal.devices.i19.
|
|
7
|
+
from dodal.devices.i19.beamstop import BeamStop
|
|
8
|
+
from dodal.devices.i19.shutter import AccessControlledShutter, HutchState
|
|
8
9
|
from dodal.devices.synchrotron import Synchrotron
|
|
9
10
|
from dodal.devices.zebra.zebra import Zebra
|
|
10
11
|
from dodal.devices.zebra.zebra_constants_mapping import (
|
|
@@ -30,6 +31,14 @@ I19_2_ZEBRA_MAPPING = ZebraMapping(
|
|
|
30
31
|
)
|
|
31
32
|
|
|
32
33
|
|
|
34
|
+
@device_factory()
|
|
35
|
+
def beamstop() -> BeamStop:
|
|
36
|
+
"""Get the i19-2 beamstop device, instantiate it if it hasn't already been.
|
|
37
|
+
If this is called when already instantiated in i19-2, it will return the existing object.
|
|
38
|
+
"""
|
|
39
|
+
return BeamStop(prefix=f"{PREFIX.beamline_prefix}-OP-ABSB-02:")
|
|
40
|
+
|
|
41
|
+
|
|
33
42
|
@device_factory()
|
|
34
43
|
def zebra() -> Zebra:
|
|
35
44
|
"""Get the i19-2 zebra device, instantiate it if it hasn't already been.
|
|
@@ -43,11 +52,11 @@ def zebra() -> Zebra:
|
|
|
43
52
|
|
|
44
53
|
|
|
45
54
|
@device_factory()
|
|
46
|
-
def shutter() ->
|
|
55
|
+
def shutter() -> AccessControlledShutter:
|
|
47
56
|
"""Get the i19-2 hutch shutter device, instantiate it if it hasn't already been.
|
|
48
57
|
If this is called when already instantiated, it will return the existing object.
|
|
49
58
|
"""
|
|
50
|
-
return
|
|
59
|
+
return AccessControlledShutter(
|
|
51
60
|
prefix=f"{PREFIX.beamline_prefix}-PS-SHTR-01:",
|
|
52
61
|
hutch=HutchState.EH2,
|
|
53
62
|
)
|
dodal/beamlines/i19_optics.py
CHANGED
|
@@ -5,7 +5,7 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
5
5
|
set_beamline as set_utils_beamline,
|
|
6
6
|
)
|
|
7
7
|
from dodal.devices.hutch_shutter import HutchShutter
|
|
8
|
-
from dodal.devices.i19.hutch_access import HutchAccessControl
|
|
8
|
+
from dodal.devices.i19.hutch_access import ACCESS_DEVICE_NAME, HutchAccessControl
|
|
9
9
|
from dodal.log import set_beamline as set_log_beamline
|
|
10
10
|
from dodal.utils import BeamlinePrefix
|
|
11
11
|
|
|
@@ -31,4 +31,6 @@ def access_control() -> HutchAccessControl:
|
|
|
31
31
|
"""Get a device that checks the active hutch for i19, instantiate it if it hasn't already been.
|
|
32
32
|
If this is called when already instantiated, it will return the existing object.
|
|
33
33
|
"""
|
|
34
|
-
return HutchAccessControl(
|
|
34
|
+
return HutchAccessControl(
|
|
35
|
+
f"{PREFIX.beamline_prefix}-OP-STAT-01:", ACCESS_DEVICE_NAME
|
|
36
|
+
)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from typing import TypeVar
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
|
|
5
|
+
TBaseModel = TypeVar("TBaseModel", bound=BaseModel)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def load_json_file_to_class(
|
|
9
|
+
t: type[TBaseModel],
|
|
10
|
+
file: str,
|
|
11
|
+
) -> TBaseModel:
|
|
12
|
+
with open(file) as f:
|
|
13
|
+
json_obj = f.read()
|
|
14
|
+
cls = t.model_validate_json(json_obj)
|
|
15
|
+
return cls
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def save_class_to_json_file(model: BaseModel, file: str) -> None:
|
|
19
|
+
with open(file, "w") as f:
|
|
20
|
+
f.write(model.model_dump_json())
|
dodal/common/signal_utils.py
CHANGED
|
@@ -2,22 +2,26 @@ from collections.abc import Callable, Coroutine
|
|
|
2
2
|
from typing import Any
|
|
3
3
|
|
|
4
4
|
from bluesky.protocols import Reading
|
|
5
|
-
from ophyd_async.core import SignalDatatypeT, SignalR, SoftSignalBackend
|
|
5
|
+
from ophyd_async.core import SignalDatatypeT, SignalR, SignalRW, SoftSignalBackend
|
|
6
|
+
|
|
7
|
+
SetHardwareType = Callable[[SignalDatatypeT], Coroutine[Any, Any, None]]
|
|
6
8
|
|
|
7
9
|
|
|
8
10
|
class HardwareBackedSoftSignalBackend(SoftSignalBackend[SignalDatatypeT]):
|
|
9
11
|
def __init__(
|
|
10
12
|
self,
|
|
11
13
|
get_from_hardware_func: Callable[[], Coroutine[Any, Any, SignalDatatypeT]],
|
|
14
|
+
set_to_hardware_func: SetHardwareType | None = None,
|
|
12
15
|
*args,
|
|
13
16
|
**kwargs,
|
|
14
17
|
) -> None:
|
|
15
18
|
self.get_from_hardware_func = get_from_hardware_func
|
|
19
|
+
self.set_to_hardware_func = set_to_hardware_func
|
|
16
20
|
super().__init__(*args, **kwargs)
|
|
17
21
|
|
|
18
22
|
async def _update_value(self):
|
|
19
23
|
new_value = await self.get_from_hardware_func()
|
|
20
|
-
|
|
24
|
+
self.set_value(new_value)
|
|
21
25
|
|
|
22
26
|
async def get_reading(self) -> Reading:
|
|
23
27
|
await self._update_value()
|
|
@@ -27,8 +31,39 @@ class HardwareBackedSoftSignalBackend(SoftSignalBackend[SignalDatatypeT]):
|
|
|
27
31
|
await self._update_value()
|
|
28
32
|
return await super().get_value()
|
|
29
33
|
|
|
34
|
+
async def put(self, value: SignalDatatypeT | None, wait: bool) -> None:
|
|
35
|
+
if self.set_to_hardware_func:
|
|
36
|
+
write_value = self.initial_value if value is None else value
|
|
37
|
+
await self.set_to_hardware_func(write_value)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def create_rw_hardware_backed_soft_signal(
|
|
41
|
+
datatype: type[SignalDatatypeT],
|
|
42
|
+
get_from_hardware_func: Callable[[], Coroutine[Any, Any, SignalDatatypeT]],
|
|
43
|
+
set_to_hardware_func: SetHardwareType,
|
|
44
|
+
units: str | None = None,
|
|
45
|
+
precision: int | None = None,
|
|
46
|
+
):
|
|
47
|
+
"""Creates a soft signal that, when read will call the function passed into
|
|
48
|
+
`get_from_hardware_func` and return this. When set it will call `set_to_hardware_func`
|
|
49
|
+
and send something to the hardware.
|
|
50
|
+
|
|
51
|
+
This will allow you to make soft signals derived from arbitrary hardware signals.
|
|
52
|
+
However, calling subscribe on this signal does not give you a sensible value. See https://github.com/bluesky/ophyd-async/issues/525
|
|
53
|
+
for a more full solution.
|
|
54
|
+
"""
|
|
55
|
+
return SignalRW(
|
|
56
|
+
backend=HardwareBackedSoftSignalBackend(
|
|
57
|
+
get_from_hardware_func,
|
|
58
|
+
set_to_hardware_func,
|
|
59
|
+
datatype,
|
|
60
|
+
units=units,
|
|
61
|
+
precision=precision,
|
|
62
|
+
)
|
|
63
|
+
)
|
|
64
|
+
|
|
30
65
|
|
|
31
|
-
def
|
|
66
|
+
def create_r_hardware_backed_soft_signal(
|
|
32
67
|
datatype: type[SignalDatatypeT],
|
|
33
68
|
get_from_hardware_func: Callable[[], Coroutine[Any, Any, SignalDatatypeT]],
|
|
34
69
|
units: str | None = None,
|
|
@@ -44,6 +79,10 @@ def create_hardware_backed_soft_signal(
|
|
|
44
79
|
"""
|
|
45
80
|
return SignalR(
|
|
46
81
|
backend=HardwareBackedSoftSignalBackend(
|
|
47
|
-
get_from_hardware_func,
|
|
82
|
+
get_from_hardware_func,
|
|
83
|
+
None,
|
|
84
|
+
datatype,
|
|
85
|
+
units=units,
|
|
86
|
+
precision=precision,
|
|
48
87
|
)
|
|
49
88
|
)
|
|
@@ -12,7 +12,7 @@ from ophyd_async.core import (
|
|
|
12
12
|
from pydantic import BaseModel, Field
|
|
13
13
|
|
|
14
14
|
from dodal.common.beamlines.beamline_parameters import GDABeamlineParameters
|
|
15
|
-
from dodal.common.signal_utils import
|
|
15
|
+
from dodal.common.signal_utils import create_r_hardware_backed_soft_signal
|
|
16
16
|
from dodal.devices.aperture import Aperture
|
|
17
17
|
from dodal.devices.scatterguard import Scatterguard
|
|
18
18
|
|
|
@@ -164,7 +164,7 @@ class ApertureScatterguard(StandardReadable, Movable[ApertureValue], Preparable)
|
|
|
164
164
|
) -> None:
|
|
165
165
|
self.aperture = Aperture(prefix + "-MO-MAPT-01:")
|
|
166
166
|
self.scatterguard = Scatterguard(prefix + "-MO-SCAT-01:")
|
|
167
|
-
self.radius =
|
|
167
|
+
self.radius = create_r_hardware_backed_soft_signal(
|
|
168
168
|
float, self._get_current_radius, units="µm"
|
|
169
169
|
)
|
|
170
170
|
self._loaded_positions = loaded_positions
|
|
@@ -181,7 +181,7 @@ class ApertureScatterguard(StandardReadable, Movable[ApertureValue], Preparable)
|
|
|
181
181
|
)
|
|
182
182
|
|
|
183
183
|
with self.add_children_as_readables(StandardReadableFormat.HINTED_SIGNAL):
|
|
184
|
-
self.selected_aperture =
|
|
184
|
+
self.selected_aperture = create_r_hardware_backed_soft_signal(
|
|
185
185
|
ApertureValue, self._get_current_aperture_position
|
|
186
186
|
)
|
|
187
187
|
|
dodal/devices/baton.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from typing import Annotated as A
|
|
2
|
+
|
|
3
|
+
from ophyd_async.core import (
|
|
4
|
+
SignalRW,
|
|
5
|
+
StandardReadable,
|
|
6
|
+
)
|
|
7
|
+
from ophyd_async.core import StandardReadableFormat as Format
|
|
8
|
+
from ophyd_async.epics.core import EpicsDevice, PvSuffix
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Baton(StandardReadable, EpicsDevice):
|
|
12
|
+
requested_user: A[
|
|
13
|
+
SignalRW[str], PvSuffix("REQUESTED_USER"), Format.HINTED_UNCACHED_SIGNAL
|
|
14
|
+
]
|
|
15
|
+
current_user: A[
|
|
16
|
+
SignalRW[str], PvSuffix("CURRENT_USER"), Format.HINTED_UNCACHED_SIGNAL
|
|
17
|
+
]
|