dls-dodal 1.33.0__py3-none-any.whl → 1.35.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 (89) hide show
  1. {dls_dodal-1.33.0.dist-info → dls_dodal-1.35.0.dist-info}/METADATA +3 -3
  2. dls_dodal-1.35.0.dist-info/RECORD +147 -0
  3. {dls_dodal-1.33.0.dist-info → dls_dodal-1.35.0.dist-info}/WHEEL +1 -1
  4. dodal/__init__.py +8 -0
  5. dodal/_version.py +2 -2
  6. dodal/beamline_specific_utils/i03.py +6 -2
  7. dodal/beamlines/__init__.py +2 -3
  8. dodal/beamlines/i03.py +41 -9
  9. dodal/beamlines/i04.py +26 -4
  10. dodal/beamlines/i10.py +257 -0
  11. dodal/beamlines/i22.py +25 -13
  12. dodal/beamlines/i24.py +11 -11
  13. dodal/beamlines/p38.py +24 -13
  14. dodal/common/beamlines/beamline_utils.py +1 -2
  15. dodal/common/crystal_metadata.py +61 -0
  16. dodal/common/signal_utils.py +10 -14
  17. dodal/common/types.py +2 -7
  18. dodal/devices/CTAB.py +1 -1
  19. dodal/devices/aperture.py +1 -1
  20. dodal/devices/aperturescatterguard.py +20 -8
  21. dodal/devices/apple2_undulator.py +603 -0
  22. dodal/devices/areadetector/plugins/CAM.py +29 -0
  23. dodal/devices/areadetector/plugins/MJPG.py +51 -106
  24. dodal/devices/attenuator.py +1 -1
  25. dodal/devices/backlight.py +11 -11
  26. dodal/devices/cryostream.py +3 -5
  27. dodal/devices/dcm.py +26 -2
  28. dodal/devices/detector/detector_motion.py +3 -5
  29. dodal/devices/diamond_filter.py +46 -0
  30. dodal/devices/eiger.py +6 -2
  31. dodal/devices/eiger_odin.py +48 -39
  32. dodal/devices/fast_grid_scan.py +1 -1
  33. dodal/devices/fluorescence_detector_motion.py +5 -7
  34. dodal/devices/focusing_mirror.py +26 -19
  35. dodal/devices/hutch_shutter.py +4 -5
  36. dodal/devices/i10/i10_apple2.py +399 -0
  37. dodal/devices/i10/i10_setting_data.py +7 -0
  38. dodal/devices/i22/dcm.py +50 -83
  39. dodal/devices/i22/fswitch.py +5 -5
  40. dodal/devices/i24/aperture.py +3 -5
  41. dodal/devices/i24/beamstop.py +3 -5
  42. dodal/devices/i24/dcm.py +1 -1
  43. dodal/devices/i24/dual_backlight.py +9 -11
  44. dodal/devices/i24/pmac.py +35 -46
  45. dodal/devices/i24/vgonio.py +16 -0
  46. dodal/devices/ipin.py +5 -3
  47. dodal/devices/linkam3.py +7 -7
  48. dodal/devices/oav/oav_calculations.py +22 -0
  49. dodal/devices/oav/oav_detector.py +118 -83
  50. dodal/devices/oav/oav_parameters.py +50 -104
  51. dodal/devices/oav/oav_to_redis_forwarder.py +77 -35
  52. dodal/devices/oav/pin_image_recognition/__init__.py +9 -7
  53. dodal/devices/oav/{grid_overlay.py → snapshots/grid_overlay.py} +16 -59
  54. dodal/devices/oav/snapshots/snapshot_with_beam_centre.py +64 -0
  55. dodal/devices/oav/snapshots/snapshot_with_grid.py +57 -0
  56. dodal/devices/oav/utils.py +28 -27
  57. dodal/devices/p99/sample_stage.py +3 -5
  58. dodal/devices/pgm.py +40 -0
  59. dodal/devices/qbpm.py +18 -0
  60. dodal/devices/robot.py +5 -5
  61. dodal/devices/smargon.py +3 -3
  62. dodal/devices/synchrotron.py +9 -4
  63. dodal/devices/tetramm.py +9 -9
  64. dodal/devices/thawer.py +13 -7
  65. dodal/devices/undulator.py +7 -6
  66. dodal/devices/util/adjuster_plans.py +1 -1
  67. dodal/devices/util/epics_util.py +1 -1
  68. dodal/devices/util/lookup_tables.py +4 -5
  69. dodal/devices/watsonmarlow323_pump.py +45 -0
  70. dodal/devices/webcam.py +9 -2
  71. dodal/devices/xbpm_feedback.py +3 -5
  72. dodal/devices/xspress3/xspress3.py +8 -9
  73. dodal/devices/xspress3/xspress3_channel.py +3 -5
  74. dodal/devices/zebra.py +12 -8
  75. dodal/devices/zebra_controlled_shutter.py +5 -6
  76. dodal/devices/zocalo/__init__.py +2 -2
  77. dodal/devices/zocalo/zocalo_constants.py +3 -0
  78. dodal/devices/zocalo/zocalo_interaction.py +2 -1
  79. dodal/devices/zocalo/zocalo_results.py +105 -89
  80. dodal/plans/data_session_metadata.py +2 -2
  81. dodal/plans/motor_util_plans.py +11 -9
  82. dodal/utils.py +11 -0
  83. dls_dodal-1.33.0.dist-info/RECORD +0 -136
  84. dodal/beamlines/i04_1.py +0 -140
  85. dodal/devices/i24/i24_vgonio.py +0 -17
  86. dodal/devices/oav/oav_errors.py +0 -35
  87. {dls_dodal-1.33.0.dist-info → dls_dodal-1.35.0.dist-info}/LICENSE +0 -0
  88. {dls_dodal-1.33.0.dist-info → dls_dodal-1.35.0.dist-info}/entry_points.txt +0 -0
  89. {dls_dodal-1.33.0.dist-info → dls_dodal-1.35.0.dist-info}/top_level.txt +0 -0
