dls-dodal 1.55.1__py3-none-any.whl → 1.56.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 (98) hide show
  1. {dls_dodal-1.55.1.dist-info → dls_dodal-1.56.0.dist-info}/METADATA +2 -2
  2. {dls_dodal-1.55.1.dist-info → dls_dodal-1.56.0.dist-info}/RECORD +97 -83
  3. dodal/_version.py +16 -3
  4. dodal/beamlines/b01_1.py +6 -1
  5. dodal/beamlines/b07.py +2 -1
  6. dodal/beamlines/b07_1.py +2 -1
  7. dodal/beamlines/b21.py +4 -24
  8. dodal/beamlines/i03.py +53 -53
  9. dodal/beamlines/i04.py +16 -38
  10. dodal/beamlines/i09.py +3 -2
  11. dodal/beamlines/i09_1.py +2 -1
  12. dodal/beamlines/i11.py +143 -0
  13. dodal/beamlines/i19_1.py +1 -0
  14. dodal/beamlines/i19_2.py +7 -0
  15. dodal/beamlines/i22.py +2 -2
  16. dodal/beamlines/i23.py +3 -3
  17. dodal/beamlines/i24.py +6 -14
  18. dodal/beamlines/p38.py +1 -0
  19. dodal/beamlines/p60.py +3 -2
  20. dodal/cli.py +11 -1
  21. dodal/common/__init__.py +4 -0
  22. dodal/common/beamlines/beamline_parameters.py +1 -1
  23. dodal/common/beamlines/beamline_utils.py +5 -1
  24. dodal/common/enums.py +19 -0
  25. dodal/common/watcher_utils.py +83 -0
  26. dodal/devices/aithre_lasershaping/laser_robot.py +4 -9
  27. dodal/devices/aperturescatterguard.py +52 -12
  28. dodal/devices/apple2_undulator.py +0 -1
  29. dodal/devices/b16/detector.py +1 -10
  30. dodal/devices/backlight.py +8 -20
  31. dodal/devices/bimorph_mirror.py +4 -7
  32. dodal/devices/collimation_table.py +36 -0
  33. dodal/devices/controllers.py +21 -0
  34. dodal/devices/cryostream.py +97 -7
  35. dodal/devices/current_amplifiers/femto.py +1 -1
  36. dodal/devices/detector/detector_motion.py +1 -7
  37. dodal/devices/eiger.py +22 -8
  38. dodal/devices/eiger_odin.py +2 -0
  39. dodal/devices/electron_analyser/__init__.py +2 -1
  40. dodal/devices/electron_analyser/abstract/__init__.py +0 -1
  41. dodal/devices/electron_analyser/abstract/base_detector.py +3 -25
  42. dodal/devices/electron_analyser/abstract/base_driver_io.py +18 -9
  43. dodal/devices/electron_analyser/abstract/base_region.py +34 -3
  44. dodal/devices/electron_analyser/detector.py +24 -0
  45. dodal/devices/electron_analyser/enums.py +5 -0
  46. dodal/devices/electron_analyser/specs/detector.py +2 -1
  47. dodal/devices/electron_analyser/specs/driver_io.py +21 -26
  48. dodal/devices/electron_analyser/specs/region.py +1 -1
  49. dodal/devices/electron_analyser/util.py +20 -0
  50. dodal/devices/electron_analyser/vgscienta/__init__.py +3 -3
  51. dodal/devices/electron_analyser/vgscienta/detector.py +2 -1
  52. dodal/devices/electron_analyser/vgscienta/driver_io.py +24 -32
  53. dodal/devices/electron_analyser/vgscienta/enums.py +0 -8
  54. dodal/devices/electron_analyser/vgscienta/region.py +2 -31
  55. dodal/devices/eurotherm.py +126 -0
  56. dodal/devices/fluorescence_detector_motion.py +3 -10
  57. dodal/devices/focusing_mirror.py +1 -1
  58. dodal/devices/i03/undulator_dcm.py +0 -1
  59. dodal/devices/i09/enums.py +8 -8
  60. dodal/devices/i10/diagnostics.py +4 -4
  61. dodal/devices/i10/i10_apple2.py +3 -6
  62. dodal/devices/i11/cyberstar_blower.py +34 -0
  63. dodal/devices/i11/diff_stages.py +55 -0
  64. dodal/devices/i11/mythen.py +165 -0
  65. dodal/devices/i11/nx100robot.py +153 -0
  66. dodal/devices/i11/spinner.py +30 -0
  67. dodal/devices/i13_1/merlin_controller.py +4 -4
  68. dodal/devices/i19/diffractometer.py +34 -0
  69. dodal/devices/i19/shutter.py +11 -1
  70. dodal/devices/i22/dcm.py +1 -1
  71. dodal/devices/i22/fswitch.py +3 -12
  72. dodal/devices/i24/aperture.py +3 -3
  73. dodal/devices/i24/dcm.py +11 -15
  74. dodal/devices/i24/dual_backlight.py +11 -12
  75. dodal/devices/i24/pmac.py +8 -7
  76. dodal/devices/mx_phase1/beamstop.py +10 -11
  77. dodal/devices/oav/pin_image_recognition/__init__.py +0 -3
  78. dodal/devices/p60/enums.py +8 -8
  79. dodal/devices/p60/lab_xray_source.py +3 -2
  80. dodal/devices/pressure_jump_cell.py +77 -123
  81. dodal/devices/scintillator.py +76 -4
  82. dodal/devices/smargon.py +2 -2
  83. dodal/devices/synchrotron.py +1 -2
  84. dodal/devices/thawer.py +6 -11
  85. dodal/devices/undulator.py +3 -8
  86. dodal/devices/util/epics_util.py +1 -1
  87. dodal/devices/watsonmarlow323_pump.py +7 -7
  88. dodal/devices/xbpm_feedback.py +4 -6
  89. dodal/devices/xspress3/xspress3.py +0 -5
  90. dodal/devices/zocalo/zocalo_results.py +1 -3
  91. dodal/testing/__init__.py +0 -0
  92. dodal/testing/electron_analyser/__init__.py +6 -0
  93. dodal/testing/electron_analyser/device_factory.py +59 -0
  94. dodal/devices/CTAB.py +0 -41
  95. {dls_dodal-1.55.1.dist-info → dls_dodal-1.56.0.dist-info}/WHEEL +0 -0
  96. {dls_dodal-1.55.1.dist-info → dls_dodal-1.56.0.dist-info}/entry_points.txt +0 -0
  97. {dls_dodal-1.55.1.dist-info → dls_dodal-1.56.0.dist-info}/licenses/LICENSE +0 -0
  98. {dls_dodal-1.55.1.dist-info → dls_dodal-1.56.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,59 @@
1
+ from typing import Any, get_args, get_origin
2
+
3
+ from dodal.devices.electron_analyser.abstract import (
4
+ TAbstractAnalyserDriverIO,
5
+ )
6
+ from dodal.devices.electron_analyser.detector import TElectronAnalyserDetector
7
+ from dodal.devices.electron_analyser.vgscienta import (
8
+ VGScientaAnalyserDriverIO,
9
+ VGScientaDetector,
10
+ )
11
+
12
+
13
+ async def create_driver(
14
+ driver_class: type[TAbstractAnalyserDriverIO],
15
+ **kwargs: Any,
16
+ ) -> TAbstractAnalyserDriverIO:
17
+ """
18
+ Helper function that helps to reduce the code to setup an analyser driver. The
19
+ parameters used for the enum types are taken directly from the subscripts of the
20
+ class so the user only needs to provide it in one place.
21
+
22
+ Args:
23
+ driver_class: The class for the driver which must include the enums in the
24
+ subscript, for example MyDriverClass[MyLensMode, ...]
25
+ kwargs: Additional key worded arguments that the driver needs for initalisation.
26
+ """
27
+ parameters = {
28
+ "lens_mode_type": get_args(driver_class)[0],
29
+ "psu_mode_type": get_args(driver_class)[1],
30
+ }
31
+ if get_origin(driver_class) is VGScientaAnalyserDriverIO:
32
+ parameters["pass_energy_type"] = get_args(driver_class)[2]
33
+
34
+ return driver_class(**(parameters | kwargs))
35
+
36
+
37
+ async def create_detector(
38
+ detector_class: type[TElectronAnalyserDetector],
39
+ **kwargs: Any,
40
+ ) -> TElectronAnalyserDetector:
41
+ """
42
+ Helper function that helps to reduce the code to setup an analyser detector. The
43
+ parameters used for the enum types are taken directly from the subscripts of the
44
+ class so the user only needs to provide it in one place.
45
+
46
+ Args:
47
+ detector_class: The class for the detector which must include the enums in the
48
+ subscript, for example MyDetectorClass[MyLensMode, ...]
49
+ kwargs: Additional key worded arguments that the detector needs for
50
+ initalisation.
51
+ """
52
+ parameters = {
53
+ "lens_mode_type": get_args(detector_class)[0],
54
+ "psu_mode_type": get_args(detector_class)[1],
55
+ }
56
+ if get_origin(detector_class) is VGScientaDetector:
57
+ parameters["pass_energy_type"] = get_args(detector_class)[2]
58
+
59
+ return detector_class(**(parameters | kwargs))
dodal/devices/CTAB.py DELETED
@@ -1,41 +0,0 @@
1
- from ophyd_async.core import StandardReadable
2
- from ophyd_async.epics.core import epics_signal_r
3
- from ophyd_async.epics.motor import Motor
4
-
5
-
6
- class CTAB(StandardReadable):
7
- """Basic collimantion table (CTAB) device for motion plus the motion disable signal
8
- when laser curtain triggered and hutch not locked.
9
-
10
- CTAB has 3 physical vertical motors, the jacks. 1 upstream and 2 downstream.
11
- The two downstream jacks are labelled as outboard (away from the ring) and
12
- inboard (towards the ring).
13
- Together these 3 jacks provide compound motion for vertical motion and pitch/roll.
14
- There are 2 physical horizontal motors 1 upstream, 1 downstream. These provide yaw.
15
-
16
- CTAB motion is disabled by an object being within the laser curtain area and can be
17
- overriden by use of the dead man's handle device or locking the hutch. The effect of
18
- these disabling systems is to cut power to the motors - signal for this is crate_power
19
- """
20
-
21
- def __init__(self, prefix: str, name: str = ""):
22
- with self.add_children_as_readables():
23
- self.inboard_y = Motor(prefix + "-MO-TABLE-01:INBOARDY")
24
- self.outboard_y = Motor(prefix + "-MO-TABLE-01:OUTBOARDY")
25
- self.upstream_y = Motor(prefix + "-MO-TABLE-01:UPSTREAMY")
26
- self.combined_downstream_y = Motor(prefix + "-MO-TABLE-01:DOWNSTREAMY")
27
- self.combined_all_y = Motor(prefix + "-MO-TABLE-01:Y")
28
-
29
- self.downstream_x = Motor(prefix + "-MO-TABLE-01:DOWNSTREAMX")
30
- self.upstream_x = Motor(prefix + "-MO-TABLE-01:UPSTREAMX")
31
- self.combined_all_x = Motor(prefix + "-MO-TABLE-01:X")
32
-
33
- self.pitch = Motor(prefix + "-MO-TABLE-01:PITCH")
34
- self.roll = Motor(prefix + "-MO-TABLE-01:ROLL")
35
- self.yaw = Motor(prefix + "-MO-TABLE-01:YAW")
36
-
37
- self.crate_power = epics_signal_r(
38
- int, prefix + "-MO-PMAC-02:CRATE2_HEALTHY"
39
- ) # returns 0 if no power
40
-
41
- super().__init__(name)