dls-dodal 1.42.0__py3-none-any.whl → 1.43.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: dls-dodal
3
- Version: 1.42.0
3
+ Version: 1.43.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
@@ -217,7 +217,7 @@ License-File: LICENSE
217
217
  Requires-Dist: click
218
218
  Requires-Dist: ophyd
219
219
  Requires-Dist: ophyd-async>=0.9.0a2
220
- Requires-Dist: bluesky==1.13.0
220
+ Requires-Dist: bluesky
221
221
  Requires-Dist: pyepics
222
222
  Requires-Dist: dataclasses-json
223
223
  Requires-Dist: pillow
@@ -1,6 +1,6 @@
1
1
  dodal/__init__.py,sha256=Ksms_WJF8LTkbm38gEpm1jBpGqcQ8NGvmb2ZJlOE1j8,198
2
2
  dodal/__main__.py,sha256=kP2S2RPitnOWpNGokjZ1Yq-1umOtp5sNOZk2B3tBPLM,111
3
- dodal/_version.py,sha256=ovREbwPKWGv5kafSj2cj_y_IxXNlgemp5GRlT3e-7yQ,513
3
+ dodal/_version.py,sha256=hlNymnCYWZtVYB03GhirN7pxTIz-ic_EgTTGcoOFMh0,513
4
4
  dodal/cli.py,sha256=NieWNUgLUxyck1rHoFAPJjX1xXLzHNdQ-s4wvxYFfps,3757
5
5
  dodal/log.py,sha256=ry8WMq1S4WMIAPqtqGeKuegMRN7Jy3qdVTJlkpKXkL8,9503
6
6
  dodal/utils.py,sha256=nZ_gilv1KErYKnTmknFYaE-JnCC-RxZWQ975cchklFA,19790
@@ -27,7 +27,7 @@ dodal/beamlines/i24.py,sha256=9rBQMCWGdKiRnFbcVvmjiBWiC9WJIJCtLh5m6LkHUtU,7096
27
27
  dodal/beamlines/p38.py,sha256=MwxBqYe_rUIj-MCRIFZpHJmR0JtA22bSFKfBpoDI9P0,5777
28
28
  dodal/beamlines/p45.py,sha256=2snO895TGwf4LbNIvg4BkvAGSfvZcevdpv_82MRpXKo,2129
29
29
  dodal/beamlines/p99.py,sha256=k24QhYpoOHBd0188Fu3wvmpT6dsu8okiIVqVVckdBkw,1063
30
- dodal/beamlines/training_rig.py,sha256=8u1TulTFgvu28sfo6vFY-uo_VBAYKT66ENXTqegw3y0,1940
30
+ dodal/beamlines/training_rig.py,sha256=TzJnKAfL8Nn5nxCyyt9D9-71YnrvmS8oyGavI_N-iv4,1954
31
31
  dodal/common/__init__.py,sha256=ZC4ICKUDB0BDxRaVy8nmqclVmDBne-dPtk6UJsoFq6I,258
32
32
  dodal/common/coordination.py,sha256=OxIjDiO1-9A9KESRPFtzwkvvQlavbgA5RHemlbubBPg,1168
33
33
  dodal/common/crystal_metadata.py,sha256=XGr-X81G9SZvPx5b4nBCH4FOnywyX_zYVy6zwDxIMVM,1926
@@ -35,19 +35,19 @@ dodal/common/maths.py,sha256=K9x7iL3xXLtWYTV-xlFHDNSTIL9a2UP3Ws7wr6Dm2rQ,1803
35
35
  dodal/common/signal_utils.py,sha256=-p4h7xtGPp13t6HTjgFGcs5nN22kVArlkfCPVjpLuRU,1728
36
36
  dodal/common/types.py,sha256=fkL7UOwDbe3v2_VJ5f1W5RxR98Wx-Ra-LxUZWkNDtls,486
37
37
  dodal/common/udc_directory_provider.py,sha256=v5OBaCUwjtQZAsRQUw6LlVL58UvwwDO1l2MKlilXjdk,2403
38
- dodal/common/visit.py,sha256=BLpr3GrP7Ij95V135hRJLgg7gWtBKXVxyOibWtcO8RE,5782
38
+ dodal/common/visit.py,sha256=SfsjH-pf0KubwH1Kteke_OXJej_AW1as-t-ZnrfOtik,7435
39
39
  dodal/common/beamlines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  dodal/common/beamlines/beamline_parameters.py,sha256=oIPHooqu5vTAwfqZutsKbzwdi9nvFF8568Mz7jrK5rI,3618
41
- dodal/common/beamlines/beamline_utils.py,sha256=-FEBuz4fYBclgifAODKaaBB5GIQFhPHPaktGS5c5lWc,5236
41
+ dodal/common/beamlines/beamline_utils.py,sha256=s_9A0woipsS8wEsn4FdaKppKAKEYKbSfL6XGpfKosLI,4977
42
42
  dodal/common/beamlines/device_helpers.py,sha256=lh7eih7KoFiqxo8PLQIDjbpBbhHuAXSeApt7K3KF9to,1002
43
43
  dodal/devices/CTAB.py,sha256=5_261Ox6NG2cJIzzwnjWz289BG0nZoE0wKOaI5V5jqM,1998
44
44
  dodal/devices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
45
  dodal/devices/adsim.py,sha256=vCexraF4zLssHdjfPod-XuQGJE_sWoCttFdx__HDS8w,488
46
46
  dodal/devices/aperture.py,sha256=yyw2ei3gM_lmZWDQ6VTbydB58RCDTen_nqBZyoTP2IM,583
47
- dodal/devices/aperturescatterguard.py,sha256=Md5dDlA8Ua6GpQ0kTwDtz14Y3wKtLUW7Xh-4_7VYgGU,12407
48
- dodal/devices/apple2_undulator.py,sha256=WUmaBAMv1xVDHDUk7sTFb5tobl5BnJlEaS7ZlJBXS-g,20731
49
- dodal/devices/backlight.py,sha256=nQIr3J-I-OXnOUoWmr3ruy3nhq_q2US1KXC4NrGG_2U,1634
50
- dodal/devices/bimorph_mirror.py,sha256=kG9waIdTkKglUrvY_wD9w533oKPqa7fct1-wa_GCFW0,4797
47
+ dodal/devices/aperturescatterguard.py,sha256=kkBAS10HjZG0tOLM1R2ciaNJxdMGk_Mg5HJaFXDEWEU,12422
48
+ dodal/devices/apple2_undulator.py,sha256=R4KDgA4HcFj9zg1rPAEP9E0mKVzE06bhyxNRUrsi3Sw,20826
49
+ dodal/devices/backlight.py,sha256=RcgeA1hE3Z_5jA-jH8S8uLMpBfZjenRLz1lx6HTYeAo,1653
50
+ dodal/devices/bimorph_mirror.py,sha256=D5PkrOggJRVAnv38lTdy8rErKLu_O2juLEvSqwcotxY,4825
51
51
  dodal/devices/cryostream.py,sha256=K-ldpredpeDTzNt4qtQMg99nKJNjBYoXBbK0WJGexzw,656