dodal/beamlines/i04_1.py DELETED
@@ -1,140 +0,0 @@
1
- from dodal.common.beamlines.beamline_utils import device_instantiation
2
- from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
3
- from dodal.devices.backlight import Backlight
4
- from dodal.devices.detector import DetectorParams
5
- from dodal.devices.eiger import EigerDetector
6
- from dodal.devices.oav.oav_detector import OAV, OAVConfigParams
7
- from dodal.devices.s4_slit_gaps import S4SlitGaps
8
- from dodal.devices.synchrotron import Synchrotron
9
- from dodal.devices.undulator import Undulator
10
- from dodal.devices.zebra import Zebra
11
- from dodal.log import set_beamline as set_log_beamline
12
- from dodal.utils import BeamlinePrefix, get_beamline_name, skip_device
13
-
14
- ZOOM_PARAMS_FILE = "/dls_sw/i04-1/software/gda/config/xml/jCameraManZoomLevels.xml"
15
- DISPLAY_CONFIG = "/dls_sw/i04-1/software/gda_versions/var/display.configuration"
16
-
17
- _simulator_beamline_fallback = "s04_1"
18
- BL = get_beamline_name(_simulator_beamline_fallback)
19
- set_log_beamline(BL)
20
- set_utils_beamline(BL)
21
-
22
-
23
- def _check_for_simulation():
24
- return BL == _simulator_beamline_fallback
25
-
26
-
27
- def backlight(
28
- wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
29
- ) -> Backlight:
30
- """Get the i04_1 backlight device, instantiate it if it hasn't already been.
31
- If this is called when already instantiated in i04_1, it will return the existing object.
32
- """
33
- return device_instantiation(
34
- device_factory=Backlight,
35
- name="backlight",
36
- prefix="",
37
- wait=wait_for_connection,
38
- fake=fake_with_ophyd_sim,
39
- )
40
-
41
-
42
- @skip_device(_check_for_simulation)
43
- def eiger(
44
- wait_for_connection: bool = True,
45
- fake_with_ophyd_sim: bool = False,
46
- params: DetectorParams | None = None,
47
- ) -> EigerDetector:
48
- """Get the i04_1 Eiger device, instantiate it if it hasn't already been.
49
- If this is called when already instantiated in i04_1, it will return the existing object.
50
- If called with params, will update those params to the Eiger object.
51
- """
52
-
53
- def set_params(eiger: EigerDetector):
54
- if params is not None:
55
- eiger.set_detector_parameters(params)
56
-
57
- return device_instantiation(
58
- device_factory=EigerDetector,
59
- name="eiger",
60
- prefix="-EA-EIGER-01:",
61
- wait=wait_for_connection,
62
- fake=fake_with_ophyd_sim,
63
- post_create=set_params,
64
- )
65
-
66
-
67
- @skip_device(_check_for_simulation)
68
- def oav(wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False) -> OAV:
69
- """Get the i04_1 OAV device, instantiate it if it hasn't already been.
70
- If this is called when already instantiated in i04_1, it will return the existing object.
71
- """
72
- return device_instantiation(
73
- OAV,
74
- "oav",
75
- "",
76
- wait_for_connection,
77
- fake_with_ophyd_sim,
78
- params=OAVConfigParams(ZOOM_PARAMS_FILE, DISPLAY_CONFIG),
79
- )
80
-
81
-
82
- def s4_slit_gaps(
83
- wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
84
- ) -> S4SlitGaps:
85
- """Get the i04_1 s4_slit_gaps device, instantiate it if it hasn't already been.
86
- If this is called when already instantiated in i04_1, it will return the existing object.
87
- """
88
- return device_instantiation(
89
- S4SlitGaps,
90
- "s4_slit_gaps",
91
- "-AL-SLITS-04:",
92
- wait_for_connection,
93
- fake_with_ophyd_sim,
94
- )
95
-
96
-
97
- @skip_device(_check_for_simulation)
98
- def synchrotron(
99
- wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
100
- ) -> Synchrotron:
101
- """Get the i04_1 synchrotron device, instantiate it if it hasn't already been.
102
- If this is called when already instantiated in i04_1, it will return the existing object.
103
- """
104
- return device_instantiation(
105
- Synchrotron,
106
- "synchrotron",
107
- "",
108
- wait_for_connection,
109
- fake_with_ophyd_sim,
110
- bl_prefix=False,
111
- )
112
-
113
-
114
- def undulator(
115
- wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
116
- ) -> Undulator:
117
- """Get the i04_1 undulator device, instantiate it if it hasn't already been.
118
- If this is called when already instantiated in i04_1, it will return the existing object.
119
- """
120
- return device_instantiation(
121
- Undulator,
122
- "undulator",
123
- f"{BeamlinePrefix(BL).insertion_prefix}-MO-SERVC-01:",
124
- wait_for_connection,
125
- fake_with_ophyd_sim,
126
- bl_prefix=False,
127
- )
128
-
129
-
130
- def zebra(wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False) -> Zebra:
131
- """Get the i04_1 zebra device, instantiate it if it hasn't already been.
132
- If this is called when already instantiated in i04_1, it will return the existing object.
133
- """
134
- return device_instantiation(
135
- Zebra,
136
- "zebra",
137
- "-EA-ZEBRA-01:",
138
- wait_for_connection,
139
- fake_with_ophyd_sim,
140
- )
@@ -1,17 +0,0 @@
1
- from ophyd import Component as Cpt
2
- from ophyd import EpicsMotor
3
- from ophyd.epics_motor import MotorBundle
4
-
5
-
6
- class VGonio(MotorBundle):
7
- x = Cpt(EpicsMotor, "PINX")
8
- z = Cpt(EpicsMotor, "PINZ")
9
- yh = Cpt(EpicsMotor, "PINYH")
10
- omega = Cpt(EpicsMotor, "OMEGA")
11
- kappa = Cpt(EpicsMotor, "KAPPA")
12
- phi = Cpt(EpicsMotor, "PHI")
13
-
14
- # Real motors
15
- xs = Cpt(EpicsMotor, "PINXS")
16
- ys = Cpt(EpicsMotor, "PINXS")
17
- zs = Cpt(EpicsMotor, "PINZS")
@@ -1,35 +0,0 @@
1
- """
2
- Module for containing errors in operation of the OAV.
3
- """
4
-
5
- from dodal.log import LOGGER
6
-
7
-
8
- class OAVError_ZoomLevelNotFound(Exception):
9
- def __init__(self, errmsg):
10
- LOGGER.error(errmsg)
11
-
12
-
13
- class OAVError_BeamPositionNotFound(Exception):
14
- def __init__(self, errmsg):
15
- LOGGER.error(errmsg)
16
-
17
-
18
- class OAVError_WaveformAllZero(Exception):
19
- def __init__(self, errmsg):
20
- LOGGER.error(errmsg)
21
-
22
-
23
- class OAVError_NoRotationsPassValidityTest(Exception):
24
- def __init__(self, errmsg):
25
- LOGGER.error(errmsg)
26
-
27
-
28
- class OAVError_MissingRotations(Exception):
29
- def __init__(self, errmsg):
30
- LOGGER.error(errmsg)
31
-
32
-
33
- class OAVError_TipDistanceExceedsMax(Exception):
34
- def __init__(self, errmsg):
35
- LOGGER.error(errmsg)