dls-dodal 1.68.0__py3-none-any.whl → 2.0.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.
Files changed (292) hide show
  1. {dls_dodal-1.68.0.dist-info → dls_dodal-2.0.0.dist-info}/METADATA +1 -31
  2. dls_dodal-2.0.0.dist-info/RECORD +354 -0
  3. {dls_dodal-1.68.0.dist-info → dls_dodal-2.0.0.dist-info}/WHEEL +1 -1
  4. dodal/_version.py +2 -2
  5. dodal/beamlines/__init__.py +10 -17
  6. dodal/beamlines/adsim.py +40 -33
  7. dodal/beamlines/b01_1.py +11 -0
  8. dodal/beamlines/b07.py +17 -21
  9. dodal/beamlines/b07_1.py +20 -22
  10. dodal/beamlines/b07_shared.py +12 -0
  11. dodal/beamlines/b16.py +1 -1
  12. dodal/beamlines/b21.py +15 -6
  13. dodal/beamlines/i02_1.py +17 -45
  14. dodal/beamlines/i02_2.py +6 -12
  15. dodal/beamlines/i03.py +8 -5
  16. dodal/beamlines/i03_supervisor.py +19 -0
  17. dodal/beamlines/i04.py +87 -184
  18. dodal/beamlines/i05.py +9 -39
  19. dodal/beamlines/i05_1.py +4 -13
  20. dodal/beamlines/i05_shared.py +51 -0
  21. dodal/beamlines/i06_1.py +26 -0
  22. dodal/beamlines/{i06.py → i06_shared.py} +25 -14
  23. dodal/beamlines/i07.py +14 -16
  24. dodal/beamlines/i09.py +76 -29
  25. dodal/beamlines/i09_1.py +25 -56
  26. dodal/beamlines/i09_1_shared.py +61 -0
  27. dodal/beamlines/i09_2.py +6 -100
  28. dodal/beamlines/i09_2_shared.py +110 -0
  29. dodal/beamlines/i10.py +60 -54
  30. dodal/beamlines/i10_1.py +99 -10
  31. dodal/beamlines/{i10_optics.py → i10_shared.py} +80 -66
  32. dodal/beamlines/i11.py +31 -18
  33. dodal/beamlines/i13_1.py +1 -1
  34. dodal/beamlines/i15.py +6 -6
  35. dodal/beamlines/i15_1.py +6 -6
  36. dodal/beamlines/i16.py +11 -0
  37. dodal/beamlines/i17.py +37 -28
  38. dodal/beamlines/i18.py +3 -4
  39. dodal/beamlines/i19_1.py +95 -34
  40. dodal/beamlines/i19_2.py +68 -52
  41. dodal/beamlines/i19_optics.py +26 -13
  42. dodal/beamlines/i20_1.py +17 -11
  43. dodal/beamlines/i21.py +44 -29
  44. dodal/beamlines/i22.py +19 -4
  45. dodal/beamlines/i23.py +20 -27
  46. dodal/beamlines/i24.py +64 -113
  47. dodal/beamlines/k07.py +99 -5
  48. dodal/beamlines/p38.py +3 -3
  49. dodal/beamlines/p60.py +35 -14
  50. dodal/beamlines/p99.py +16 -15
  51. dodal/beamlines/training_rig.py +20 -12
  52. dodal/cli.py +36 -2
  53. dodal/common/__init__.py +2 -1
  54. dodal/common/beamlines/beamline_parameters.py +2 -1
  55. dodal/common/beamlines/beamline_utils.py +11 -9
  56. dodal/common/beamlines/commissioning_mode.py +6 -3
  57. dodal/common/coordination.py +12 -14
  58. dodal/common/crystal_metadata.py +5 -8
  59. dodal/common/device_utils.py +4 -3
  60. dodal/common/maths.py +87 -19
  61. dodal/common/udc_directory_provider.py +13 -8
  62. dodal/common/visit.py +18 -21
  63. dodal/common/watcher_utils.py +13 -12
  64. dodal/device_manager.py +94 -54
  65. dodal/devices/aperturescatterguard.py +26 -27
  66. dodal/devices/areadetector/plugins/cam.py +1 -3
  67. dodal/devices/areadetector/plugins/mjpg.py +6 -5
  68. dodal/devices/attenuator/attenuator.py +12 -11
  69. dodal/devices/beamlines/b07/__init__.py +3 -0
  70. dodal/devices/{b07_1 → beamlines/b07_1}/__init__.py +2 -2
  71. dodal/devices/{b07_1 → beamlines/b07_1}/ccmc.py +5 -10
  72. dodal/devices/{b16 → beamlines/b16}/detector.py +2 -3
  73. dodal/devices/{i02_1 → beamlines/i02_1}/fast_grid_scan.py +2 -3
  74. dodal/devices/{i02_1 → beamlines/i02_1}/sample_motors.py +1 -1
  75. dodal/devices/{i03 → beamlines/i03}/beamsize.py +11 -7
  76. dodal/devices/{i03 → beamlines/i03}/dcm.py +1 -2
  77. dodal/devices/{i03 → beamlines/i03}/undulator_dcm.py +4 -5
  78. dodal/devices/beamlines/i04/beam_centre.py +151 -0
  79. dodal/devices/{i04 → beamlines/i04}/beamsize.py +11 -7
  80. dodal/devices/beamlines/i04/max_pixel.py +25 -0
  81. dodal/devices/{i04 → beamlines/i04}/murko_results.py +23 -8
  82. dodal/devices/{i04 → beamlines/i04}/transfocator.py +10 -15
  83. dodal/devices/beamlines/i05/__init__.py +3 -0
  84. dodal/devices/beamlines/i06_shared/__init__.py +3 -0
  85. dodal/devices/beamlines/i06_shared/i06_enum.py +7 -0
  86. dodal/devices/{i07 → beamlines/i07}/dcm.py +2 -3
  87. dodal/devices/{i07 → beamlines/i07}/id.py +8 -9
  88. dodal/devices/beamlines/i09/__init__.py +3 -0
  89. dodal/devices/{i09_1_shared → beamlines/i09_1_shared}/hard_energy.py +5 -6
  90. dodal/devices/{i09_1_shared → beamlines/i09_1_shared}/hard_undulator_functions.py +19 -16
  91. dodal/devices/{i10 → beamlines/i10}/diagnostics.py +4 -3
  92. dodal/devices/{i10 → beamlines/i10}/i10_apple2.py +37 -51
  93. dodal/devices/{i10 → beamlines/i10}/rasor/rasor_current_amp.py +1 -24
  94. dodal/devices/{i10 → beamlines/i10}/rasor/rasor_motors.py +2 -2
  95. dodal/devices/{i10 → beamlines/i10}/slits.py +5 -3
  96. dodal/devices/beamlines/i10_1/__init__.py +9 -0
  97. dodal/devices/beamlines/i10_1/electromagnet/magnet.py +16 -0
  98. dodal/devices/beamlines/i10_1/electromagnet/stages.py +14 -0
  99. dodal/devices/beamlines/i10_1/scaler_cards.py +13 -0
  100. dodal/devices/{i11 → beamlines/i11}/cyberstar_blower.py +1 -1
  101. dodal/devices/{i11 → beamlines/i11}/diff_stages.py +4 -6
  102. dodal/devices/{i11 → beamlines/i11}/mythen.py +3 -4
  103. dodal/devices/{i11 → beamlines/i11}/nx100robot.py +6 -6
  104. dodal/devices/{i11 → beamlines/i11}/spinner.py +1 -1
  105. dodal/devices/{i13_1 → beamlines/i13_1}/merlin.py +1 -1
  106. dodal/devices/{i15 → beamlines/i15}/dcm.py +1 -2
  107. dodal/devices/{i15 → beamlines/i15}/focussing_mirror.py +5 -5
  108. dodal/devices/{i15 → beamlines/i15}/jack.py +2 -2
  109. dodal/devices/{i15 → beamlines/i15}/multilayer_mirror.py +1 -1
  110. dodal/devices/{i17 → beamlines/i17}/i17_apple2.py +16 -22
  111. dodal/devices/{i18 → beamlines/i18}/diode.py +1 -1
  112. dodal/devices/{i19 → beamlines/i19}/access_controlled/attenuator_motor_squad.py +12 -8
  113. dodal/devices/{i19 → beamlines/i19}/access_controlled/blueapi_device.py +16 -15
  114. dodal/devices/beamlines/i19/access_controlled/piezo_control.py +72 -0
  115. dodal/devices/{i19 → beamlines/i19}/access_controlled/shutter.py +11 -9
  116. dodal/devices/{i19 → beamlines/i19}/backlight.py +3 -1
  117. dodal/devices/{i19 → beamlines/i19}/mapt_configuration.py +2 -1
  118. dodal/devices/{i19 → beamlines/i19}/pin_col_stages.py +11 -8
  119. dodal/devices/beamlines/i19/pin_tip.py +32 -0
  120. dodal/devices/beamlines/i21/__init__.py +3 -0
  121. dodal/devices/{i22 → beamlines/i22}/dcm.py +1 -2
  122. dodal/devices/{i22 → beamlines/i22}/fswitch.py +1 -3
  123. dodal/devices/{i22 → beamlines/i22}/nxsas.py +5 -4
  124. dodal/devices/{i24 → beamlines/i24}/beam_center.py +1 -1
  125. dodal/devices/{i24 → beamlines/i24}/beamstop.py +2 -2
  126. dodal/devices/{i24 → beamlines/i24}/commissioning_jungfrau.py +12 -12
  127. dodal/devices/{i24 → beamlines/i24}/dcm.py +1 -3
  128. dodal/devices/{i24 → beamlines/i24}/dual_backlight.py +3 -3
  129. dodal/devices/{i24 → beamlines/i24}/pmac.py +9 -7
  130. dodal/devices/{p60 → beamlines/p60}/lab_xray_source.py +1 -1
  131. dodal/devices/beamlines/p99/__init__.py +0 -0
  132. dodal/devices/{p99 → beamlines/p99}/andor2_point.py +11 -15
  133. dodal/devices/bimorph_mirror.py +22 -20
  134. dodal/devices/collimation_table.py +3 -2
  135. dodal/devices/common_dcm.py +30 -20
  136. dodal/devices/controllers.py +2 -2
  137. dodal/devices/cryostream.py +8 -0
  138. dodal/devices/current_amplifiers/current_amplifier.py +16 -18
  139. dodal/devices/current_amplifiers/current_amplifier_detector.py +9 -10
  140. dodal/devices/current_amplifiers/femto.py +8 -9
  141. dodal/devices/current_amplifiers/sr570.py +16 -16
  142. dodal/devices/current_amplifiers/struck_scaler_counter.py +5 -5
  143. dodal/devices/detector/det_resolution.py +9 -8
  144. dodal/devices/detector/detector.py +4 -2
  145. dodal/devices/diamond_filter.py +3 -4
  146. dodal/devices/eiger.py +32 -17
  147. dodal/devices/eiger_odin.py +1 -1
  148. dodal/devices/electron_analyser/base/__init__.py +3 -3
  149. dodal/devices/electron_analyser/base/base_controller.py +32 -21
  150. dodal/devices/electron_analyser/base/base_detector.py +15 -20
  151. dodal/devices/electron_analyser/base/base_driver_io.py +39 -46
  152. dodal/devices/electron_analyser/base/base_enums.py +0 -5
  153. dodal/devices/electron_analyser/base/base_region.py +29 -31
  154. dodal/devices/electron_analyser/base/base_util.py +18 -16
  155. dodal/devices/electron_analyser/base/energy_sources.py +35 -40
  156. dodal/devices/electron_analyser/specs/specs_detector.py +7 -6
  157. dodal/devices/electron_analyser/vgscienta/vgscienta_detector.py +7 -6
  158. dodal/devices/eurotherm.py +3 -2
  159. dodal/devices/fast_grid_scan.py +31 -34
  160. dodal/devices/fast_shutter.py +125 -39
  161. dodal/devices/flux.py +1 -1
  162. dodal/devices/focusing_mirror.py +29 -11
  163. dodal/devices/hutch_shutter.py +6 -6
  164. dodal/devices/insertion_device/__init__.py +20 -8
  165. dodal/devices/insertion_device/apple2_controller.py +371 -0
  166. dodal/devices/insertion_device/apple2_undulator.py +184 -587
  167. dodal/devices/insertion_device/apple_knot_controller.py +222 -0
  168. dodal/devices/insertion_device/energy.py +161 -0
  169. dodal/devices/insertion_device/energy_motor_lookup.py +21 -28
  170. dodal/devices/insertion_device/lookup_table_models.py +47 -52
  171. dodal/devices/insertion_device/polarisation.py +36 -0
  172. dodal/devices/ipin.py +1 -1
  173. dodal/devices/linkam3.py +7 -5
  174. dodal/devices/motors.py +107 -19
  175. dodal/devices/mx_phase1/beamstop.py +2 -4
  176. dodal/devices/oav/oav_calculations.py +20 -13
  177. dodal/devices/oav/oav_detector.py +92 -22
  178. dodal/devices/oav/oav_parameters.py +4 -9
  179. dodal/devices/oav/oav_to_redis_forwarder.py +22 -18
  180. dodal/devices/oav/pin_image_recognition/__init__.py +4 -6
  181. dodal/devices/oav/pin_image_recognition/manual_test.py +1 -2
  182. dodal/devices/oav/pin_image_recognition/utils.py +30 -32
  183. dodal/devices/oav/snapshots/grid_overlay.py +10 -9
  184. dodal/devices/oav/snapshots/snapshot_image_processing.py +15 -13
  185. dodal/devices/oav/utils.py +20 -6
  186. dodal/devices/p45.py +3 -9
  187. dodal/devices/pgm.py +8 -14
  188. dodal/devices/pressure_jump_cell.py +93 -32
  189. dodal/devices/qbpm.py +1 -3
  190. dodal/devices/robot.py +45 -20
  191. dodal/devices/s4_slit_gaps.py +1 -1
  192. dodal/devices/selectable_source.py +41 -0
  193. dodal/devices/slits.py +2 -5
  194. dodal/devices/smargon.py +2 -3
  195. dodal/devices/temperture_controller/lakeshore/lakeshore.py +38 -64
  196. dodal/devices/temperture_controller/lakeshore/lakeshore_io.py +21 -35
  197. dodal/devices/tetramm.py +7 -7
  198. dodal/devices/turbo_slit.py +8 -7
  199. dodal/devices/undulator.py +42 -56
  200. dodal/devices/util/adjuster_plans.py +2 -3
  201. dodal/devices/util/epics_util.py +10 -10
  202. dodal/devices/util/lookup_tables.py +17 -18
  203. dodal/devices/v2f.py +2 -3
  204. dodal/devices/watsonmarlow323_pump.py +1 -1
  205. dodal/devices/xbpm_feedback.py +3 -2
  206. dodal/devices/xspress3/xspress3.py +8 -11
  207. dodal/devices/xspress3/xspress3_channel.py +3 -6
  208. dodal/devices/zebra/zebra.py +21 -7
  209. dodal/devices/zebra/zebra_constants_mapping.py +12 -7
  210. dodal/devices/zebra/zebra_controlled_shutter.py +2 -1
  211. dodal/devices/zocalo/zocalo_interaction.py +14 -14
  212. dodal/devices/zocalo/zocalo_results.py +33 -33
  213. dodal/log.py +23 -20
  214. dodal/plan_stubs/check_topup.py +15 -15
  215. dodal/plan_stubs/data_session.py +6 -6
  216. dodal/plan_stubs/motor_utils.py +22 -18
  217. dodal/plan_stubs/pressure_jump_cell.py +18 -0
  218. dodal/plan_stubs/wrapped.py +40 -55
  219. dodal/plans/bimorph.py +63 -52
  220. dodal/plans/configure_arm_trigger_and_disarm_detector.py +0 -1
  221. dodal/plans/device_setup_plans/__init__.py +5 -0
  222. dodal/plans/device_setup_plans/setup_pin_tip_params.py +63 -0
  223. dodal/plans/preprocessors/verify_undulator_gap.py +10 -8
  224. dodal/plans/spec_path.py +3 -5
  225. dodal/plans/verify_undulator_gap.py +1 -2
  226. dodal/plans/wrapped.py +4 -3
  227. dodal/testing/__init__.py +0 -0
  228. dodal/testing/electron_analyser/device_factory.py +5 -7
  229. dodal/testing/fixtures/devices/apple2.py +38 -0
  230. dodal/testing/fixtures/run_engine.py +3 -7
  231. dodal/testing/fixtures/utils.py +1 -2
  232. dodal/utils.py +60 -58
  233. dls_dodal-1.68.0.dist-info/RECORD +0 -330
  234. dodal/beamline_specific_utils/i05_shared.py +0 -14
  235. dodal/devices/b07/__init__.py +0 -3
  236. dodal/devices/i04/max_pixel.py +0 -38
  237. dodal/devices/i05/__init__.py +0 -3
  238. dodal/devices/i09/__init__.py +0 -3
  239. dodal/devices/i21/__init__.py +0 -5
  240. {dls_dodal-1.68.0.dist-info → dls_dodal-2.0.0.dist-info}/entry_points.txt +0 -0
  241. {dls_dodal-1.68.0.dist-info → dls_dodal-2.0.0.dist-info}/licenses/LICENSE +0 -0
  242. {dls_dodal-1.68.0.dist-info → dls_dodal-2.0.0.dist-info}/top_level.txt +0 -0
  243. /dodal/{beamline_specific_utils → devices/beamlines}/__init__.py +0 -0
  244. /dodal/devices/{b07 → beamlines/b07}/enums.py +0 -0
  245. /dodal/devices/{b07_1 → beamlines/b07_1}/enums.py +0 -0
  246. /dodal/devices/{b16 → beamlines/b16}/__init__.py +0 -0
  247. /dodal/devices/{i02_1 → beamlines/i02_1}/__init__.py +0 -0
  248. /dodal/devices/{i02_2 → beamlines/i02_2}/__init__.py +0 -0
  249. /dodal/devices/{i03 → beamlines/i03}/__init__.py +0 -0
  250. /dodal/devices/{i03 → beamlines/i03}/constants.py +0 -0
  251. /dodal/devices/{i04 → beamlines/i04}/__init__.py +0 -0
  252. /dodal/devices/{i04 → beamlines/i04}/constants.py +0 -0
  253. /dodal/devices/{i05 → beamlines/i05}/enums.py +0 -0
  254. /dodal/devices/{i07 → beamlines/i07}/__init__.py +0 -0
  255. /dodal/devices/{i09 → beamlines/i09}/enums.py +0 -0
  256. /dodal/devices/{i09_1 → beamlines/i09_1}/__init__.py +0 -0
  257. /dodal/devices/{i09_1 → beamlines/i09_1}/enums.py +0 -0
  258. /dodal/devices/{i09_1_shared → beamlines/i09_1_shared}/__init__.py +0 -0
  259. /dodal/devices/{i09_2_shared → beamlines/i09_2_shared}/__init__.py +0 -0
  260. /dodal/devices/{i09_2_shared → beamlines/i09_2_shared}/i09_apple2.py +0 -0
  261. /dodal/devices/{i10 → beamlines/i10}/__init__.py +0 -0
  262. /dodal/devices/{i10 → beamlines/i10}/i10_setting_data.py +0 -0
  263. /dodal/devices/{i10 → beamlines/i10}/mirrors.py +0 -0
  264. /dodal/devices/{i10 → beamlines/i10}/rasor/__init__.py +0 -0
  265. /dodal/devices/{i10 → beamlines/i10}/rasor/rasor_scaler_cards.py +0 -0
  266. /dodal/devices/{i11 → beamlines/i10_1/electromagnet}/__init__.py +0 -0
  267. /dodal/devices/{i13_1 → beamlines/i11}/__init__.py +0 -0
  268. /dodal/devices/{i15 → beamlines/i13_1}/__init__.py +0 -0
  269. /dodal/devices/{i13_1 → beamlines/i13_1}/merlin_controller.py +0 -0
  270. /dodal/devices/{i17 → beamlines/i15}/__init__.py +0 -0
  271. /dodal/devices/{i15 → beamlines/i15}/laue.py +0 -0
  272. /dodal/devices/{i15 → beamlines/i15}/motors.py +0 -0
  273. /dodal/devices/{i15 → beamlines/i15}/rail.py +0 -0
  274. /dodal/devices/{i18 → beamlines/i17}/__init__.py +0 -0
  275. /dodal/devices/{i19 → beamlines/i18}/__init__.py +0 -0
  276. /dodal/devices/{i18 → beamlines/i18}/kb_mirror.py +0 -0
  277. /dodal/devices/{i19/access_controlled → beamlines/i19}/__init__.py +0 -0
  278. /dodal/devices/{i20_1 → beamlines/i19/access_controlled}/__init__.py +0 -0
  279. /dodal/devices/{i19 → beamlines/i19}/access_controlled/hutch_access.py +0 -0
  280. /dodal/devices/{i19 → beamlines/i19}/beamstop.py +0 -0
  281. /dodal/devices/{i19 → beamlines/i19}/diffractometer.py +0 -0
  282. /dodal/devices/{i22 → beamlines/i20_1}/__init__.py +0 -0
  283. /dodal/devices/{i21 → beamlines/i21}/enums.py +0 -0
  284. /dodal/devices/{i24 → beamlines/i22}/__init__.py +0 -0
  285. /dodal/devices/{p99 → beamlines/i24}/__init__.py +0 -0
  286. /dodal/devices/{i24 → beamlines/i24}/aperture.py +0 -0
  287. /dodal/devices/{i24 → beamlines/i24}/focus_mirrors.py +0 -0
  288. /dodal/devices/{i24 → beamlines/i24}/vgonio.py +0 -0
  289. /dodal/devices/{p60 → beamlines/p60}/__init__.py +0 -0
  290. /dodal/devices/{p60 → beamlines/p60}/enums.py +0 -0
  291. /dodal/devices/{p99 → beamlines/p99}/sample_stage.py +0 -0
  292. /dodal/devices/insertion_device/{id_enum.py → enum.py} +0 -0