52
52
  dodal/devices/dcm.py,sha256=JbyxLnrS68nnnv39l9XEWgJgXUBqxX6aFo19MZnL36E,2574
53
53
  dodal/devices/diamond_filter.py,sha256=A--RHd7WuH-IBhvCyENcRCTP4K-mm_Kqpa0pojpHZow,1098
@@ -57,16 +57,16 @@ dodal/devices/fast_grid_scan.py,sha256=SJTolz-LHlkxWA3Fb0lHa90CH8IjyJ1v2vkaaCURG
57
57
  dodal/devices/fluorescence_detector_motion.py,sha256=-1qCSvW0PdT0m6BcoLxrtc0OJ5UDIBsEe11EOLr-gFw,501
58
58
  dodal/devices/flux.py,sha256=1CDsq9yU2-ho8MfYBl50Tl9ABZwpUBHnV486PQXKNoQ,462
59
59
  dodal/devices/focusing_mirror.py,sha256=vdUPkwyCAZBSR3LQ-EojDOoxVy1ZmOaD_nevETbj7BA,6592
60
- dodal/devices/hutch_shutter.py,sha256=oEYrV9V6HLk51_z4bl7H0JYlxrAAZIFF67Fq3lfzI-k,3844
60
+ dodal/devices/hutch_shutter.py,sha256=UvGpsiIQcNW8IGd8ZA8Omus30bSNcVFE1poqO3yK9TE,3859
61
61
  dodal/devices/ipin.py,sha256=eq5jlKw7WGQi8VLrAWpaAIsZmfiVf-5Q0td_B22H6A4,473
62
62
  dodal/devices/linkam3.py,sha256=2sf-_heIsDg4qmqae-w9C2Py8pG8bPB3mT0TFPQIzd0,3869
63
63
  dodal/devices/logging_ophyd_device.py,sha256=dUVE-XhWA56WUXez0mrc4sf322CXY3MVLreTycO5j_A,668
64
64
  dodal/devices/motors.py,sha256=K1df9Pn1ThvsW-g7LrfKWOFaiaQXXUAf2BtbRehzUc4,1108
65
65
  dodal/devices/p45.py,sha256=hoBPpnj3b-njKqmhjAUFb79AyM4qFbWC9tuN6Aa47Rk,1703
66
66
  dodal/devices/pgm.py,sha256=am-AST9iTqma1PkGOKLozqAokZWbJUbM3TNcqXzB-6A,1132
67
- dodal/devices/pressure_jump_cell.py,sha256=QYU3BTA6O8lvWdg8UX81Ya0BCbGz4dirjt0xp2ez7O0,10423
67
+ dodal/devices/pressure_jump_cell.py,sha256=h5nMNtr2PMG_AKM6nOB7qNTYT70GRuiGBwC-Ol2Yby0,10548
68
68
  dodal/devices/qbpm.py,sha256=FfrWWAHHtYv3fGRT1qljyPpAwoHJYfbooT9CfKg-oXI,465
69
- dodal/devices/robot.py,sha256=5Y5lNkAbXooIAkSWHwDKyeKKzlqMeH3TuLHzCsw2FPI,5993
69
+ dodal/devices/robot.py,sha256=4jiWZnPBz3DmvJJdEG6mKIrrWHty2a6bdbCv8KOn1HE,6009
70
70
  dodal/devices/s4_slit_gaps.py,sha256=4KdarIQoRqX4ry3LUS1Km7fkjUFahA0VuTd2DvYEqQ8,446
71
71
  dodal/devices/scatterguard.py,sha256=jx03in9QgaThWxD4t1S8_Llent2kWrn_hThJ9KkUWTk,330
72
72
  dodal/devices/scintillator.py,sha256=PlD6cnJ39PTB_e7QrRspPliLYE4kL_K7ziJURzuxgdA,365
@@ -75,17 +75,17 @@ dodal/devices/smargon.py,sha256=tOHb9fjI8ZCIrboiC4OzS2j1QJDOKkAlQ2SORbBmaGo,4708
75
75
  dodal/devices/status.py,sha256=hVrJS1yooQo6PRumRACoIEh-SKBUKxvBlQl-MtLFUMQ,327
76
76
  dodal/devices/synchrotron.py,sha256=wLfClZ1lYQWA_D--UsM3NnKLG8bY8mvVsRYER6ob-Ew,2026
77
77
  dodal/devices/tetramm.py,sha256=1lNXtWlmq0Pc_gVGD77XrV3ECe38TornDJUXkq3H1i0,8524
78
- dodal/devices/thawer.py,sha256=4t4yF4VDIrT_tQ8RwjmXe_hDMwVjR8A-4rDkPx19b28,1672
78
+ dodal/devices/thawer.py,sha256=mYrO9klUPYcSbpoUuJ4ZuZZEPcHWWaZ2px5jh8XNQ9Y,1675
79
79
  dodal/devices/turbo_slit.py,sha256=2k5ipQOFpDG-E_bYv4Mf7lOUJg0eIBJXEYNsFU6SV7g,1209
80
- dodal/devices/undulator.py,sha256=rQjDhrvgf4uXUEO17CiLopNDEagWOgkmpa02BarozDE,5295
81
- dodal/devices/undulator_dcm.py,sha256=zulVn1wvu4-WEpf0BgLiDet58IsaKV7KW6qruAdRR_s,2391
80
+ dodal/devices/undulator.py,sha256=ZTjdD0bGp4gkfh0uZmA8FsATLCOsGt14gwPwqLezh1M,5302
81
+ dodal/devices/undulator_dcm.py,sha256=olg8FrIKWqGmhJMuzuvJXH-LQTGhKytvXHPso3Br7C0,2398
82
82
  dodal/devices/watsonmarlow323_pump.py,sha256=rwU94YE6esgGLYdh-pe8nBo_3tvgp6brrrbPDrqp5_M,1406
83
83
  dodal/devices/webcam.py,sha256=mef075ynDbzZ4pNAjfxR_9tdTTqF_rM7hAOVEEOV-Do,2408
84
84
  dodal/devices/xbpm_feedback.py,sha256=j8MHhhE0feoe6R54zPKqS5EbQ0bEDR-nOpLHzHhnHHQ,1156
85
85
  dodal/devices/aithre_lasershaping/goniometer.py,sha256=YEl0DEXW4Dl9b3nsyfwrM7FDiwEZCXK-evGxlyOJr8k,512
86
86
  dodal/devices/areadetector/plugins/CAM.py,sha256=sZzJm5Ez3eWfXZi_EB67wluhZmMQm1UyOc2bJFfzd1U,964
87
87
  dodal/devices/areadetector/plugins/MJPG.py,sha256=QTsxCoWbofNpLMGPoOR2hWoM33KyntuLepbF0YmX0KE,3031
