dls-dodal 1.55.0__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 (101) hide show
  1. {dls_dodal-1.55.0.dist-info → dls_dodal-1.56.0.dist-info}/METADATA +3 -3
  2. {dls_dodal-1.55.0.dist-info → dls_dodal-1.56.0.dist-info}/RECORD +100 -86
  3. dodal/_version.py +2 -2
  4. dodal/beamlines/b01_1.py +6 -13
  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/attenuator/attenuator.py +3 -1
  30. dodal/devices/b16/detector.py +1 -10
  31. dodal/devices/backlight.py +8 -20
  32. dodal/devices/bimorph_mirror.py +4 -7
  33. dodal/devices/collimation_table.py +36 -0
  34. dodal/devices/controllers.py +21 -0
  35. dodal/devices/cryostream.py +97 -7
  36. dodal/devices/current_amplifiers/femto.py +1 -1
  37. dodal/devices/detector/detector_motion.py +1 -7
  38. dodal/devices/eiger.py +22 -8
  39. dodal/devices/eiger_odin.py +2 -0
  40. dodal/devices/electron_analyser/__init__.py +2 -1
  41. dodal/devices/electron_analyser/abstract/__init__.py +0 -1
  42. dodal/devices/electron_analyser/abstract/base_detector.py +3 -25
  43. dodal/devices/electron_analyser/abstract/base_driver_io.py +18 -9
  44. dodal/devices/electron_analyser/abstract/base_region.py +34 -3
  45. dodal/devices/electron_analyser/detector.py +24 -0
  46. dodal/devices/electron_analyser/enums.py +5 -0
  47. dodal/devices/electron_analyser/specs/detector.py +2 -1
  48. dodal/devices/electron_analyser/specs/driver_io.py +21 -26
  49. dodal/devices/electron_analyser/specs/region.py +1 -1
  50. dodal/devices/electron_analyser/util.py +20 -0
  51. dodal/devices/electron_analyser/vgscienta/__init__.py +3 -3
  52. dodal/devices/electron_analyser/vgscienta/detector.py +2 -1
  53. dodal/devices/electron_analyser/vgscienta/driver_io.py +24 -32
  54. dodal/devices/electron_analyser/vgscienta/enums.py +0 -8
  55. dodal/devices/electron_analyser/vgscienta/region.py +2 -31
  56. dodal/devices/eurotherm.py +126 -0
  57. dodal/devices/fluorescence_detector_motion.py +3 -10
  58. dodal/devices/focusing_mirror.py +1 -1
  59. dodal/devices/i03/undulator_dcm.py +0 -1
  60. dodal/devices/i09/enums.py +8 -8
  61. dodal/devices/i10/diagnostics.py +4 -4
  62. dodal/devices/i10/i10_apple2.py +3 -6
  63. dodal/devices/i11/cyberstar_blower.py +34 -0
  64. dodal/devices/i11/diff_stages.py +55 -0
  65. dodal/devices/i11/mythen.py +165 -0
  66. dodal/devices/i11/nx100robot.py +153 -0
  67. dodal/devices/i11/spinner.py +30 -0
  68. dodal/devices/i13_1/merlin_controller.py +4 -4
  69. dodal/devices/i19/diffractometer.py +34 -0
  70. dodal/devices/i19/shutter.py +11 -1
  71. dodal/devices/i22/dcm.py +1 -1
  72. dodal/devices/i22/fswitch.py +3 -12
  73. dodal/devices/i24/aperture.py +3 -3
  74. dodal/devices/i24/dcm.py +11 -15
  75. dodal/devices/i24/dual_backlight.py +11 -12
  76. dodal/devices/i24/pmac.py +8 -7
  77. dodal/devices/mx_phase1/beamstop.py +10 -11
  78. dodal/devices/oav/pin_image_recognition/__init__.py +0 -3
  79. dodal/devices/p60/enums.py +8 -8
  80. dodal/devices/p60/lab_xray_source.py +3 -2
  81. dodal/devices/pressure_jump_cell.py +77 -123
  82. dodal/devices/scintillator.py +76 -4
  83. dodal/devices/smargon.py +2 -2
  84. dodal/devices/synchrotron.py +1 -2
  85. dodal/devices/tetramm.py +13 -0
  86. dodal/devices/thawer.py +6 -11
  87. dodal/devices/undulator.py +3 -8
  88. dodal/devices/util/epics_util.py +1 -1
  89. dodal/devices/util/test_utils.py +19 -0
  90. dodal/devices/watsonmarlow323_pump.py +7 -7
  91. dodal/devices/xbpm_feedback.py +4 -6
  92. dodal/devices/xspress3/xspress3.py +0 -5
  93. dodal/devices/zocalo/zocalo_results.py +1 -3
  94. dodal/testing/__init__.py +0 -0
  95. dodal/testing/electron_analyser/__init__.py +6 -0
  96. dodal/testing/electron_analyser/device_factory.py +59 -0
  97. dodal/devices/CTAB.py +0 -41
  98. {dls_dodal-1.55.0.dist-info → dls_dodal-1.56.0.dist-info}/WHEEL +0 -0
  99. {dls_dodal-1.55.0.dist-info → dls_dodal-1.56.0.dist-info}/entry_points.txt +0 -0
  100. {dls_dodal-1.55.0.dist-info → dls_dodal-1.56.0.dist-info}/licenses/LICENSE +0 -0
  101. {dls_dodal-1.55.0.dist-info → dls_dodal-1.56.0.dist-info}/top_level.txt +0 -0
@@ -125,19 +125,17 @@ class ZocaloResults(StandardReadable, Triggerable):
125
125
 
126
126
  def __init__(
127
127
  self,
128
- name: str = "zocalo",
128
+ name: str = "",
129
129
  zocalo_environment: str = ZOCALO_ENV,
130
130
  channel: str = "xrc.i03",
131
131
  sort_key: str = DEFAULT_SORT_KEY.value,
132
132
  timeout_s: float = DEFAULT_TIMEOUT,
133
- prefix: str = "",
134
133
  results_source: ZocaloSource = ZocaloSource.CPU,
135
134
  ) -> None:
136
135
  self.zocalo_environment = zocalo_environment
137
136
  self.sort_key = SortKeys[sort_key]
138
137
  self.channel = channel
139
138
  self.timeout_s = timeout_s
140
- self._prefix = prefix
141
139
  self._raw_results_received: Queue = Queue()
142
140
  self.transport: CommonTransport | None = None
143
141
  self.results_source = results_source
File without changes
@@ -0,0 +1,6 @@
1
+ from .device_factory import create_detector, create_driver
2
+
3
+ __all__ = [
4
+ "create_detector",
5
+ "create_driver",
6
+ ]
@@ -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)