dodal/beamlines/i10.py CHANGED
@@ -1,29 +1,22 @@
1
- """
2
- note:
3
- I10 has two insertion devices one up(idu) and one down stream(idd).
4
- It is worth noting that the downstream device is slightly longer,
5
- so it can reach Mn edge for linear arbitrary.
6
- idd == id1, idu == id2.
7
- """
8
-
9
- from dodal.common.beamlines.beamline_utils import device_factory
1
+ from dodal.beamlines.i10_shared import devices as i10_shared_devices
10
2
  from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
11
- from dodal.devices.current_amplifiers import CurrentAmpDet
12
- from dodal.devices.i10 import (
3
+ from dodal.device_manager import DeviceManager
4
+ from dodal.devices.beamlines.i10 import (
13
5
  I10Diagnostic,
14
6
  I10Diagnostic5ADet,
15
7
  I10Slits,
16
8
  I10SlitsDrainCurrent,
17
9
  PiezoMirror,
18
10
  )
19
- from dodal.devices.i10.diagnostics import I10Diagnostic, I10Diagnostic5ADet
20
- from dodal.devices.i10.rasor.rasor_current_amp import RasorFemto, RasorSR570
21
- from dodal.devices.i10.rasor.rasor_motors import (
11
+ from dodal.devices.beamlines.i10.diagnostics import I10Diagnostic, I10Diagnostic5ADet
12
+ from dodal.devices.beamlines.i10.rasor.rasor_current_amp import RasorFemto, RasorSR570
13
+ from dodal.devices.beamlines.i10.rasor.rasor_motors import (
22
14
  DetSlits,
23
15
  Diffractometer,
24
16
  PaStage,
25
17
  )
26
- from dodal.devices.i10.rasor.rasor_scaler_cards import RasorScalerCard1
18
+ from dodal.devices.beamlines.i10.rasor.rasor_scaler_cards import RasorScalerCard1
19
+ from dodal.devices.current_amplifiers import CurrentAmpDet
27
20
  from dodal.devices.motors import XYStage, XYZStage
28
21
  from dodal.devices.temperture_controller import (
29
22
  Lakeshore340,
@@ -35,11 +28,12 @@ BL = get_beamline_name("i10")
35
28
  set_log_beamline(BL)
36
29
  set_utils_beamline(BL)
37
30
  PREFIX = BeamlinePrefix(BL)
38
-
31
+ devices = DeviceManager()
32
+ devices.include(i10_shared_devices)
39
33
  """Mirrors"""
40
34
 
41
35
 
42
- @device_factory()
36
+ @devices.factory()
43
37
  def focusing_mirror() -> PiezoMirror:
44
38
  return PiezoMirror(prefix=f"{PREFIX.beamline_prefix}-OP-FOCS-01:")
45
39
 
@@ -47,12 +41,12 @@ def focusing_mirror() -> PiezoMirror:
47
41
  """Optic slits"""
48
42
 
49
43
 
50
- @device_factory()
44
+ @devices.factory()
51
45
  def slits() -> I10Slits:
52
46
  return I10Slits(prefix=f"{PREFIX.beamline_prefix}-AL-SLITS-")
53
47
 
54
48
 
55
- @device_factory()
49
+ @devices.factory()
56
50
  def slits_current() -> I10SlitsDrainCurrent:
57
51
  return I10SlitsDrainCurrent(prefix=f"{PREFIX.beamline_prefix}-")
58
52
 
@@ -60,14 +54,14 @@ def slits_current() -> I10SlitsDrainCurrent:
60
54
  """Diagnostics"""
61
55
 
62
56
 
63
- @device_factory()
57
+ @devices.factory()
64
58
  def diagnostics() -> I10Diagnostic:
65
59
  return I10Diagnostic(
66
60
  prefix=f"{PREFIX.beamline_prefix}-DI-",
67
61
  )
68
62
 
69
63
 
70
- @device_factory()
64
+ @devices.factory()
71
65
  def d5a_det() -> I10Diagnostic5ADet:
72
66
  return I10Diagnostic5ADet(prefix=f"{PREFIX.beamline_prefix}-DI-")
73
67
 
@@ -75,100 +69,112 @@ def d5a_det() -> I10Diagnostic5ADet:
75
69
  """Rasor devices"""
76
70
 
77
71
 
78
- @device_factory()
72
+ @devices.factory()
79
73
  def pin_hole() -> XYStage:
80
74
  return XYStage(prefix="ME01D-EA-PINH-01:")
81
75
 
82
76
 
83
- @device_factory()
77
+ @devices.factory()
84
78
  def det_slits() -> DetSlits:
85
79
  return DetSlits(prefix="ME01D-MO-APTR-0")
86
80
 
87
81
 
88
- @device_factory()
82
+ @devices.factory()
89
83
  def diffractometer() -> Diffractometer:
90
84
  return Diffractometer(prefix="ME01D-MO-DIFF-01:")
91
85
 
92
86
 
93
- @device_factory()
87
+ @devices.factory()
94
88
  def pa_stage() -> PaStage:
95
89
  return PaStage(prefix="ME01D-MO-POLAN-01:")
96
90
 
97
91
 
98
- @device_factory()
92
+ @devices.factory()
99
93
  def sample_stage() -> XYZStage:
100
94
  return XYZStage(prefix="ME01D-MO-CRYO-01:")
101
95
 
102
96
 
103
- @device_factory()
97
+ @devices.factory()
104
98
  def rasor_temperature_controller() -> Lakeshore340:
105
99
  return Lakeshore340(
106
100
  prefix="ME01D-EA-TCTRL-01:",
107
101
  )
108
102
 
109
103
 
110
- @device_factory()
104
+ @devices.factory()
111
105
  def rasor_femto() -> RasorFemto:
112
106
  return RasorFemto(
113
107
  prefix="ME01D-EA-IAMP",
114
108
  )
115
109
 
116
110
 
117
- @device_factory()
111
+ @devices.factory()
118
112
  def rasor_det_scalers() -> RasorScalerCard1:
119
113
  return RasorScalerCard1(prefix="ME01D-EA-SCLR-01:SCALER1")
120
114
 
121
115
 
122
- @device_factory()
116
+ @devices.factory()
123
117
  def rasor_sr570() -> RasorSR570:
124
118
  return RasorSR570(
125
119
  prefix="ME01D-EA-IAMP",
126
120
  )
127
121
 
128
122
 
129
- @device_factory()
130
- def rasor_sr570_pa_scaler_det() -> CurrentAmpDet:
123
+ @devices.factory()
124
+ def rasor_sr570_pa_scaler_det(
125
+ rasor_sr570: RasorSR570, rasor_det_scalers: RasorScalerCard1
126
+ ) -> CurrentAmpDet:
131
127
  return CurrentAmpDet(
132
- current_amp=rasor_sr570().ca1,
133
- counter=rasor_det_scalers().det,
128
+ current_amp=rasor_sr570.ca1,
129
+ counter=rasor_det_scalers.det,
134
130
  )
135
131
 
136
132
 
137
- @device_factory()
138
- def rasor_femto_pa_scaler_det() -> CurrentAmpDet:
133
+ @devices.factory()
134
+ def rasor_femto_pa_scaler_det(
135
+ rasor_femto: RasorFemto, rasor_det_scalers: RasorScalerCard1
136
+ ) -> CurrentAmpDet:
139
137
  return CurrentAmpDet(
140
- current_amp=rasor_femto().ca1,
141
- counter=rasor_det_scalers().det,
138
+ current_amp=rasor_femto.ca1,
139
+ counter=rasor_det_scalers.det,
142
140
  )
143
141
 
144
142
 
145
- @device_factory()
146
- def rasor_sr570_fluo_scaler_det() -> CurrentAmpDet:
143
+ @devices.factory()
144
+ def rasor_sr570_fluo_scaler_det(
145
+ rasor_sr570: RasorSR570, rasor_det_scalers: RasorScalerCard1
146
+ ) -> CurrentAmpDet:
147
147
  return CurrentAmpDet(
148
- current_amp=rasor_sr570().ca2,
149
- counter=rasor_det_scalers().fluo,
148
+ current_amp=rasor_sr570.ca2,
149
+ counter=rasor_det_scalers.fluo,
150
150
  )
151
151
 
152
152
 
153
- @device_factory()
154
- def rasor_femto_fluo_scaler_det() -> CurrentAmpDet:
153
+ @devices.factory()
154
+ def rasor_femto_fluo_scaler_det(
155
+ rasor_femto: RasorFemto, rasor_det_scalers: RasorScalerCard1
156
+ ) -> CurrentAmpDet:
155
157
  return CurrentAmpDet(
156
- current_amp=rasor_femto().ca2,
157
- counter=rasor_det_scalers().fluo,
158
+ current_amp=rasor_femto.ca2,
159
+ counter=rasor_det_scalers.fluo,
158
160
  )
159
161
 
160
162
 
161
- @device_factory()
162
- def rasor_sr570_drain_scaler_det() -> CurrentAmpDet:
163
+ @devices.factory()
164
+ def rasor_sr570_drain_scaler_det(
165
+ rasor_sr570: RasorSR570, rasor_det_scalers: RasorScalerCard1
166
+ ) -> CurrentAmpDet:
163
167
  return CurrentAmpDet(
164
- current_amp=rasor_sr570().ca3,
165
- counter=rasor_det_scalers().drain,
168
+ current_amp=rasor_sr570.ca3,
169
+ counter=rasor_det_scalers.drain,
166
170
  )
167
171
 
168
172
 
169
- @device_factory()
170
- def rasor_femto_drain_scaler_det() -> CurrentAmpDet:
173
+ @devices.factory()
174
+ def rasor_femto_drain_scaler_det(
175
+ rasor_femto: RasorFemto, rasor_det_scalers: RasorScalerCard1
176
+ ) -> CurrentAmpDet:
171
177
  return CurrentAmpDet(
172
- current_amp=rasor_femto().ca3,
173
- counter=rasor_det_scalers().drain,
178
+ current_amp=rasor_femto.ca3,
179
+ counter=rasor_det_scalers.drain,
174
180
  )
dodal/beamlines/i10_1.py CHANGED
@@ -1,6 +1,13 @@
1
- from dodal.common.beamlines.beamline_utils import device_factory
1
+ from dodal.beamlines.i10_shared import devices as i10_shared_devices
2
2
  from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
3
- from dodal.devices.i10 import I10JDiagnostic, I10JSlits, PiezoMirror
3
+ from dodal.device_manager import DeviceManager
4
+ from dodal.devices.beamlines.i10 import I10JDiagnostic, I10JSlits, PiezoMirror
5
+ from dodal.devices.beamlines.i10_1 import (
6
+ ElectromagnetMagnetField,
7
+ ElectromagnetStage,
8
+ I10JScalerCard,
9
+ )
10
+ from dodal.devices.current_amplifiers import SR570, CurrentAmpDet
4
11
  from dodal.devices.temperture_controller.lakeshore.lakeshore import Lakeshore336
5
12
  from dodal.log import set_beamline as set_log_beamline
6
13
  from dodal.utils import BeamlinePrefix, get_beamline_name
@@ -9,27 +16,109 @@ BL = get_beamline_name("i10-1")
9
16
  set_log_beamline(BL)
10
17
  set_utils_beamline(BL)
11
18
  PREFIX = BeamlinePrefix("i10", "J")
19
+ devices = DeviceManager()
20
+ devices.include(i10_shared_devices)
12
21
 
22
+ """I10J Beamline Devices"""
13
23
 
14
- @device_factory()
15
- def em_temperature_controller() -> Lakeshore336:
16
- return Lakeshore336(
17
- prefix=f"{PREFIX.beamline_prefix}-EA-TCTRL-41:",
18
- )
24
+
25
+ @devices.factory()
26
+ def mirror6_sr570() -> SR570:
27
+ return SR570(prefix=f"{PREFIX.beamline_prefix}-DI-IAMP-07:")
19
28
 
20
29
 
21
- @device_factory()
30
+ @devices.factory()
22
31
  def slits() -> I10JSlits:
23
32
  return I10JSlits(prefix=f"{PREFIX.beamline_prefix}-AL-SLITS-")
24
33
 
25
34
 
26
- @device_factory()
35
+ @devices.factory()
27
36
  def diagnostic() -> I10JDiagnostic:
28
37
  return I10JDiagnostic(
29
38
  prefix=f"{PREFIX.beamline_prefix}-DI-",
30
39
  )
31
40
 
32
41
 
33
- @device_factory()
42
+ @devices.factory()
34
43
  def focusing_mirror() -> PiezoMirror:
35
44
  return PiezoMirror(prefix=f"{PREFIX.beamline_prefix}-OP-FOCA-01:")
45
+
46
+
47
+ """I10J Electromagnet Devices"""
48
+
49
+
50
+ @devices.factory()
51
+ def electromagnet_field() -> ElectromagnetMagnetField:
52
+ return ElectromagnetMagnetField(
53
+ prefix=f"{PREFIX.beamline_prefix}-EA-MAGC-01:",
54
+ )
55
+
56
+
57
+ @devices.factory()
58
+ def electromagnet_stage() -> ElectromagnetStage:
59
+ return ElectromagnetStage(
60
+ prefix=f"{PREFIX.beamline_prefix}-MO-CRYO-01:",
61
+ )
62
+
63
+
64
+ """I10J Electromagnet Measurement Devices"""
65
+
66
+
67
+ @devices.factory()
68
+ def electromagnet_scaler_card() -> I10JScalerCard:
69
+ return I10JScalerCard(
70
+ prefix=f"{PREFIX.beamline_prefix}-EA-SCLR-02:SCALERJ3",
71
+ )
72
+
73
+
74
+ @devices.factory()
75
+ def em_sr570_tey() -> SR570:
76
+ return SR570(
77
+ prefix=f"{PREFIX.beamline_prefix}-DI-IAMP-08:",
78
+ )
79
+
80
+
81
+ @devices.factory()
82
+ def em_sr570_fy() -> SR570:
83
+ return SR570(
84
+ prefix=f"{PREFIX.beamline_prefix}-DI-IAMP-09:",
85
+ )
86
+
87
+
88
+ @devices.factory()
89
+ def electromagnet_sr570_scaler_monitor(
90
+ mirror6_sr570: SR570,
91
+ electromagnet_scaler_card: I10JScalerCard,
92
+ ) -> CurrentAmpDet:
93
+ return CurrentAmpDet(
94
+ current_amp=mirror6_sr570, counter=electromagnet_scaler_card.mon
95
+ )
96
+
97
+
98
+ @devices.factory()
99
+ def electromagnet_sr570_scaler_tey(
100
+ em_sr570_tey: SR570,
101
+ electromagnet_scaler_card: I10JScalerCard,
102
+ ) -> CurrentAmpDet:
103
+ return CurrentAmpDet(
104
+ current_amp=em_sr570_tey,
105
+ counter=electromagnet_scaler_card.tey,
106
+ )
107
+
108
+
109
+ @devices.factory()
110
+ def electromagnet_sr570_scaler_fy(
111
+ em_sr570_fy: SR570,
112
+ electromagnet_scaler_card: I10JScalerCard,
113
+ ) -> CurrentAmpDet:
114
+ return CurrentAmpDet(
115
+ current_amp=em_sr570_fy,
116
+ counter=electromagnet_scaler_card.fy,
117
+ )
118
+
119
+
120
+ @devices.factory()
121
+ def em_temperature_controller() -> Lakeshore336:
122
+ return Lakeshore336(
123
+ prefix=f"{PREFIX.beamline_prefix}-EA-TCTRL-41:",
124
+ )
@@ -1,31 +1,30 @@
1
- """
2
- note:
3
- I10 has two insertion devices one up(idu) and one down stream(idd).
4
- It is worth noting that the downstream device is slightly longer,
5
- so it can reach Mn edge for linear arbitrary.
6
- idd == id1, idu == id2.
1
+ """note:
2
+ I10 has two insertion devices one up(idu) and one down stream(idd).
3
+ It is worth noting that the downstream device is slightly longer,
4
+ so it can reach Mn edge for linear arbitrary.
5
+ idd == id1, idu == id2.
7
6
  """
8
7
 
9
8
  from pathlib import Path
10
9
 
11
10
  from daq_config_server.client import ConfigServer
12
11
 
13
- from dodal.common.beamlines.beamline_utils import device_factory
14
12
  from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
15
- from dodal.devices.i10 import (
13
+ from dodal.device_manager import DeviceManager
14
+ from dodal.devices.beamlines.i10 import (
16
15
  I10SharedDiagnostic,
17
16
  I10SharedSlits,
18
17
  I10SharedSlitsDrainCurrent,
19
18
  PiezoMirror,
20
19
  )
21
- from dodal.devices.i10.i10_apple2 import (
20
+ from dodal.devices.beamlines.i10.i10_apple2 import (
22
21
  I10Apple2,
23
22
  I10Apple2Controller,
24
23
  LinearArbitraryAngle,
25
24
  )
26
25
 
27
26
  # Imports taken from i10 while we work out how to deal with split end stations
28
- from dodal.devices.i10.i10_setting_data import I10Grating
27
+ from dodal.devices.beamlines.i10.i10_setting_data import I10Grating
29
28
  from dodal.devices.insertion_device import (
30
29
  BeamEnergy,
31
30
  InsertionDeviceEnergy,
@@ -52,9 +51,10 @@ BL = get_beamline_name("i10")
52
51
  set_log_beamline(BL)
53
52
  set_utils_beamline(BL)
54
53
  PREFIX = BeamlinePrefix(BL)
54
+ devices = DeviceManager()
55
55
 
56
56
 
57
- @device_factory()
57
+ @devices.factory()
58
58
  def synchrotron() -> Synchrotron:
59
59
  return Synchrotron()
60
60
 
@@ -62,14 +62,16 @@ def synchrotron() -> Synchrotron:
62
62
  """Mirrors"""
63
63
 
64
64
 
65
- @device_factory()
65
+ @devices.factory()
66
66
  def first_mirror() -> PiezoMirror:
67
67
  return PiezoMirror(prefix=f"{PREFIX.beamline_prefix}-OP-COL-01:")
68
68
 
69
69
 
70
- @device_factory()
70
+ @devices.factory()
71
71
  def pgm() -> PlaneGratingMonochromator:
72
- "I10 Plane Grating Monochromator, it can change energy via pgm.energy.set(<energy>)"
72
+ """I10 Plane Grating Monochromator, it can change energy via
73
+ pgm.energy.set(<energy>).
74
+ """
73
75
  return PlaneGratingMonochromator(
74
76
  prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
75
77
  grating=I10Grating,
@@ -77,7 +79,7 @@ def pgm() -> PlaneGratingMonochromator:
77
79
  )
78
80
 
79
81
 
80
- @device_factory()
82
+ @devices.factory()
81
83
  def switching_mirror() -> PiezoMirror:
82
84
  return PiezoMirror(prefix=f"{PREFIX.beamline_prefix}-OP-SWTCH-01:")
83
85
 
@@ -89,12 +91,12 @@ I10_CONF_CLIENT = ConfigServer(url="https://daq-config.diamond.ac.uk")
89
91
  LOOK_UPTABLE_DIR = "/dls_sw/i10/software/gda/workspace_git/gda-diamond.git/configurations/i10-shared/lookupTables/"
90
92
 
91
93
 
92
- @device_factory()
94
+ @devices.factory()
93
95
  def idd_gap() -> UndulatorGap:
94
96
  return UndulatorGap(prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:")
95
97
 
96
98
 
97
- @device_factory()
99
+ @devices.factory()
98
100
  def idd_phase() -> UndulatorPhaseAxes:
99
101
  return UndulatorPhaseAxes(
100
102
  prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
@@ -105,7 +107,7 @@ def idd_phase() -> UndulatorPhaseAxes:
105
107
  )
106
108
 
107
109
 
108
- @device_factory()
110
+ @devices.factory()
109
111
  def idd_jaw_phase() -> UndulatorJawPhase:
110
112
  return UndulatorJawPhase(
111
113
  prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
@@ -113,16 +115,18 @@ def idd_jaw_phase() -> UndulatorJawPhase:
113
115
  )
114
116
 
115
117
 
116
- @device_factory()
117
- def idd() -> I10Apple2:
118
- """i10 downstream insertion device:"""
119
- return I10Apple2(
120
- id_gap=idd_gap(), id_phase=idd_phase(), id_jaw_phase=idd_jaw_phase()
121
- )
118
+ @devices.factory()
119
+ def idd(
120
+ idd_gap: UndulatorGap,
121
+ idd_phase: UndulatorPhaseAxes,
122
+ idd_jaw_phase: UndulatorJawPhase,
123
+ ) -> I10Apple2:
124
+ """i10 downstream insertion device."""
125
+ return I10Apple2(id_gap=idd_gap, id_phase=idd_phase, id_jaw_phase=idd_jaw_phase)
122
126
 
123
127
 
124
- @device_factory()
125
- def idd_controller() -> I10Apple2Controller:
128
+ @devices.factory()
129
+ def idd_controller(idd: I10Apple2) -> I10Apple2Controller:
126
130
  """I10 downstream insertion device controller."""
127
131
  source = Source(column="Source", value="idd")
128
132
  idd_gap_energy_motor_lut = ConfigServerEnergyMotorLookup(
@@ -136,39 +140,43 @@ def idd_controller() -> I10Apple2Controller:
136
140
  path=Path(LOOK_UPTABLE_DIR, DEFAULT_PHASE_FILE),
137
141
  )
138
142
  return I10Apple2Controller(
139
- apple2=idd(),
143
+ apple2=idd,
140
144
  gap_energy_motor_lut=idd_gap_energy_motor_lut,
141
145
  phase_energy_motor_lut=idd_phase_energy_motor_lut,
142
146
  )
143
147
 
144
148
 
145
- @device_factory()
146
- def idd_energy() -> InsertionDeviceEnergy:
147
- return InsertionDeviceEnergy(id_controller=idd_controller())
149
+ @devices.factory()
150
+ def idd_energy(idd_controller: I10Apple2Controller) -> InsertionDeviceEnergy:
151
+ return InsertionDeviceEnergy(id_controller=idd_controller)
148
152
 
149
153
 
150
- @device_factory()
151
- def idd_polarisation() -> InsertionDevicePolarisation:
152
- return InsertionDevicePolarisation(id_controller=idd_controller())
154
+ @devices.factory()
155
+ def idd_polarisation(
156
+ idd_controller: I10Apple2Controller,
157
+ ) -> InsertionDevicePolarisation:
158
+ return InsertionDevicePolarisation(id_controller=idd_controller)
153
159
 
154
160
 
155
- @device_factory()
156
- def idd_laa() -> LinearArbitraryAngle:
157
- return LinearArbitraryAngle(id_controller=idd_controller())
161
+ @devices.factory()
162
+ def idd_laa(idd_controller: I10Apple2Controller) -> LinearArbitraryAngle:
163
+ return LinearArbitraryAngle(id_controller=idd_controller)
158
164
 
159
165
 
160
- @device_factory()
161
- def energy_dd() -> BeamEnergy:
166
+ @devices.factory()
167
+ def energy_dd(
168
+ idd_energy: InsertionDeviceEnergy, pgm: PlaneGratingMonochromator
169
+ ) -> BeamEnergy:
162
170
  """Beam energy from down energy devices."""
163
- return BeamEnergy(id_energy=idd_energy(), mono=pgm().energy)
171
+ return BeamEnergy(id_energy=idd_energy, mono=pgm.energy)
164
172
 
165
173
 
166
- @device_factory()
174
+ @devices.factory()
167
175
  def idu_gap() -> UndulatorGap:
168
176
  return UndulatorGap(prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-21:")
169
177
 
170
178
 
171
- @device_factory()
179
+ @devices.factory()
172
180
  def idu_phase() -> UndulatorPhaseAxes:
173
181
  return UndulatorPhaseAxes(
174
182
  prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-21:",
@@ -179,7 +187,7 @@ def idu_phase() -> UndulatorPhaseAxes:
179
187
  )
180
188
 
181
189
 
182
- @device_factory()
190
+ @devices.factory()
183
191
  def idu_jaw_phase() -> UndulatorJawPhase:
184
192
  return UndulatorJawPhase(
185
193
  prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-21:",
@@ -187,16 +195,18 @@ def idu_jaw_phase() -> UndulatorJawPhase:
187
195
  )
188
196
 
189
197
 
190
- @device_factory()
191
- def idu() -> I10Apple2:
192
- """i10 upstream insertion device"""
193
- return I10Apple2(
194
- id_gap=idu_gap(), id_phase=idu_phase(), id_jaw_phase=idu_jaw_phase()
195
- )
198
+ @devices.factory()
199
+ def idu(
200
+ idu_gap: UndulatorGap,
201
+ idu_phase: UndulatorPhaseAxes,
202
+ idu_jaw_phase: UndulatorJawPhase,
203
+ ) -> I10Apple2:
204
+ """i10 upstream insertion device."""
205
+ return I10Apple2(id_gap=idu_gap, id_phase=idu_phase, id_jaw_phase=idu_jaw_phase)
196
206
 
197
207
 
198
- @device_factory()
199
- def idu_controller() -> I10Apple2Controller:
208
+ @devices.factory()
209
+ def idu_controller(idd: I10Apple2) -> I10Apple2Controller:
200
210
  """I10 upstream insertion device controller."""
201
211
  source = Source(column="Source", value="idu")
202
212
  idu_gap_energy_motor_lut = ConfigServerEnergyMotorLookup(
@@ -210,37 +220,41 @@ def idu_controller() -> I10Apple2Controller:
210
220
  path=Path(LOOK_UPTABLE_DIR, DEFAULT_PHASE_FILE),
211
221
  )
212
222
  return I10Apple2Controller(
213
- apple2=idd(),
223
+ apple2=idd,
214
224
  gap_energy_motor_lut=idu_gap_energy_motor_lut,
215
225
  phase_energy_motor_lut=idu_phase_energy_motor_lut,
216
226
  )
217
227
 
218
228
 
219
- @device_factory()
220
- def idu_energy() -> InsertionDeviceEnergy:
221
- return InsertionDeviceEnergy(id_controller=idu_controller())
229
+ @devices.factory()
230
+ def idu_energy(idu_controller: I10Apple2Controller) -> InsertionDeviceEnergy:
231
+ return InsertionDeviceEnergy(id_controller=idu_controller)
222
232
 
223
233
 
224
- @device_factory()
225
- def idu_polarisation() -> InsertionDevicePolarisation:
226
- return InsertionDevicePolarisation(id_controller=idu_controller())
234
+ @devices.factory()
235
+ def idu_polarisation(
236
+ idu_controller: I10Apple2Controller,
237
+ ) -> InsertionDevicePolarisation:
238
+ return InsertionDevicePolarisation(id_controller=idu_controller)
227
239
 
228
240
 
229
- @device_factory()
230
- def idu_laa() -> LinearArbitraryAngle:
231
- return LinearArbitraryAngle(id_controller=idu_controller())
241
+ @devices.factory()
242
+ def idu_laa(idu_controller: I10Apple2Controller) -> LinearArbitraryAngle:
243
+ return LinearArbitraryAngle(id_controller=idu_controller)
232
244
 
233
245
 
234
- @device_factory()
235
- def energy_ud() -> BeamEnergy:
246
+ @devices.factory()
247
+ def energy_ud(
248
+ idu_energy: InsertionDeviceEnergy, pgm: PlaneGratingMonochromator
249
+ ) -> BeamEnergy:
236
250
  """Beam energy from down energy devices."""
237
- return BeamEnergy(id_energy=idu_energy(), mono=pgm().energy)
251
+ return BeamEnergy(id_energy=idu_energy, mono=pgm.energy)
238
252
 
239
253
 
240
254
  """Slits"""
241
255
 
242
256
 
243
- @device_factory()
257
+ @devices.factory()
244
258
  def optics_slits() -> I10SharedSlits:
245
259
  return I10SharedSlits(prefix=f"{PREFIX.beamline_prefix}-AL-SLITS-")
246
260
 
@@ -248,13 +262,13 @@ def optics_slits() -> I10SharedSlits:
248
262
  """Diagnostics"""
249
263
 
250
264
 
251
- @device_factory()
265
+ @devices.factory()
252
266
  def optics_diagnostics() -> I10SharedDiagnostic:
253
267
  return I10SharedDiagnostic(
254
268
  prefix=f"{PREFIX.beamline_prefix}-DI-",
255
269
  )
256
270
 
257
271
 
258
- @device_factory()
272
+ @devices.factory()
259
273
  def optics_slits_current() -> I10SharedSlitsDrainCurrent:
260
274
  return I10SharedSlitsDrainCurrent(prefix=f"{PREFIX.beamline_prefix}-")