88
- dodal/devices/attenuator/attenuator.py,sha256=eHJpM-E4XQfzy1mxGRk754y3n9q6i3youkCqQg_6SUM,3986
88
+ dodal/devices/attenuator/attenuator.py,sha256=Vq9Zsyf56S5fePHGeluImTUtxdwEqttBa2YBIdU5tJU,3993
89
89
  dodal/devices/attenuator/filter.py,sha256=ZoPsTWXjllyMtKBdSIFLB7Cbc88rGof5k3ymL13VczE,422
90
90
  dodal/devices/attenuator/filter_selections.py,sha256=lcmTprCXgSggp2L6uQ6YU0xLMljXvbspAug-WWKCXks,1410
91
91
  dodal/devices/current_amplifiers/__init__.py,sha256=-MhT-t-GJ83rrvTDBCoWub_NKYkRtu4sEj8-y5XZBP0,782
@@ -103,7 +103,7 @@ dodal/devices/detector/detector_motion.py,sha256=UGDQriDWRluDZOZh1mDX9w_fPjMD-_B
103
103
  dodal/devices/i03/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
104
104
  dodal/devices/i03/beamstop.py,sha256=D1-QeGNpNlUE1qtFz-XxgzQGZbvM5bdb09f69yDB7U0,2802
105
105
  dodal/devices/i04/transfocator.py,sha256=sVI4Bgv-2-DH4-F1nIXMp5Aktevrm3agZnCA-WgjmW8,3780
106
- dodal/devices/i10/i10_apple2.py,sha256=pEZes8wVCPHiOOcuVhEtqPvtnyphMxqbdp39mDp6xXQ,13165
106
+ dodal/devices/i10/i10_apple2.py,sha256=ErObNNE59NuYssde6ojWJb8wo3SVohkQsvK0Bjnf1T8,13192
107
107
  dodal/devices/i10/i10_setting_data.py,sha256=69XWgE-YNTiW7C3t67MNcTL5JDDhOo7h-X7DCTpFE5g,164
108
108
  dodal/devices/i10/mirrors.py,sha256=E0M5keGI3LGaDHyXQkCCyj6xmixNY1xTSkIaaYwtnP8,794
109
109
  dodal/devices/i10/slits.py,sha256=4X50bGiJhTIHxhsOrv-8DATBkQPwQgEaFMNa2OsPrFY,1201
@@ -120,7 +120,7 @@ dodal/devices/i18/table.py,sha256=f6OtVSqCFIpXyoHX97CPLpaVDVXUNc2EvgSFP3qVFKo,44
120
120
  dodal/devices/i18/thor_labs_stage.py,sha256=I9JSKY-UqTjN-yBxQWL4CycTNNkUj3vknRrXjA6KZR8,364
121
121
  dodal/devices/i19/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
122
  dodal/devices/i19/hutch_access.py,sha256=K8hYi5gYg46XPw03qFgwoInapYzNGjf4Fgf9Ifi0gAI,308
123
- dodal/devices/i19/shutter.py,sha256=9KmS4NBwvifgJ4FF_FeXIfSEAV7ZkBAfutiu_0SLrAs,2196
123
+ dodal/devices/i19/shutter.py,sha256=RASOmpVaFBPVkCfPR0fddqrGTEWK-VLPIrqJcObHwNE,2211
124
124
  dodal/devices/i20_1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
125
125
  dodal/devices/i22/dcm.py,sha256=SQDh-Sj1OvplHZ9yTWblJwv8PJrUqxseDPupZOWmcLo,4701
126
126
  dodal/devices/i22/fswitch.py,sha256=LSMoo9aDkH0SLcojbUh2NxTWIpUXHZxauTqThc3XtSk,3073
@@ -134,12 +134,12 @@ dodal/devices/i24/dual_backlight.py,sha256=CbQ9mYUNhhozVdNXqR5ac73tEIAWT2RnEpRwX
134
134
  dodal/devices/i24/focus_mirrors.py,sha256=HO3B4yjV-HMvjkgFd2xTvXft75Qj4lN8d0RNg6HJ4Lo,1857
135
135
  dodal/devices/i24/i24_detector_motion.py,sha256=_HgdsZqFYY0tKqUgMzViHaPEUFXL3WlXXioGvDehRUw,364
136
136
  dodal/devices/i24/pilatus_metadata.py,sha256=fV8AQSBYGx1Qc91Rqj8VhcFPqPLqLCePNpDdmhcrTYM,1827
137
- dodal/devices/i24/pmac.py,sha256=lz9FYU_8YN8cC51ddTzdxcUA7MCVTA_ho3P0CHJ9zCo,6837
137
+ dodal/devices/i24/pmac.py,sha256=pghm0jM24N1GZ1EOazPEoSxcn6zyizp6E4H28jnUn1s,6862
138
138
  dodal/devices/i24/vgonio.py,sha256=sxSmcYZayVJPJz_D_91j9PmNor7Tbl1RGQFRrdtESlw,533
139
139
  dodal/devices/oav/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
140
140
  dodal/devices/oav/microns_for_zoom_levels.json,sha256=kJTkbu2v6_Ccc_cDy7FRTX-gRhXxfYskjVqwBCZIqCQ,1209
141
141
  dodal/devices/oav/oav_calculations.py,sha256=tr3Z2pFT7v_enAiNuSZV0esPsiHfRGrj7t0-g_Ix5Do,2363
142
- dodal/devices/oav/oav_detector.py,sha256=jdlgXuxEi0Ojjpt-Bz1KOjYlyQyaWfm0XLRw6-MxsFQ,4325
142
+ dodal/devices/oav/oav_detector.py,sha256=uF-5OAoFZYJwBUJkTTQtB89k3g7nj-XKU8IgheP2I0Q,4330
143
143
  dodal/devices/oav/oav_parameters.py,sha256=gGN73TQGUiRzlIO5YKiqCRkjpTKsV6LFGo7Eu4Vs82g,6074
144
144
  dodal/devices/oav/oav_to_redis_forwarder.py,sha256=pfhaW6Uo_1wDNfywyPkS5UTrY8yhkerhjgJfRMqrJRA,6259
145
145
  dodal/devices/oav/utils.py,sha256=3IvSTw6Ygkaz4Hzoz0eU2l6mljpq0NO57M15e-K4jOE,3182
@@ -155,16 +155,16 @@ dodal/devices/training_rig/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
155
155
  dodal/devices/training_rig/sample_stage.py,sha256=jktTp837ij8wor5LidE3AajCk95L7DebJotMlO7QwTE,355
156
156
  dodal/devices/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
157
157
  dodal/devices/util/adjuster_plans.py,sha256=XpJ1YJKoOCFzj2sonkZYJAdewi3jRaok_2gOmNsfeS0,956
