dls-dodal 1.33.0__py3-none-any.whl → 1.34.1__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.
- {dls_dodal-1.33.0.dist-info → dls_dodal-1.34.1.dist-info}/METADATA +3 -3
- {dls_dodal-1.33.0.dist-info → dls_dodal-1.34.1.dist-info}/RECORD +50 -42
- {dls_dodal-1.33.0.dist-info → dls_dodal-1.34.1.dist-info}/WHEEL +1 -1
- dodal/__init__.py +8 -0
- dodal/_version.py +2 -2
- dodal/beamline_specific_utils/i03.py +6 -2
- dodal/beamlines/__init__.py +2 -3
- dodal/beamlines/i03.py +41 -9
- dodal/beamlines/i04.py +26 -4
- dodal/beamlines/i10.py +257 -0
- dodal/beamlines/i22.py +1 -2
- dodal/beamlines/i24.py +7 -7
- dodal/beamlines/p38.py +1 -2
- dodal/common/types.py +2 -7
- dodal/devices/apple2_undulator.py +602 -0
- dodal/devices/areadetector/plugins/CAM.py +31 -0
- dodal/devices/areadetector/plugins/MJPG.py +51 -106
- dodal/devices/backlight.py +7 -6
- dodal/devices/diamond_filter.py +47 -0
- dodal/devices/eiger.py +6 -2
- dodal/devices/eiger_odin.py +48 -39
- dodal/devices/focusing_mirror.py +14 -8
- dodal/devices/i10/i10_apple2.py +398 -0
- dodal/devices/i10/i10_setting_data.py +7 -0
- dodal/devices/i22/dcm.py +7 -8
- dodal/devices/i24/dual_backlight.py +5 -5
- dodal/devices/oav/oav_calculations.py +22 -0
- dodal/devices/oav/oav_detector.py +118 -83
- dodal/devices/oav/oav_parameters.py +50 -104
- dodal/devices/oav/oav_to_redis_forwarder.py +75 -34
- dodal/devices/oav/{grid_overlay.py → snapshots/grid_overlay.py} +0 -43
- dodal/devices/oav/snapshots/snapshot_with_beam_centre.py +64 -0
- dodal/devices/oav/snapshots/snapshot_with_grid.py +57 -0
- dodal/devices/oav/utils.py +26 -25
- dodal/devices/pgm.py +41 -0
- dodal/devices/qbpm.py +18 -0
- dodal/devices/robot.py +2 -2
- dodal/devices/smargon.py +2 -2
- dodal/devices/tetramm.py +2 -2
- dodal/devices/undulator.py +2 -1
- dodal/devices/util/adjuster_plans.py +1 -1
- dodal/devices/util/lookup_tables.py +4 -5
- dodal/devices/zebra.py +5 -2
- dodal/devices/zocalo/zocalo_results.py +13 -10
- dodal/plans/data_session_metadata.py +2 -2
- dodal/plans/motor_util_plans.py +11 -9
- dodal/utils.py +7 -0
- dodal/beamlines/i04_1.py +0 -140
- dodal/devices/oav/oav_errors.py +0 -35
- {dls_dodal-1.33.0.dist-info → dls_dodal-1.34.1.dist-info}/LICENSE +0 -0
- {dls_dodal-1.33.0.dist-info → dls_dodal-1.34.1.dist-info}/entry_points.txt +0 -0
- {dls_dodal-1.33.0.dist-info → dls_dodal-1.34.1.dist-info}/top_level.txt +0 -0
dodal/beamlines/i10.py
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from dodal.common.beamlines.beamline_utils import device_instantiation
|
|
4
|
+
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
5
|
+
from dodal.devices.apple2_undulator import (
|
|
6
|
+
UndulatorGap,
|
|
7
|
+
UndulatorJawPhase,
|
|
8
|
+
UndulatorPhaseAxes,
|
|
9
|
+
)
|
|
10
|
+
from dodal.devices.i10.i10_apple2 import (
|
|
11
|
+
I10Apple2,
|
|
12
|
+
I10Apple2PGM,
|
|
13
|
+
I10Apple2Pol,
|
|
14
|
+
LinearArbitraryAngle,
|
|
15
|
+
)
|
|
16
|
+
from dodal.devices.i10.i10_setting_data import I10Grating
|
|
17
|
+
from dodal.devices.pgm import PGM
|
|
18
|
+
from dodal.log import set_beamline as set_log_beamline
|
|
19
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
20
|
+
|
|
21
|
+
BL = get_beamline_name("i10")
|
|
22
|
+
set_log_beamline(BL)
|
|
23
|
+
set_utils_beamline(BL)
|
|
24
|
+
|
|
25
|
+
LOOK_UPTABLE_DIR = "/dls_sw/i10/software/gda/workspace_git/gda-diamond.git/configurations/i10-shared/lookupTables/"
|
|
26
|
+
"""
|
|
27
|
+
I10 has two insertion devices one up(idu) and one down stream(idd).
|
|
28
|
+
It is worth noting that the down stream device is slightly longer,
|
|
29
|
+
so it can reach Mn edge for linear arbitrary.
|
|
30
|
+
idd == id1
|
|
31
|
+
and
|
|
32
|
+
idu == id2.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def idd_gap(
|
|
37
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
38
|
+
) -> UndulatorGap:
|
|
39
|
+
return device_instantiation(
|
|
40
|
+
device_factory=UndulatorGap,
|
|
41
|
+
name="idd_gap",
|
|
42
|
+
prefix=f"{BeamlinePrefix(BL).insertion_prefix}-MO-SERVC-01:",
|
|
43
|
+
wait=wait_for_connection,
|
|
44
|
+
fake=fake_with_ophyd_sim,
|
|
45
|
+
bl_prefix=False,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def idd_phase_axes(
|
|
50
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
51
|
+
) -> UndulatorPhaseAxes:
|
|
52
|
+
return device_instantiation(
|
|
53
|
+
device_factory=UndulatorPhaseAxes,
|
|
54
|
+
name="idd_phase_axes",
|
|
55
|
+
prefix=f"{BeamlinePrefix(BL).insertion_prefix}-MO-SERVC-01:",
|
|
56
|
+
top_outer="RPQ1",
|
|
57
|
+
top_inner="RPQ2",
|
|
58
|
+
btm_inner="RPQ3",
|
|
59
|
+
btm_outer="RPQ4",
|
|
60
|
+
wait=wait_for_connection,
|
|
61
|
+
fake=fake_with_ophyd_sim,
|
|
62
|
+
bl_prefix=False,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def idd_jaw(
|
|
67
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
68
|
+
) -> UndulatorJawPhase:
|
|
69
|
+
return device_instantiation(
|
|
70
|
+
device_factory=UndulatorJawPhase,
|
|
71
|
+
name="idd_jaw",
|
|
72
|
+
prefix=f"{BeamlinePrefix(BL).insertion_prefix}-MO-SERVC-01:",
|
|
73
|
+
move_pv="RPQ1",
|
|
74
|
+
wait=wait_for_connection,
|
|
75
|
+
fake=fake_with_ophyd_sim,
|
|
76
|
+
bl_prefix=False,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def idu_gap(
|
|
81
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
82
|
+
) -> UndulatorGap:
|
|
83
|
+
return device_instantiation(
|
|
84
|
+
device_factory=UndulatorGap,
|
|
85
|
+
name="idu_gap",
|
|
86
|
+
prefix=f"{BeamlinePrefix(BL).insertion_prefix}-MO-SERVC-21:",
|
|
87
|
+
wait=wait_for_connection,
|
|
88
|
+
fake=fake_with_ophyd_sim,
|
|
89
|
+
bl_prefix=False,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def idu_phase_axes(
|
|
94
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
95
|
+
) -> UndulatorPhaseAxes:
|
|
96
|
+
return device_instantiation(
|
|
97
|
+
device_factory=UndulatorPhaseAxes,
|
|
98
|
+
name="idu_phase_axes",
|
|
99
|
+
prefix=f"{BeamlinePrefix(BL).insertion_prefix}-MO-SERVC-21:",
|
|
100
|
+
top_outer="RPQ1",
|
|
101
|
+
top_inner="RPQ2",
|
|
102
|
+
btm_inner="RPQ3",
|
|
103
|
+
btm_outer="RPQ4",
|
|
104
|
+
wait=wait_for_connection,
|
|
105
|
+
fake=fake_with_ophyd_sim,
|
|
106
|
+
bl_prefix=False,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def idu_jaw(
|
|
111
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
112
|
+
) -> UndulatorJawPhase:
|
|
113
|
+
return device_instantiation(
|
|
114
|
+
device_factory=UndulatorJawPhase,
|
|
115
|
+
name="idu_jaw",
|
|
116
|
+
prefix=f"{BeamlinePrefix(BL).insertion_prefix}-MO-SERVC-21:",
|
|
117
|
+
move_pv="RPQ1",
|
|
118
|
+
wait=wait_for_connection,
|
|
119
|
+
fake=fake_with_ophyd_sim,
|
|
120
|
+
bl_prefix=False,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def pgm(wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False) -> PGM:
|
|
125
|
+
return device_instantiation(
|
|
126
|
+
device_factory=PGM,
|
|
127
|
+
name="pgm",
|
|
128
|
+
prefix="-OP-PGM-01:",
|
|
129
|
+
grating=I10Grating,
|
|
130
|
+
gratingPv="NLINES2",
|
|
131
|
+
wait=wait_for_connection,
|
|
132
|
+
fake=fake_with_ophyd_sim,
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def idu_gap_phase(
|
|
137
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
138
|
+
) -> I10Apple2:
|
|
139
|
+
return device_instantiation(
|
|
140
|
+
device_factory=I10Apple2,
|
|
141
|
+
id_gap=idu_gap(wait_for_connection, fake_with_ophyd_sim),
|
|
142
|
+
id_phase=idu_phase_axes(wait_for_connection, fake_with_ophyd_sim),
|
|
143
|
+
id_jaw_phase=idu_jaw(wait_for_connection, fake_with_ophyd_sim),
|
|
144
|
+
energy_gap_table_path=Path(
|
|
145
|
+
LOOK_UPTABLE_DIR + "IDEnergy2GapCalibrations.csv",
|
|
146
|
+
),
|
|
147
|
+
energy_phase_table_path=Path(
|
|
148
|
+
LOOK_UPTABLE_DIR + "IDEnergy2PhaseCalibrations.csv",
|
|
149
|
+
),
|
|
150
|
+
source=("Source", "idu"),
|
|
151
|
+
name="idu_gap_phase",
|
|
152
|
+
prefix="",
|
|
153
|
+
wait=wait_for_connection,
|
|
154
|
+
fake=fake_with_ophyd_sim,
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def idd_gap_phase(
|
|
159
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
160
|
+
) -> I10Apple2:
|
|
161
|
+
return device_instantiation(
|
|
162
|
+
device_factory=I10Apple2,
|
|
163
|
+
id_gap=idd_gap(wait_for_connection, fake_with_ophyd_sim),
|
|
164
|
+
id_phase=idd_phase_axes(wait_for_connection, fake_with_ophyd_sim),
|
|
165
|
+
id_jaw_phase=idd_jaw(wait_for_connection, fake_with_ophyd_sim),
|
|
166
|
+
energy_gap_table_path=Path(
|
|
167
|
+
LOOK_UPTABLE_DIR + "IDEnergy2GapCalibrations.csv",
|
|
168
|
+
),
|
|
169
|
+
energy_phase_table_path=Path(
|
|
170
|
+
LOOK_UPTABLE_DIR + "IDEnergy2PhaseCalibrations.csv",
|
|
171
|
+
),
|
|
172
|
+
source=("Source", "idd"),
|
|
173
|
+
name="idd_gap_phase",
|
|
174
|
+
prefix="",
|
|
175
|
+
wait=wait_for_connection,
|
|
176
|
+
fake=fake_with_ophyd_sim,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def idu_pol(
|
|
181
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
182
|
+
) -> I10Apple2Pol:
|
|
183
|
+
return device_instantiation(
|
|
184
|
+
device_factory=I10Apple2Pol,
|
|
185
|
+
prefix="",
|
|
186
|
+
id=idu_gap_phase(wait_for_connection, fake_with_ophyd_sim),
|
|
187
|
+
name="idu_pol",
|
|
188
|
+
wait=wait_for_connection,
|
|
189
|
+
fake=fake_with_ophyd_sim,
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
def idd_pol(
|
|
194
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
195
|
+
) -> I10Apple2Pol:
|
|
196
|
+
return device_instantiation(
|
|
197
|
+
device_factory=I10Apple2Pol,
|
|
198
|
+
prefix="",
|
|
199
|
+
id=idd_gap_phase(wait_for_connection, fake_with_ophyd_sim),
|
|
200
|
+
name="idd_pol",
|
|
201
|
+
wait=wait_for_connection,
|
|
202
|
+
fake=fake_with_ophyd_sim,
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
def idu(
|
|
207
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
208
|
+
) -> I10Apple2PGM:
|
|
209
|
+
return device_instantiation(
|
|
210
|
+
device_factory=I10Apple2PGM,
|
|
211
|
+
prefix="",
|
|
212
|
+
id=idu_gap_phase(wait_for_connection, fake_with_ophyd_sim),
|
|
213
|
+
pgm=pgm(wait_for_connection, fake_with_ophyd_sim),
|
|
214
|
+
name="idu",
|
|
215
|
+
wait=wait_for_connection,
|
|
216
|
+
fake=fake_with_ophyd_sim,
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
def idd(
|
|
221
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
222
|
+
) -> I10Apple2PGM:
|
|
223
|
+
return device_instantiation(
|
|
224
|
+
device_factory=I10Apple2PGM,
|
|
225
|
+
prefix="",
|
|
226
|
+
id=idd_gap_phase(wait_for_connection, fake_with_ophyd_sim),
|
|
227
|
+
pgm=pgm(wait_for_connection, fake_with_ophyd_sim),
|
|
228
|
+
name="idd",
|
|
229
|
+
wait=wait_for_connection,
|
|
230
|
+
fake=fake_with_ophyd_sim,
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def idu_la_angle(
|
|
235
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
236
|
+
) -> LinearArbitraryAngle:
|
|
237
|
+
return device_instantiation(
|
|
238
|
+
device_factory=LinearArbitraryAngle,
|
|
239
|
+
prefix="",
|
|
240
|
+
id=idu(wait_for_connection, fake_with_ophyd_sim),
|
|
241
|
+
name="idu_la_angle",
|
|
242
|
+
wait=wait_for_connection,
|
|
243
|
+
fake=fake_with_ophyd_sim,
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
def idd_la_angle(
|
|
248
|
+
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
249
|
+
) -> LinearArbitraryAngle:
|
|
250
|
+
return device_instantiation(
|
|
251
|
+
device_factory=LinearArbitraryAngle,
|
|
252
|
+
prefix="",
|
|
253
|
+
id=idu(wait_for_connection, fake_with_ophyd_sim),
|
|
254
|
+
name="idd_la_angle",
|
|
255
|
+
wait=wait_for_connection,
|
|
256
|
+
fake=fake_with_ophyd_sim,
|
|
257
|
+
)
|
dodal/beamlines/i22.py
CHANGED
|
@@ -165,11 +165,10 @@ def dcm(
|
|
|
165
165
|
return device_instantiation(
|
|
166
166
|
DoubleCrystalMonochromator,
|
|
167
167
|
"dcm",
|
|
168
|
-
"",
|
|
168
|
+
f"{BeamlinePrefix(BL).beamline_prefix}-MO-DCM-01:",
|
|
169
169
|
wait_for_connection,
|
|
170
170
|
fake_with_ophyd_sim,
|
|
171
171
|
bl_prefix=False,
|
|
172
|
-
motion_prefix=f"{BeamlinePrefix(BL).beamline_prefix}-MO-DCM-01:",
|
|
173
172
|
temperature_prefix=f"{BeamlinePrefix(BL).beamline_prefix}-DI-DCM-01:",
|
|
174
173
|
crystal_1_metadata=CrystalMetadata(
|
|
175
174
|
usage="Bragg",
|
dodal/beamlines/i24.py
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
from dodal.common.beamlines.beamline_utils import
|
|
1
|
+
from dodal.common.beamlines.beamline_utils import (
|
|
2
|
+
BL,
|
|
3
|
+
device_instantiation,
|
|
4
|
+
)
|
|
2
5
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
3
6
|
from dodal.devices.detector import DetectorParams
|
|
4
7
|
from dodal.devices.eiger import EigerDetector
|
|
@@ -11,7 +14,7 @@ from dodal.devices.i24.i24_detector_motion import DetectorMotion
|
|
|
11
14
|
from dodal.devices.i24.i24_vgonio import VGonio
|
|
12
15
|
from dodal.devices.i24.pmac import PMAC
|
|
13
16
|
from dodal.devices.oav.oav_detector import OAV
|
|
14
|
-
from dodal.devices.oav.oav_parameters import
|
|
17
|
+
from dodal.devices.oav.oav_parameters import OAVConfig
|
|
15
18
|
from dodal.devices.zebra import Zebra
|
|
16
19
|
from dodal.log import set_beamline as set_log_beamline
|
|
17
20
|
from dodal.utils import get_beamline_name, skip_device
|
|
@@ -138,16 +141,13 @@ def pmac(wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False) ->
|
|
|
138
141
|
|
|
139
142
|
@skip_device(lambda: BL == "s24")
|
|
140
143
|
def oav(wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False) -> OAV:
|
|
141
|
-
"""Get the i24 OAV device, instantiate it if it hasn't already been.
|
|
142
|
-
If this is called when already instantiated in i24, it will return the existing object.
|
|
143
|
-
"""
|
|
144
144
|
return device_instantiation(
|
|
145
145
|
OAV,
|
|
146
146
|
"oav",
|
|
147
|
-
"",
|
|
147
|
+
"-DI-OAV-01:",
|
|
148
148
|
wait_for_connection,
|
|
149
149
|
fake_with_ophyd_sim,
|
|
150
|
-
|
|
150
|
+
config=OAVConfig(ZOOM_PARAMS_FILE, DISPLAY_CONFIG),
|
|
151
151
|
)
|
|
152
152
|
|
|
153
153
|
|
dodal/beamlines/p38.py
CHANGED
|
@@ -222,11 +222,10 @@ def dcm(
|
|
|
222
222
|
return device_instantiation(
|
|
223
223
|
DoubleCrystalMonochromator,
|
|
224
224
|
"dcm",
|
|
225
|
-
"",
|
|
225
|
+
f"{BeamlinePrefix(BL).beamline_prefix}-MO-DCM-01:",
|
|
226
226
|
wait_for_connection,
|
|
227
227
|
fake_with_ophyd_sim,
|
|
228
228
|
bl_prefix=False,
|
|
229
|
-
motion_prefix=f"{BeamlinePrefix(BL).beamline_prefix}-MO-DCM-01:",
|
|
230
229
|
temperature_prefix=f"{BeamlinePrefix(BL).beamline_prefix}-DI-DCM-01:",
|
|
231
230
|
crystal_1_metadata=CrystalMetadata(
|
|
232
231
|
usage="Bragg",
|
dodal/common/types.py
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
|
-
from collections.abc import Callable
|
|
3
|
-
from typing import (
|
|
4
|
-
Any,
|
|
5
|
-
)
|
|
2
|
+
from collections.abc import Callable
|
|
6
3
|
|
|
7
|
-
from bluesky.utils import
|
|
4
|
+
from bluesky.utils import MsgGenerator
|
|
8
5
|
from ophyd_async.core import PathProvider
|
|
9
6
|
|
|
10
7
|
# String identifier used by 'wait' or stubs that await
|
|
11
8
|
Group = str
|
|
12
|
-
# A true 'plan', usually the output of a generator function
|
|
13
|
-
MsgGenerator = Generator[Msg, Any, None]
|
|
14
9
|
# A function that generates a plan
|
|
15
10
|
PlanGenerator = Callable[..., MsgGenerator]
|
|
16
11
|
|