158
- dodal/devices/util/epics_util.py,sha256=A8iNL79PnxntuxPTKA9oLGaDRKhnXaaeAVJwS6FNAWA,4687
158
+ dodal/devices/util/epics_util.py,sha256=3_d0m7BTvN19WIKvz2XSMvoPdTdccg9Z2gOAL-52q4s,4692
159
159
  dodal/devices/util/lookup_tables.py,sha256=3gU9cOBhHBu1S6XqXHWNjCNkV7F4Z-eDlDfesvKbMg4,2185
160
160
  dodal/devices/util/motor_utils.py,sha256=pNY-aUk9LxaIWeDr5rpMS6udiB9j19wcCXkNDLp1uA0,257
161
161
  dodal/devices/util/test_utils.py,sha256=x0QVKVeST4T-wpsVSSm-169MyNRXlmybVWnPTefv1as,565
162
162
  dodal/devices/xspress3/xspress3.py,sha256=75RdPuHpES4Xi-Lcywz0XUhaN2G3vZSoc-dzgcxfNvs,4636
163
163
  dodal/devices/xspress3/xspress3_channel.py,sha256=w8tAx2lz5kJ_LeJ_eb_4o--Dtt8MRijsYNgDG6oEIVg,1626
164
164
  dodal/devices/zebra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
165
- dodal/devices/zebra/zebra.py,sha256=_OA34T9CcgwXxyajVKai2jz4nHVDaEvMkb5eG5eAYKw,9192
165
+ dodal/devices/zebra/zebra.py,sha256=UPryxnhvEb9Y2hefYWbTZShmVKULghftHyO1LVJRLpI,9248
166
166
  dodal/devices/zebra/zebra_constants_mapping.py,sha256=DCWMvBFvmN90rBpZ4aOVF_hbKm4K6QWubsG811R-MK8,4170
167
- dodal/devices/zebra/zebra_controlled_shutter.py,sha256=5-SH5HoXp_6P-xAtfDFJKQq6mBDwreubuCULSz78fgw,1852
167
+ dodal/devices/zebra/zebra_controlled_shutter.py,sha256=tcBq2WQxST9g2VrjVWu-tOomFX-zGLHLNDhYhL0DtHc,1871
168
168
  dodal/devices/zocalo/__init__.py,sha256=dRAZ9o7B9TACqyE7aanT3yzvqWtt019YgV5ZJY7Ylso,517
169
169
  dodal/devices/zocalo/zocalo_constants.py,sha256=vu7Xjz7UNEpBUWEEBxDvP4bVFkZIN6NLGfQDpWbCjH8,98
170
170
  dodal/devices/zocalo/zocalo_interaction.py,sha256=GFukU9xqagQtVSDg5BrL23jxl1w8wjs4b4NLLqdFfpk,3584
@@ -172,9 +172,9 @@ dodal/devices/zocalo/zocalo_results.py,sha256=cmKlgu-42CAu2X2aIgjxmfdUXypF4RHRNR
172
172
  dodal/parameters/experiment_parameter_base.py,sha256=O7JamfuJ5cYHkPf9tsHJPqn-OMHTAGouigvM1cDFehE,313
173
173
  dodal/plan_stubs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
174
174
  dodal/plan_stubs/check_topup.py,sha256=3gyLHfHNQBCgEWuAg4QE-ONx7y2Do1vVv5HP8ss0Z1I,5371
175
- dodal/plan_stubs/data_session.py,sha256=33wPwbs0mtMnle0H76mH_RNTc5omld7gNSJ9BvRdUnM,1570
175
+ dodal/plan_stubs/data_session.py,sha256=PsRrGceZg7M5LkjQZ8DD2FlSX1fmoyhMPgLDXTEX3m4,1873
176
176
  dodal/plan_stubs/motor_utils.py,sha256=4c93U_WgjfmX12uNiztVW2oKxGVWa_SKQdJYCUNmsGU,4653
177
- dodal/plan_stubs/wrapped.py,sha256=nriHKX4BF010CmrhdoUhY3-txClW5W8TPLz64kE_AXU,4533
177
+ dodal/plan_stubs/wrapped.py,sha256=kC8HH7bx3-sLYu2oieY_502tAdT2OECF8n-fqoL5Bfc,4266
178
178
  dodal/plans/__init__.py,sha256=nH1jNxw3DzDMg9O8Uda0kqKIalRVEWBrq07OLY6Ey38,93
179
179
  dodal/plans/save_panda.py,sha256=1fumH7Ih8uDIv8ahAtgQ_vUuR3dz0sfUs4n9TEtEbSs,3053
180
180
  dodal/plans/scanspec.py,sha256=Q0AcvTKRT401iGMRDSqK-D523UX5_ofiVMZ_rNXKOx8,2074
@@ -182,9 +182,9 @@ dodal/plans/verify_undulator_gap.py,sha256=mq2fHtc5o5rSgdTM2xhULOImfjwa6x29tPpeo
182
182
  dodal/plans/wrapped.py,sha256=BPMw__RcWvk9v5XnhMsi9_k4KsDEbmXogzD2n1ecbUg,2098
183
183
  dodal/plans/preprocessors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
184
184
  dodal/plans/preprocessors/verify_undulator_gap.py,sha256=cBZEGq8TW1jrXFXB00iClQVXSEaE_jP_rHMY9WTgYyY,1813
185
- dls_dodal-1.42.0.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
186
- dls_dodal-1.42.0.dist-info/METADATA,sha256=z74PYCHBK1Fi9i9jqxo4P2ss7NEXj5rBn2oRmXg4NH0,16791
187
- dls_dodal-1.42.0.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
188
- dls_dodal-1.42.0.dist-info/entry_points.txt,sha256=bycw_EKUzup_rxfCetOwcauXV4kLln_OPpPT8jEnr-I,94
189
- dls_dodal-1.42.0.dist-info/top_level.txt,sha256=xIozdmZk_wmMV4wugpq9-6eZs0vgADNUKz3j2UAwlhc,6
190
- dls_dodal-1.42.0.dist-info/RECORD,,
185
+ dls_dodal-1.43.0.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
186
+ dls_dodal-1.43.0.dist-info/METADATA,sha256=Vadfd_CXRwb4ymYcIE_1SwbvWWkGxdwCqX86kIkLcLk,16783
187
+ dls_dodal-1.43.0.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
188
+ dls_dodal-1.43.0.dist-info/entry_points.txt,sha256=bycw_EKUzup_rxfCetOwcauXV4kLln_OPpPT8jEnr-I,94
189
+ dls_dodal-1.43.0.dist-info/top_level.txt,sha256=xIozdmZk_wmMV4wugpq9-6eZs0vgADNUKz3j2UAwlhc,6
190
+ dls_dodal-1.43.0.dist-info/RECORD,,
dodal/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '1.42.0'
21
- __version_tuple__ = version_tuple = (1, 42, 0)
20
+ __version__ = version = '1.43.0'
21
+ __version_tuple__ = version_tuple = (1, 43, 0)
@@ -10,7 +10,10 @@ from dodal.common.beamlines.beamline_utils import (
10
10
  )
11
11
  from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
12
12
  from dodal.common.beamlines.device_helpers import DET_SUFFIX, HDF5_SUFFIX
13
- from dodal.common.visit import LocalDirectoryServiceClient, StaticVisitPathProvider
13
+ from dodal.common.visit import (
14
+ LocalDirectoryServiceClient,
15
+ StaticVisitPathProvider,
16
+ )
14
17
  from dodal.devices.training_rig.sample_stage import TrainingRigSampleStage
15
18
  from dodal.log import set_beamline as set_log_beamline
16
19
  from dodal.utils import BeamlinePrefix, get_beamline_name
@@ -31,6 +34,7 @@ PREFIX = BeamlinePrefix(BL)
31
34
  set_log_beamline(BL)
32
35
  set_utils_beamline(BL)
33
36
 
37
+
34
38
  set_path_provider(
35
39
  StaticVisitPathProvider(
36
40
  BL,
@@ -5,11 +5,13 @@ from typing import Annotated, Final, TypeVar, cast
5
5
  from bluesky.run_engine import call_in_bluesky_event_loop
6
6
  from ophyd import Device as OphydV1Device
7
7
  from ophyd.sim import make_fake_device
8
- from ophyd_async.core import DEFAULT_TIMEOUT
8
+ from ophyd_async.core import (
9
+ DEFAULT_TIMEOUT,
10
+ PathProvider,
11
+ )
9
12
  from ophyd_async.core import Device as OphydV2Device
10
13
  from ophyd_async.core import wait_for_connection as v2_device_wait_for_connection
11
14
 
12
- from dodal.common.types import UpdatingPathProvider
13
15
  from dodal.utils import (
14
16
  AnyDevice,
15
17
  BeamlinePrefix,
@@ -22,7 +24,6 @@ DEFAULT_CONNECTION_TIMEOUT: Final[float] = 5.0
22
24
 
23
25
  ACTIVE_DEVICES: dict[str, AnyDevice] = {}
24
26
  BL = ""
25
- PATH_PROVIDER: UpdatingPathProvider | None = None
26
27
 
27
28
 
28
29
  def set_beamline(beamline: str):
@@ -153,15 +154,11 @@ def device_factory(
153
154
  return decorator
154
155
 
155
156
 
156
- def set_path_provider(provider: UpdatingPathProvider):
157
+ def set_path_provider(provider: PathProvider):
157
158
  global PATH_PROVIDER
158
159
 
159
160
  PATH_PROVIDER = provider
160
161
 
161
162
 
162
- def get_path_provider() -> UpdatingPathProvider:
163
- if PATH_PROVIDER is None:
164
- raise ValueError(
165
- "PathProvider has not been set! Ophyd-async StandardDetectors will not be able to write!"
166
- )
163
+ def get_path_provider() -> PathProvider:
167
164
  return PATH_PROVIDER
dodal/common/visit.py CHANGED
@@ -3,7 +3,8 @@ from pathlib import Path
3
3
  from typing import Literal
4
4
 
5
5
  from aiohttp import ClientSession
6
- from ophyd_async.core import FilenameProvider, PathInfo
6
+ from event_model import RunStart
7
+ from ophyd_async.core import FilenameProvider, PathInfo, PathProvider
7
8
  from pydantic import BaseModel
8
9
 
9
10
  from dodal.common.types import UpdatingPathProvider
@@ -150,3 +151,42 @@ class StaticVisitPathProvider(UpdatingPathProvider):
150
151
  return PathInfo(
151
152
  directory_path=self._root, filename=self._filename_provider(device_name)
152
153
  )
154
+
155
+
156
+ DEFAULT_TEMPLATE = "{device_name}-{instrument}-{scan_id}"
157
+
158
+
159
+ class StartDocumentPathProvider(PathProvider):
160
+ """A PathProvider that sources from metadata in a RunStart document.
161
+
162
+ This uses metadata from a RunStart document to determine file names and data session
163
+ directories. The file naming defaults to "{device_name}-{instrument}-{scan_id}", so
164
+ the file name is incremented by scan number. A template can be included in the
165
+ StartDocument to allow for custom naming conventions.
166
+
167
+ """
168
+
169
+ def __init__(self) -> None:
170
+ self._doc = {}
171
+
172
+ def update_run(self, name: str, start_doc: RunStart) -> None:
173
+ """Cache a start document.
174
+
175
+ This can be plugged into the run engine's subscribe method.
176
+ """
177
+ if name == "start":
178
+ self._doc = start_doc
179
+
180
+ def __call__(self, device_name: str | None = None) -> PathInfo:
181
+ """Returns the directory path and filename for a given data_session.
182
+
183
+ The default template for file naming is: "{device_name}-{instrument}-{scan_id}"
184
+ however, this can be changed by providing a template in the start document. For
185
+ example: "template": "custom-{device_name}--{scan_id}".
186
+
187
+ If you do not provide a data_session_directory it will default to "/tmp".
188
+ """
189
+ template = self._doc.get("template", DEFAULT_TEMPLATE)
190
+ sub_path = template.format_map(self._doc | {"device_name": device_name})
191
+ data_session_directory = Path(self._doc.get("data_session_directory", "/tmp"))
192
+ return PathInfo(directory_path=data_session_directory, filename=sub_path)
@@ -123,7 +123,7 @@ def load_positions_from_beamline_parameters(
123
123
  }
124
124
 
125
125
 
126
- class ApertureScatterguard(StandardReadable, Movable, Preparable):
126
+ class ApertureScatterguard(StandardReadable, Movable[ApertureValue], Preparable):
127
127
  """Move the aperture and scatterguard assembly in a safe way. There are two ways to
128
128
  interact with the device depending on if you want simplicity or move flexibility.
129
129
 
@@ -1,7 +1,7 @@
1
1
  import abc
2
2
  import asyncio
3
3
  from dataclasses import dataclass
4
- from typing import Any
4
+ from typing import Any, Generic, TypeVar
5
5
 
6
6
  import numpy as np
7
7
  from bluesky.protocols import Movable
@@ -21,6 +21,8 @@ from pydantic import BaseModel, ConfigDict, RootModel
21
21
 
22
22
  from dodal.log import LOGGER
23
23
 
24
+ T = TypeVar("T")
25
+
24
26
 
25
27
  class UndulatorGateStatus(StrictEnum):
26
28
  OPEN = "Open"
@@ -99,7 +101,7 @@ async def estimate_motor_timeout(
99
101
  return abs((target_pos - cur_pos) * 2.0 / vel) + 1
100
102
 
101
103
 
102
- class SafeUndulatorMover(StandardReadable, Movable):
104
+ class SafeUndulatorMover(StandardReadable, Movable[T], Generic[T]):
103
105
  """A device that will check it's safe to move the undulator before moving it and
104
106
  wait for the undulator to be safe again before calling the move complete.
105
107
  """
@@ -115,7 +117,7 @@ class SafeUndulatorMover(StandardReadable, Movable):
115
117
  super().__init__(name)
116
118
 
117
119
  @AsyncStatus.wrap
118
- async def set(self, value) -> None:
120
+ async def set(self, value: T) -> None:
119
121
  LOGGER.info(f"Setting {self.name} to {value}")
120
122
  await self.raise_if_cannot_move()
121
123
  await self._set_demand_positions(value)
@@ -125,7 +127,7 @@ class SafeUndulatorMover(StandardReadable, Movable):
125
127
  await wait_for_value(self.gate, UndulatorGateStatus.CLOSE, timeout=timeout)
126
128
 
127
129
  @abc.abstractmethod
128
- async def _set_demand_positions(self, value) -> None:
130
+ async def _set_demand_positions(self, value: T) -> None:
129
131
  """Set the demand positions on the device without actually hitting move."""
130
132
 
131
133
  @abc.abstractmethod
@@ -139,7 +141,7 @@ class SafeUndulatorMover(StandardReadable, Movable):
139
141
  raise RuntimeError(f"{self.name} is already in motion.")
140
142
 
141
143
 
142
- class UndulatorGap(SafeUndulatorMover):
144
+ class UndulatorGap(SafeUndulatorMover[float]):
143
145
  """A device with a collection of epics signals to set Apple 2 undulator gap motion.
144
146
  Only PV used by beamline are added the full list is here:
145
147
  /dls_sw/work/R3.14.12.7/support/insertionDevice/db/IDGapVelocityControl.template
@@ -185,7 +187,7 @@ class UndulatorGap(SafeUndulatorMover):
185
187
  self.user_readback = epics_signal_r(float, prefix + "CURRGAPD")
186
188
  super().__init__(self.set_move, prefix, name)
187
189
 
188
- async def _set_demand_positions(self, value) -> None:
190
+ async def _set_demand_positions(self, value: float) -> None:
189
191
  await self.user_setpoint.set(str(value))
190
192
 
191
193
  async def get_timeout(self) -> float:
@@ -234,7 +236,7 @@ class UndulatorPhaseMotor(StandardReadable):
234
236
  super().__init__(name=name)
235
237
 
236
238
 
237
- class UndulatorPhaseAxes(SafeUndulatorMover):
239
+ class UndulatorPhaseAxes(SafeUndulatorMover[Apple2PhasesVal]):
238
240
  """
239
241
  A collection of 4 phase Motor to make up the full id phase motion. We are using the diamond pv convention.
240
242
  e.g. top_outer == Q1
@@ -290,7 +292,7 @@ class UndulatorPhaseAxes(SafeUndulatorMover):
290
292
  return np.max(timeouts)
291
293
 
292
294
 
293
- class UndulatorJawPhase(SafeUndulatorMover):
295
+ class UndulatorJawPhase(SafeUndulatorMover[float]):
294
296
  """
295
297
  A JawPhase movable, this is use for moving the jaw phase which is use to control the
296
298
  linear arbitrary polarisation but only one some of the beamline.
@@ -29,7 +29,7 @@ class ReadOnlyAttenuator(StandardReadable):
29
29
  super().__init__(name)
30
30
 
31
31
 
32
- class BinaryFilterAttenuator(ReadOnlyAttenuator, Movable):
32
+ class BinaryFilterAttenuator(ReadOnlyAttenuator, Movable[float]):
33
33
  """The attenuator will insert filters into the beam to reduce its transmission.
34
34
  In this attenuator, each filter can be in one of two states: IN or OUT
35
35
 
@@ -15,7 +15,7 @@ class BacklightPosition(StrictEnum):
15
15
  OUT = "Out"
16
16
 
17
17
 
18
- class Backlight(StandardReadable, Movable):
18
+ class Backlight(StandardReadable, Movable[BacklightPosition]):
19
19
  """Simple device to trigger the pneumatic in/out."""
20
20
 
21
21
  TIME_TO_MOVE_S = 1.0 # Tested using a stopwatch on the beamline 09/2024
@@ -41,7 +41,7 @@ class BimorphMirrorStatus(StrictEnum):
41
41
  ERROR = "Error"
42
42
 
43
43
 
44
- class BimorphMirrorChannel(StandardReadable, Movable, EpicsDevice):
44
+ class BimorphMirrorChannel(StandardReadable, Movable[float], EpicsDevice):
45
45
  """Collection of PVs comprising a single bimorph channel.
46
46
 
47
47
  Attributes:
@@ -66,7 +66,7 @@ class BimorphMirrorChannel(StandardReadable, Movable, EpicsDevice):
66
66
  await self.output_voltage.set(value)
67
67
 
68
68
 
69
- class BimorphMirror(StandardReadable, Movable):
69
+ class BimorphMirror(StandardReadable, Movable[Mapping[int, float]]):
70
70
  """Class to represent CAENels Bimorph Mirrors.
71
71
 
72
72
  Attributes:
@@ -55,7 +55,7 @@ class HutchInterlock(StandardReadable):
55
55
  return interlock_state == HUTCH_SAFE_FOR_OPERATIONS
56
56
 
57
57
 
58
- class HutchShutter(StandardReadable, Movable):
58
+ class HutchShutter(StandardReadable, Movable[ShutterDemand]):
59
59
  """Device to operate the hutch shutter.
60
60
 
61
61
  When a demand is sent, the device should first check the hutch status \
@@ -175,7 +175,7 @@ class I10Apple2(Apple2):
175
175
  self._available_pol = list(self.lookup_tables["Gap"].keys())
176
176
 
177
177
 
178
- class I10Apple2PGM(StandardReadable, Movable):
178
+ class I10Apple2PGM(StandardReadable, Movable[float]):
179
179
  """
180
180
  Compound device to set both ID and PGM energy at the sample time,poly_deg
181
181
 
@@ -211,7 +211,7 @@ class I10Apple2PGM(StandardReadable, Movable):
211
211
  )
212
212
 
213
213
 
214
- class I10Apple2Pol(StandardReadable, Movable):
214
+ class I10Apple2Pol(StandardReadable, Movable[str]):
215
215
  """
216
216
  Compound device to set polorisation of ID.
217
217
  """
@@ -240,7 +240,7 @@ class I10Apple2Pol(StandardReadable, Movable):
240
240
  ) # Move id to new polarisation
241
241
 
242
242
 
243
- class LinearArbitraryAngle(StandardReadable, Movable):
243
+ class LinearArbitraryAngle(StandardReadable, Movable[SupportsFloat]):
244
244
  """
245
245
  Device to set polorisation angle of the ID. Linear Arbitrary Angle (laa)
246
246
  is the direction of the magnetic field which can be change by varying the jaw_phase
@@ -18,7 +18,7 @@ class HutchState(str, Enum):
18
18
  INVALID = "INVALID"
19
19
 
20
20
 
21
- class HutchConditionalShutter(StandardReadable, Movable):
21
+ class HutchConditionalShutter(StandardReadable, Movable[ShutterDemand]):
22
22
  """ I19-specific device to operate the hutch shutter.
23
23
 
24
24
  This device evaluates the hutch state value to work out which of the two I19 \
dodal/devices/i24/pmac.py CHANGED
@@ -71,7 +71,7 @@ class PMACStringMove(Triggerable):
71
71
  await self.signal_ref().set(self.cmd_string, wait=True)
72
72
 
73
73
 
74
- class PMACStringLaser(Device, Movable):
74
+ class PMACStringLaser(Device, Movable[LaserSettings]):
75
75
  """Set the pmac_string to control the laser."""
76
76
 
77
77
  def __init__(
@@ -90,7 +90,7 @@ class PMACStringLaser(Device, Movable):
90
90
  await self._signal_ref().set(value.value)
91
91
 
92
92
 
93
- class PMACStringEncReset(Device, Movable):
93
+ class PMACStringEncReset(Device, Movable[EncReset]):
94
94
  """Set a pmac_string to control the encoder channels in the controller."""
95
95
 
96
96
  def __init__(
@@ -29,7 +29,7 @@ def _get_correct_zoom_string(zoom: str) -> str:
29
29
  return zoom
30
30
 
31
31
 
32
- class ZoomController(StandardReadable, Movable):
32
+ class ZoomController(StandardReadable, Movable[str]):
33
33
  """
34
34
  Device to control the zoom level. This should be set like
35
35
  o = OAV(name="oav")
@@ -76,7 +76,7 @@ class AllValvesControlState:
76
76
  valve_6: FastValveControlRequest | None = None
77
77
 
78
78
 
79
- class AllValvesControl(StandardReadable, Movable):
79
+ class AllValvesControl(StandardReadable, Movable[AllValvesControlState]):
80
80
  """
81
81
  valves 2, 4, 7, 8 are not controlled by the IOC,
82
82
  as they are under manual control.
@@ -151,7 +151,9 @@ class AllValvesControl(StandardReadable, Movable):
151
151
  )
152
152
 
153
153
 
154
- class ValveControl(StandardReadable, Movable):
154
+ class ValveControl(
155
+ StandardReadable, Movable[ValveControlRequest | ValveOpenSeqRequest]
156
+ ):
155
157
  def __init__(self, prefix: str, name: str = "") -> None:
156
158
  with self.add_children_as_readables():
157
159
  self.close = epics_signal_rw(ValveControlRequest, prefix + ":CON")
@@ -170,7 +172,9 @@ class ValveControl(StandardReadable, Movable):
170
172
  return set_status
171
173
 
172
174
 
173
- class FastValveControl(StandardReadable, Movable):
175
+ class FastValveControl(
176
+ StandardReadable, Movable[FastValveControlRequest | ValveOpenSeqRequest]
177
+ ):
174
178
  def __init__(self, prefix: str, name: str = "") -> None:
175
179
  with self.add_children_as_readables():
176
180
  self.close = epics_signal_rw(FastValveControlRequest, prefix + ":CON")
dodal/devices/robot.py CHANGED
@@ -52,7 +52,7 @@ class ErrorStatus(Device):
52
52
  raise RobotLoadFailed(int(error_code), error_string) from raise_from
53
53
 
54
54
 
55
- class BartRobot(StandardReadable, Movable):
55
+ class BartRobot(StandardReadable, Movable[SampleLocation]):
56
56
  """The sample changing robot."""
57
57
 
58
58
  # How long to wait for the robot if it is busy soaking/drying
dodal/devices/thawer.py CHANGED
@@ -1,6 +1,6 @@
1
1
  from asyncio import Task, create_task, sleep
2
2
 
3
- from bluesky.protocols import Stoppable
3
+ from bluesky.protocols import Movable, Stoppable
4
4
  from ophyd_async.core import (
5
5
  AsyncStatus,
6
6
  Device,
@@ -21,18 +21,18 @@ class ThawerStates(StrictEnum):
21
21
  ON = "On"
22
22
 
23
23
 
24
- class ThawingTimer(Device, Stoppable):
24
+ class ThawingTimer(Device, Stoppable, Movable[float]):
25
25
  def __init__(self, control_signal: SignalRW[ThawerStates]) -> None:
26
26
  self._control_signal_ref = Reference(control_signal)
27
27
  self._thawing_task: Task | None = None
28
28
  super().__init__("thaw_for_time_s")
29
29
 
30
30
  @AsyncStatus.wrap
31
- async def set(self, time_to_thaw_for: float):
31
+ async def set(self, value: float):
32
32
  await self._control_signal_ref().set(ThawerStates.ON)
33
33
  if self._thawing_task and not self._thawing_task.done():
34
34
  raise ThawingException("Thawing task already in progress")
35
- self._thawing_task = create_task(sleep(time_to_thaw_for))
35
+ self._thawing_task = create_task(sleep(value))
36
36
  try:
37
37
  await self._thawing_task
38
38
  finally:
@@ -46,7 +46,7 @@ def _get_closest_gap_for_energy(
46
46
  return table[1][idx]
47
47
 
48
48
 
49
- class Undulator(StandardReadable, Movable):
49
+ class Undulator(StandardReadable, Movable[float]):
50
50
  """
51
51
  An Undulator-type insertion device, used to control photon emission at a given
52
52
  beam energy.
@@ -12,7 +12,7 @@ from .undulator import Undulator
12
12
  ENERGY_TIMEOUT_S: float = 30.0
13
13
 
14
14
 
15
- class UndulatorDCM(StandardReadable, Movable):
15
+ class UndulatorDCM(StandardReadable, Movable[float]):
16
16
  """
17
17
  Composite device to handle changing beamline energies, wraps the Undulator and the
18
18
  DCM. The DCM has a motor which controls the beam energy, when it moves, the
@@ -114,7 +114,7 @@ def call_func(func: Callable[[], StatusBase]) -> StatusBase:
114
114
  return func()
115
115
 
116
116
 
117
- class SetWhenEnabled(OphydAsyncDevice, Movable):
117
+ class SetWhenEnabled(OphydAsyncDevice, Movable[int]):
118
118
  """A device that sets the proc field of a PV when it becomes enabled."""
119
119
 
120
120
  def __init__(self, name: str = "", prefix: str = ""):
@@ -4,6 +4,7 @@ import asyncio
4
4
  from enum import Enum
5
5
  from functools import partialmethod
6
6
 
7
+ from bluesky.protocols import Movable
7
8
  from ophyd_async.core import (
8
9
  AsyncStatus,
9
10
  DeviceVector,
@@ -74,7 +75,7 @@ class SoftInState(StrictEnum):
74
75
  NO = "No"
75
76
 
76
77
 
77
- class ArmingDevice(StandardReadable):
78
+ class ArmingDevice(StandardReadable, Movable[ArmDemand]):
78
79
  """A useful device that can abstract some of the logic of arming.
79
80
  Allows a user to just call arm.set(ArmDemand.ARM)"""
80
81
 
@@ -94,8 +95,8 @@ class ArmingDevice(StandardReadable):
94
95
  return
95
96
 
96
97
  @AsyncStatus.wrap
97
- async def set(self, demand: ArmDemand):
98
- await asyncio.wait_for(self._set_armed(demand), timeout=self.TIMEOUT)
98
+ async def set(self, value: ArmDemand):
99
+ await asyncio.wait_for(self._set_armed(value), timeout=self.TIMEOUT)
99
100
 
100
101
 
101
102
  class PositionCompare(StandardReadable):
@@ -19,7 +19,7 @@ class ZebraShutterControl(StrictEnum):
19
19
  AUTO = "Auto"
20
20
 
21
21
 
22
- class ZebraShutter(StandardReadable, Movable):
22
+ class ZebraShutter(StandardReadable, Movable[ZebraShutterState]):
23
23
  """The shutter on most MX beamlines is controlled by the zebra.
24
24
 
25
25
  Internally in the zebra there are two AND gates, one for manual control and one for
@@ -1,6 +1,9 @@
1
+ import logging
2
+
1
3
  from bluesky import plan_stubs as bps
2
4
  from bluesky import preprocessors as bpp
3
5
  from bluesky.utils import MsgGenerator, make_decorator
6
+ from ophyd_async.core import PathProvider
4
7
 
5
8
  from dodal.common.beamlines.beamline_utils import get_path_provider
6
9
  from dodal.common.types import UpdatingPathProvider
@@ -10,7 +13,7 @@ DATA_GROUPS = "data_groups"
10
13
 
11
14
 
12
15
  def attach_data_session_metadata_wrapper(
13
- plan: MsgGenerator, provider: UpdatingPathProvider | None = None
16
+ plan: MsgGenerator, provider: PathProvider | None = None
14
17
  ) -> MsgGenerator:
15
18
  """
16
19
  Attach data session metadata to the runs within a plan and make it correlate
@@ -30,14 +33,19 @@ def attach_data_session_metadata_wrapper(
30
33
  Yields:
31
34
  Iterator[Msg]: Plan messages
32
35
  """
33
- if provider is None:
34
- provider = get_path_provider()
35
- yield from bps.wait_for([provider.update])
36
- ress = yield from bps.wait_for([provider.data_session])
37
- data_session = ress[0].result()
38
- # https://github.com/DiamondLightSource/dodal/issues/452
39
- # As part of 452, write each dataCollection into their own folder, then can use resource_dir directly
40
- yield from bpp.inject_md_wrapper(plan, md={DATA_SESSION: data_session})
36
+ provider = provider or get_path_provider()
37
+ if isinstance(provider, UpdatingPathProvider):
38
+ yield from bps.wait_for([provider.update])
39
+ ress = yield from bps.wait_for([provider.data_session])
40
+ data_session = ress[0].result()
41
+ # https://github.com/DiamondLightSource/dodal/issues/452
42
+ # As part of 452, write each dataCollection into their own folder, then can use resource_dir directly
43
+ yield from bpp.inject_md_wrapper(plan, md={DATA_SESSION: data_session})
44
+ else:
45
+ logging.warning(
46
+ f"{provider} is not an UpdatingPathProvider, {attach_data_session_metadata_wrapper.__name__} will have no effect"
47
+ )
48
+ yield from plan
41
49
 
42
50
 
43
51
  attach_data_session_metadata_decorator = make_decorator(
@@ -1,6 +1,6 @@
1
1
  import itertools
2
2
  from collections.abc import Mapping
3
- from typing import Annotated, Any
3
+ from typing import Annotated, TypeVar
4
4
 
5
5
  import bluesky.plan_stubs as bps
6
6
  from bluesky.protocols import Movable
@@ -12,17 +12,17 @@ Wrappers for Bluesky built-in plan stubs with type hinting
12
12
 
13
13
  Group = Annotated[str, "String identifier used by 'wait' or stubs that await"]
14
14
 
15
+ T = TypeVar("T")
16
+
15
17
 
16
- # After bluesky 1.14, bounds for stubs that move can be narrowed
17
- # https://github.com/bluesky/bluesky/issues/1821
18
18
  def set_absolute(
19
- movable: Movable, value: Any, group: Group | None = None, wait: bool = False
19
+ movable: Movable[T], value: T, group: Group | None = None, wait: bool = False
20
20
  ) -> MsgGenerator:
21
21
  """
22
22
  Set a device, wrapper for `bp.abs_set`.
23
23
 
24
24
  Args:
25
- movable (Movable): The device to set
25
+ movable (Movable[T]): The device to set
26
26
  value (T): The new value
27
27
  group (Group | None, optional): The message group to associate with the
28
28
  setting, for sequencing. Defaults to None.
@@ -39,7 +39,7 @@ def set_absolute(
39
39
 
40
40
 
41
41
  def set_relative(
42
- movable: Movable, value: Any, group: Group | None = None, wait: bool = False
42
+ movable: Movable[T], value: T, group: Group | None = None, wait: bool = False
43
43
  ) -> MsgGenerator:
44
44
  """
45
45
  Change a device, wrapper for `bp.rel_set`.
@@ -62,7 +62,7 @@ def set_relative(
62
62
  return (yield from bps.rel_set(movable, value, group=group, wait=wait))
63
63
 
64
64
 
65
- def move(moves: Mapping[Movable, Any], group: Group | None = None) -> MsgGenerator:
65
+ def move(moves: Mapping[Movable[T], T], group: Group | None = None) -> MsgGenerator:
66
66
  """
67
67
  Move a device, wrapper for `bp.mv`.
68
68
 
@@ -79,13 +79,12 @@ def move(moves: Mapping[Movable, Any], group: Group | None = None) -> MsgGenerat
79
79
  """
80
80
 
81
81
  return (
82
- # type ignore until https://github.com/bluesky/bluesky/issues/1809
83
- yield from bps.mv(*itertools.chain.from_iterable(moves.items()), group=group) # type: ignore
82
+ yield from bps.mv(*itertools.chain.from_iterable(moves.items()), group=group)
84
83
  )
85
84
 
86
85
 
87
86
  def move_relative(
88
- moves: Mapping[Movable, Any], group: Group | None = None
87
+ moves: Mapping[Movable[T], T], group: Group | None = None
89
88
  ) -> MsgGenerator:
90
89
  """
91
90
  Move a device relative to its current position, wrapper for `bp.mvr`.
@@ -103,8 +102,7 @@ def move_relative(
103
102
  """
104
103
 
105
104
  return (
106
- # type ignore until https://github.com/bluesky/bluesky/issues/1809
107
- yield from bps.mvr(*itertools.chain.from_iterable(moves.items()), group=group) # type: ignore
105
+ yield from bps.mvr(*itertools.chain.from_iterable(moves.items()), group=group)
108
106
  )
109
107
 
110
108