dls-dodal 1.65.0__py3-none-any.whl → 1.67.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.
- {dls_dodal-1.65.0.dist-info → dls_dodal-1.67.0.dist-info}/METADATA +3 -4
- {dls_dodal-1.65.0.dist-info → dls_dodal-1.67.0.dist-info}/RECORD +82 -66
- dodal/_version.py +2 -2
- dodal/beamlines/aithre.py +21 -2
- dodal/beamlines/i03.py +102 -198
- dodal/beamlines/i04.py +40 -4
- dodal/beamlines/i05.py +28 -1
- dodal/beamlines/i06.py +62 -0
- dodal/beamlines/i07.py +20 -0
- dodal/beamlines/i09_1.py +32 -3
- dodal/beamlines/i09_2.py +57 -2
- dodal/beamlines/i10_optics.py +46 -17
- dodal/beamlines/i17.py +7 -3
- dodal/beamlines/i18.py +3 -3
- dodal/beamlines/i19_1.py +26 -14
- dodal/beamlines/i19_2.py +49 -38
- dodal/beamlines/i21.py +2 -2
- dodal/beamlines/i22.py +19 -4
- dodal/beamlines/p38.py +3 -3
- dodal/beamlines/training_rig.py +0 -16
- dodal/cli.py +26 -12
- dodal/common/coordination.py +3 -2
- dodal/device_manager.py +604 -0
- dodal/devices/aithre_lasershaping/goniometer.py +26 -9
- dodal/devices/aperturescatterguard.py +3 -2
- dodal/devices/areadetector/plugins/mjpg.py +10 -3
- dodal/devices/beamsize/__init__.py +0 -0
- dodal/devices/beamsize/beamsize.py +6 -0
- dodal/devices/cryostream.py +28 -57
- dodal/devices/detector/det_resolution.py +4 -2
- dodal/devices/eiger.py +26 -18
- dodal/devices/fast_grid_scan.py +14 -2
- dodal/devices/i03/beamsize.py +35 -0
- dodal/devices/i03/constants.py +7 -0
- dodal/devices/i03/undulator_dcm.py +2 -2
- dodal/devices/i04/beamsize.py +45 -0
- dodal/devices/i04/max_pixel.py +38 -0
- dodal/devices/i04/murko_results.py +36 -26
- dodal/devices/i04/transfocator.py +23 -29
- dodal/devices/i07/id.py +38 -0
- dodal/devices/i09_1_shared/__init__.py +13 -2
- dodal/devices/i09_1_shared/hard_energy.py +112 -0
- dodal/devices/i09_1_shared/hard_undulator_functions.py +85 -21
- dodal/devices/i09_2_shared/__init__.py +0 -0
- dodal/devices/i09_2_shared/i09_apple2.py +86 -0
- dodal/devices/i10/i10_apple2.py +39 -331
- dodal/devices/i17/i17_apple2.py +37 -22
- dodal/devices/i19/access_controlled/attenuator_motor_squad.py +61 -0
- dodal/devices/i19/access_controlled/blueapi_device.py +9 -1
- dodal/devices/i19/access_controlled/shutter.py +2 -4
- dodal/devices/insertion_device/__init__.py +0 -0
- dodal/devices/{apple2_undulator.py → insertion_device/apple2_undulator.py} +122 -69
- dodal/devices/insertion_device/energy_motor_lookup.py +88 -0
- dodal/devices/insertion_device/lookup_table_models.py +287 -0
- dodal/devices/ipin.py +20 -2
- dodal/devices/motors.py +33 -3
- dodal/devices/mx_phase1/beamstop.py +31 -12
- dodal/devices/oav/oav_calculations.py +9 -4
- dodal/devices/oav/oav_detector.py +65 -7
- dodal/devices/oav/oav_parameters.py +3 -1
- dodal/devices/oav/oav_to_redis_forwarder.py +18 -15
- dodal/devices/oav/pin_image_recognition/__init__.py +5 -1
- dodal/devices/oav/pin_image_recognition/utils.py +23 -1
- dodal/devices/oav/snapshots/snapshot_with_grid.py +8 -2
- dodal/devices/oav/utils.py +16 -6
- dodal/devices/robot.py +33 -18
- dodal/devices/scintillator.py +36 -14
- dodal/devices/smargon.py +2 -3
- dodal/devices/thawer.py +7 -45
- dodal/devices/undulator.py +152 -68
- dodal/plans/__init__.py +1 -1
- dodal/plans/configure_arm_trigger_and_disarm_detector.py +2 -4
- dodal/plans/load_panda_yaml.py +9 -0
- dodal/plans/verify_undulator_gap.py +2 -2
- dodal/testing/fixtures/devices/__init__.py +0 -0
- dodal/testing/fixtures/devices/apple2.py +78 -0
- dodal/utils.py +6 -3
- dodal/beamline_specific_utils/i03.py +0 -17
- dodal/testing/__init__.py +0 -3
- dodal/testing/setup.py +0 -67
- {dls_dodal-1.65.0.dist-info → dls_dodal-1.67.0.dist-info}/WHEEL +0 -0
- {dls_dodal-1.65.0.dist-info → dls_dodal-1.67.0.dist-info}/entry_points.txt +0 -0
- {dls_dodal-1.65.0.dist-info → dls_dodal-1.67.0.dist-info}/licenses/LICENSE +0 -0
- {dls_dodal-1.65.0.dist-info → dls_dodal-1.67.0.dist-info}/top_level.txt +0 -0
- /dodal/plans/{scanspec.py → spec_path.py} +0 -0
dodal/beamlines/i03.py
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
from
|
|
1
|
+
from functools import cache
|
|
2
|
+
|
|
3
|
+
from ophyd_async.core import PathProvider, Reference
|
|
2
4
|
from ophyd_async.fastcs.eiger import EigerDetector as FastEiger
|
|
3
5
|
from ophyd_async.fastcs.panda import HDFPanda
|
|
4
6
|
from yarl import URL
|
|
5
7
|
|
|
6
8
|
from dodal.common.beamlines.beamline_parameters import get_beamline_parameters
|
|
7
|
-
from dodal.common.beamlines.beamline_utils import (
|
|
8
|
-
device_factory,
|
|
9
|
-
device_instantiation,
|
|
10
|
-
get_path_provider,
|
|
11
|
-
set_path_provider,
|
|
12
|
-
)
|
|
13
9
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
14
10
|
from dodal.common.udc_directory_provider import PandASubpathProvider
|
|
11
|
+
from dodal.device_manager import DeviceManager
|
|
15
12
|
from dodal.devices.aperturescatterguard import (
|
|
16
13
|
AperturePosition,
|
|
17
14
|
ApertureScatterguard,
|
|
@@ -21,7 +18,11 @@ from dodal.devices.attenuator.attenuator import BinaryFilterAttenuator
|
|
|
21
18
|
from dodal.devices.backlight import Backlight
|
|
22
19
|
from dodal.devices.baton import Baton
|
|
23
20
|
from dodal.devices.collimation_table import CollimationTable
|
|
24
|
-
from dodal.devices.cryostream import
|
|
21
|
+
from dodal.devices.cryostream import (
|
|
22
|
+
CryoStreamGantry,
|
|
23
|
+
OxfordCryoJet,
|
|
24
|
+
OxfordCryoStream,
|
|
25
|
+
)
|
|
25
26
|
from dodal.devices.detector.detector_motion import DetectorMotion
|
|
26
27
|
from dodal.devices.diamond_filter import DiamondFilter, I03Filters
|
|
27
28
|
from dodal.devices.eiger import EigerDetector
|
|
@@ -31,8 +32,10 @@ from dodal.devices.flux import Flux
|
|
|
31
32
|
from dodal.devices.focusing_mirror import FocusingMirrorWithStripes, MirrorVoltages
|
|
32
33
|
from dodal.devices.hutch_shutter import HutchShutter
|
|
33
34
|
from dodal.devices.i03 import Beamstop
|
|
35
|
+
from dodal.devices.i03.beamsize import Beamsize
|
|
34
36
|
from dodal.devices.i03.dcm import DCM
|
|
35
37
|
from dodal.devices.i03.undulator_dcm import UndulatorDCM
|
|
38
|
+
from dodal.devices.ipin import IPin
|
|
36
39
|
from dodal.devices.motors import XYZStage
|
|
37
40
|
from dodal.devices.oav.oav_detector import OAVBeamCentreFile
|
|
38
41
|
from dodal.devices.oav.oav_parameters import OAVConfigBeamCentre
|
|
@@ -44,7 +47,7 @@ from dodal.devices.scintillator import Scintillator
|
|
|
44
47
|
from dodal.devices.smargon import Smargon
|
|
45
48
|
from dodal.devices.synchrotron import Synchrotron
|
|
46
49
|
from dodal.devices.thawer import Thawer
|
|
47
|
-
from dodal.devices.undulator import
|
|
50
|
+
from dodal.devices.undulator import UndulatorInKeV
|
|
48
51
|
from dodal.devices.webcam import Webcam
|
|
49
52
|
from dodal.devices.xbpm_feedback import XBPMFeedback
|
|
50
53
|
from dodal.devices.xspress3.xspress3 import Xspress3
|
|
@@ -69,8 +72,6 @@ BL = get_beamline_name("i03")
|
|
|
69
72
|
set_log_beamline(BL)
|
|
70
73
|
set_utils_beamline(BL)
|
|
71
74
|
|
|
72
|
-
set_path_provider(PandASubpathProvider())
|
|
73
|
-
|
|
74
75
|
I03_ZEBRA_MAPPING = ZebraMapping(
|
|
75
76
|
outputs=ZebraTTLOutputs(TTL_DETECTOR=1, TTL_SHUTTER=2, TTL_XSPRESS3=3, TTL_PANDA=4),
|
|
76
77
|
sources=ZebraSources(),
|
|
@@ -78,13 +79,22 @@ I03_ZEBRA_MAPPING = ZebraMapping(
|
|
|
78
79
|
|
|
79
80
|
PREFIX = BeamlinePrefix(BL)
|
|
80
81
|
|
|
82
|
+
devices = DeviceManager()
|
|
83
|
+
|
|
81
84
|
|
|
82
|
-
@
|
|
85
|
+
@devices.fixture
|
|
86
|
+
@cache
|
|
87
|
+
def path_provider() -> PathProvider:
|
|
88
|
+
return PandASubpathProvider()
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
@devices.fixture
|
|
92
|
+
def daq_configuration_path() -> str:
|
|
93
|
+
return DAQ_CONFIGURATION_PATH
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
@devices.factory()
|
|
83
97
|
def aperture_scatterguard() -> ApertureScatterguard:
|
|
84
|
-
"""Get the i03 aperture and scatterguard device, instantiate it if it hasn't already
|
|
85
|
-
been. If this is called when already instantiated in i03, it will return the existing
|
|
86
|
-
object.
|
|
87
|
-
"""
|
|
88
98
|
params = get_beamline_parameters()
|
|
89
99
|
return ApertureScatterguard(
|
|
90
100
|
aperture_prefix=f"{PREFIX.beamline_prefix}-MO-MAPT-01:",
|
|
@@ -94,37 +104,28 @@ def aperture_scatterguard() -> ApertureScatterguard:
|
|
|
94
104
|
)
|
|
95
105
|
|
|
96
106
|
|
|
97
|
-
@
|
|
107
|
+
@devices.factory()
|
|
98
108
|
def attenuator() -> BinaryFilterAttenuator:
|
|
99
|
-
"""Get the i03 attenuator device, instantiate it if it hasn't already been.
|
|
100
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
101
|
-
"""
|
|
102
109
|
return BinaryFilterAttenuator(
|
|
103
110
|
prefix=f"{PREFIX.beamline_prefix}-EA-ATTN-01:",
|
|
104
111
|
num_filters=16,
|
|
105
112
|
)
|
|
106
113
|
|
|
107
114
|
|
|
108
|
-
@
|
|
115
|
+
@devices.factory()
|
|
109
116
|
def beamstop() -> Beamstop:
|
|
110
|
-
"""Get the i03 beamstop device, instantiate it if it hasn't already been.
|
|
111
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
112
|
-
"""
|
|
113
117
|
return Beamstop(
|
|
114
118
|
prefix=f"{PREFIX.beamline_prefix}-MO-BS-01:",
|
|
115
119
|
beamline_parameters=get_beamline_parameters(),
|
|
116
120
|
)
|
|
117
121
|
|
|
118
122
|
|
|
119
|
-
@
|
|
123
|
+
@devices.factory()
|
|
120
124
|
def dcm() -> DCM:
|
|
121
|
-
"""Get the i03 DCM device, instantiate it if it hasn't already been.
|
|
122
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
123
|
-
"""
|
|
124
125
|
return DCM(prefix=f"{PREFIX.beamline_prefix}-MO-DCM-01:")
|
|
125
126
|
|
|
126
127
|
|
|
127
|
-
@
|
|
128
|
+
@devices.factory()
|
|
128
129
|
def vfm() -> FocusingMirrorWithStripes:
|
|
129
130
|
return FocusingMirrorWithStripes(
|
|
130
131
|
prefix=f"{PREFIX.beamline_prefix}-OP-VFM-01:",
|
|
@@ -135,7 +136,7 @@ def vfm() -> FocusingMirrorWithStripes:
|
|
|
135
136
|
)
|
|
136
137
|
|
|
137
138
|
|
|
138
|
-
@
|
|
139
|
+
@devices.factory()
|
|
139
140
|
def mirror_voltages() -> MirrorVoltages:
|
|
140
141
|
return MirrorVoltages(
|
|
141
142
|
prefix=f"{PREFIX.beamline_prefix}-MO-PSU-01:",
|
|
@@ -143,316 +144,219 @@ def mirror_voltages() -> MirrorVoltages:
|
|
|
143
144
|
)
|
|
144
145
|
|
|
145
146
|
|
|
146
|
-
@
|
|
147
|
+
@devices.factory()
|
|
147
148
|
def backlight() -> Backlight:
|
|
148
|
-
"""Get the i03 backlight device, instantiate it if it hasn't already been.
|
|
149
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
150
|
-
"""
|
|
151
149
|
return Backlight(prefix=PREFIX.beamline_prefix)
|
|
152
150
|
|
|
153
151
|
|
|
154
|
-
@
|
|
152
|
+
@devices.factory()
|
|
155
153
|
def detector_motion() -> DetectorMotion:
|
|
156
|
-
"""Get the i03 detector motion device, instantiate it if it hasn't already been.
|
|
157
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
158
|
-
"""
|
|
159
154
|
return DetectorMotion(
|
|
160
155
|
device_prefix=f"{PREFIX.beamline_prefix}-MO-DET-01:",
|
|
161
156
|
pmac_prefix=f"{PREFIX.beamline_prefix}-MO-PMAC-02:",
|
|
162
157
|
)
|
|
163
158
|
|
|
164
159
|
|
|
165
|
-
@
|
|
166
|
-
def eiger(
|
|
167
|
-
|
|
168
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
169
|
-
"""
|
|
160
|
+
@devices.v1_init(EigerDetector, prefix="BL03I-EA-EIGER-01:", wait=False)
|
|
161
|
+
def eiger(eiger: EigerDetector) -> EigerDetector:
|
|
162
|
+
return eiger
|
|
170
163
|
|
|
171
|
-
return device_instantiation(
|
|
172
|
-
device_factory=EigerDetector,
|
|
173
|
-
name="eiger",
|
|
174
|
-
prefix="-EA-EIGER-01:",
|
|
175
|
-
wait=False,
|
|
176
|
-
fake=mock,
|
|
177
|
-
)
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
@device_factory()
|
|
181
|
-
def fastcs_eiger() -> FastEiger:
|
|
182
|
-
"""Get the i03 FastCS Eiger device, instantiate it if it hasn't already been.
|
|
183
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
184
|
-
"""
|
|
185
164
|
|
|
165
|
+
@devices.factory()
|
|
166
|
+
def fastcs_eiger(path_provider: PathProvider) -> FastEiger:
|
|
186
167
|
return FastEiger(
|
|
187
168
|
prefix=PREFIX.beamline_prefix,
|
|
188
|
-
path_provider=
|
|
169
|
+
path_provider=path_provider,
|
|
189
170
|
drv_suffix="-EA-EIGER-02:",
|
|
190
171
|
hdf_suffix="-EA-EIGER-01:OD:",
|
|
191
172
|
)
|
|
192
173
|
|
|
193
174
|
|
|
194
|
-
@
|
|
175
|
+
@devices.factory()
|
|
195
176
|
def zebra_fast_grid_scan() -> ZebraFastGridScanThreeD:
|
|
196
|
-
"""Get the i03 zebra_fast_grid_scan device, instantiate it if it hasn't already been.
|
|
197
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
198
|
-
"""
|
|
199
177
|
return ZebraFastGridScanThreeD(
|
|
200
178
|
prefix=f"{PREFIX.beamline_prefix}-MO-SGON-01:",
|
|
201
179
|
)
|
|
202
180
|
|
|
203
181
|
|
|
204
|
-
@
|
|
182
|
+
@devices.factory()
|
|
205
183
|
def panda_fast_grid_scan() -> PandAFastGridScan:
|
|
206
|
-
"""
|
|
207
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
208
|
-
This is used instead of the zebra_fast_grid_scan device when using the PandA.
|
|
209
|
-
"""
|
|
184
|
+
"""This is used instead of the zebra_fast_grid_scan device when using the PandA."""
|
|
210
185
|
return PandAFastGridScan(prefix=f"{PREFIX.beamline_prefix}-MO-SGON-01:")
|
|
211
186
|
|
|
212
187
|
|
|
213
|
-
@
|
|
188
|
+
@devices.factory()
|
|
214
189
|
def oav(
|
|
215
190
|
params: OAVConfigBeamCentre | None = None,
|
|
216
191
|
) -> OAVBeamCentreFile:
|
|
217
|
-
"""Get the i03 OAV device, instantiate it if it hasn't already been.
|
|
218
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
219
|
-
"""
|
|
220
192
|
return OAVBeamCentreFile(
|
|
221
193
|
prefix=f"{PREFIX.beamline_prefix}-DI-OAV-01:",
|
|
222
194
|
config=params or OAVConfigBeamCentre(ZOOM_PARAMS_FILE, DISPLAY_CONFIG),
|
|
223
195
|
)
|
|
224
196
|
|
|
225
197
|
|
|
226
|
-
@
|
|
198
|
+
@devices.factory()
|
|
227
199
|
def pin_tip_detection() -> PinTipDetection:
|
|
228
|
-
"""Get the i03 pin tip detection device, instantiate it if it hasn't already been.
|
|
229
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
230
|
-
"""
|
|
231
200
|
return PinTipDetection(f"{PREFIX.beamline_prefix}-DI-OAV-01:")
|
|
232
201
|
|
|
233
202
|
|
|
234
|
-
@
|
|
203
|
+
@devices.factory()
|
|
235
204
|
def smargon() -> Smargon:
|
|
236
|
-
"""Get the i03 Smargon device, instantiate it if it hasn't already been.
|
|
237
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
238
|
-
"""
|
|
239
205
|
return Smargon(f"{PREFIX.beamline_prefix}-MO-SGON-01:")
|
|
240
206
|
|
|
241
207
|
|
|
242
|
-
@
|
|
208
|
+
@devices.factory()
|
|
243
209
|
def s4_slit_gaps() -> S4SlitGaps:
|
|
244
|
-
"""Get the i03 s4_slit_gaps device, instantiate it if it hasn't already been.
|
|
245
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
246
|
-
"""
|
|
247
210
|
return S4SlitGaps(f"{PREFIX.beamline_prefix}-AL-SLITS-04:")
|
|
248
211
|
|
|
249
212
|
|
|
250
|
-
@
|
|
213
|
+
@devices.factory()
|
|
251
214
|
def synchrotron() -> Synchrotron:
|
|
252
|
-
"""Get the i03 synchrotron device, instantiate it if it hasn't already been.
|
|
253
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
254
|
-
"""
|
|
255
215
|
return Synchrotron()
|
|
256
216
|
|
|
257
217
|
|
|
258
|
-
@
|
|
259
|
-
def undulator(daq_configuration_path: str
|
|
260
|
-
|
|
261
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
262
|
-
"""
|
|
263
|
-
return Undulator(
|
|
218
|
+
@devices.factory()
|
|
219
|
+
def undulator(baton: Baton, daq_configuration_path: str) -> UndulatorInKeV:
|
|
220
|
+
return UndulatorInKeV(
|
|
264
221
|
f"{BeamlinePrefix(BL).insertion_prefix}-MO-SERVC-01:",
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
baton=baton(),
|
|
222
|
+
id_gap_lookup_table_path=f"{daq_configuration_path}/lookup/BeamLine_Undulator_toGap.txt",
|
|
223
|
+
baton=baton,
|
|
268
224
|
)
|
|
269
225
|
|
|
270
226
|
|
|
271
|
-
@
|
|
272
|
-
def undulator_dcm(
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
"""
|
|
276
|
-
# evaluate here not as parameter default to enable post-import mocking
|
|
277
|
-
undulator_singleton = (
|
|
278
|
-
undulator(daq_configuration_path=daq_configuration_path)
|
|
279
|
-
if daq_configuration_path and daq_configuration_path != DAQ_CONFIGURATION_PATH
|
|
280
|
-
else undulator()
|
|
281
|
-
)
|
|
227
|
+
@devices.factory()
|
|
228
|
+
def undulator_dcm(
|
|
229
|
+
undulator: UndulatorInKeV, dcm: DCM, daq_configuration_path: str
|
|
230
|
+
) -> UndulatorDCM:
|
|
282
231
|
return UndulatorDCM(
|
|
283
|
-
undulator=
|
|
284
|
-
dcm=dcm
|
|
285
|
-
daq_configuration_path=daq_configuration_path
|
|
232
|
+
undulator=undulator,
|
|
233
|
+
dcm=dcm,
|
|
234
|
+
daq_configuration_path=daq_configuration_path,
|
|
286
235
|
)
|
|
287
236
|
|
|
288
237
|
|
|
289
|
-
@
|
|
238
|
+
@devices.factory()
|
|
290
239
|
def zebra() -> Zebra:
|
|
291
|
-
"""Get the i03 zebra device, instantiate it if it hasn't already been.
|
|
292
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
293
|
-
"""
|
|
294
240
|
return Zebra(
|
|
295
241
|
prefix=f"{PREFIX.beamline_prefix}-EA-ZEBRA-01:",
|
|
296
242
|
mapping=I03_ZEBRA_MAPPING,
|
|
297
243
|
)
|
|
298
244
|
|
|
299
245
|
|
|
300
|
-
@
|
|
246
|
+
@devices.factory()
|
|
301
247
|
def xspress3mini() -> Xspress3:
|
|
302
|
-
"""Get the i03 Xspress3Mini device, instantiate it if it hasn't already been.
|
|
303
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
304
|
-
"""
|
|
305
248
|
return Xspress3(f"{PREFIX.beamline_prefix}-EA-XSP3-01:")
|
|
306
249
|
|
|
307
250
|
|
|
308
|
-
@
|
|
309
|
-
def panda() -> HDFPanda:
|
|
310
|
-
"""Get the i03 panda device, instantiate it if it hasn't already been.
|
|
311
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
312
|
-
"""
|
|
251
|
+
@devices.factory()
|
|
252
|
+
def panda(path_provider: PathProvider) -> HDFPanda:
|
|
313
253
|
return HDFPanda(
|
|
314
254
|
f"{PREFIX.beamline_prefix}-EA-PANDA-01:",
|
|
315
|
-
path_provider=
|
|
255
|
+
path_provider=path_provider,
|
|
316
256
|
)
|
|
317
257
|
|
|
318
258
|
|
|
319
|
-
@
|
|
259
|
+
@devices.factory()
|
|
320
260
|
def sample_shutter() -> ZebraShutter:
|
|
321
|
-
"""Get the i03 sample shutter device, instantiate it if it hasn't already been.
|
|
322
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
323
|
-
"""
|
|
324
261
|
return ZebraShutter(f"{PREFIX.beamline_prefix}-EA-SHTR-01:")
|
|
325
262
|
|
|
326
263
|
|
|
327
|
-
@
|
|
264
|
+
@devices.factory()
|
|
328
265
|
def hutch_shutter() -> HutchShutter:
|
|
329
|
-
"""Get the i03 hutch shutter device, instantiate it if it hasn't already been.
|
|
330
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
331
|
-
"""
|
|
332
266
|
return HutchShutter(f"{PREFIX.beamline_prefix}-PS-SHTR-01:")
|
|
333
267
|
|
|
334
268
|
|
|
335
|
-
@
|
|
269
|
+
@devices.factory()
|
|
336
270
|
def flux() -> Flux:
|
|
337
|
-
"""Get the i03 flux device, instantiate it if it hasn't already been.
|
|
338
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
339
|
-
"""
|
|
340
271
|
return Flux(f"{PREFIX.beamline_prefix}-MO-FLUX-01:")
|
|
341
272
|
|
|
342
273
|
|
|
343
|
-
@
|
|
344
|
-
def xbpm_feedback() -> XBPMFeedback:
|
|
345
|
-
""
|
|
346
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
347
|
-
"""
|
|
348
|
-
return XBPMFeedback(f"{PREFIX.beamline_prefix}-EA-FDBK-01:", baton=baton())
|
|
274
|
+
@devices.factory()
|
|
275
|
+
def xbpm_feedback(baton: Baton) -> XBPMFeedback:
|
|
276
|
+
return XBPMFeedback(f"{PREFIX.beamline_prefix}-EA-FDBK-01:", baton=baton)
|
|
349
277
|
|
|
350
278
|
|
|
351
|
-
@
|
|
279
|
+
@devices.factory()
|
|
352
280
|
def zocalo() -> ZocaloResults:
|
|
353
|
-
"""Get the i03 ZocaloResults device, instantiate it if it hasn't already been.
|
|
354
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
355
|
-
"""
|
|
356
281
|
return ZocaloResults(results_source=ZocaloSource.GPU)
|
|
357
282
|
|
|
358
283
|
|
|
359
|
-
@
|
|
284
|
+
@devices.factory()
|
|
360
285
|
def robot() -> BartRobot:
|
|
361
|
-
"""Get the i03 robot device, instantiate it if it hasn't already been.
|
|
362
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
363
|
-
"""
|
|
364
286
|
return BartRobot(f"{PREFIX.beamline_prefix}-MO-ROBOT-01:")
|
|
365
287
|
|
|
366
288
|
|
|
367
|
-
@
|
|
289
|
+
@devices.factory()
|
|
368
290
|
def webcam() -> Webcam:
|
|
369
|
-
"""Get the i03 webcam, instantiate it if it hasn't already been.
|
|
370
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
371
|
-
"""
|
|
372
291
|
return Webcam(url=URL("http://i03-webcam1/axis-cgi/jpg/image.cgi"))
|
|
373
292
|
|
|
374
293
|
|
|
375
|
-
@
|
|
294
|
+
@devices.factory()
|
|
376
295
|
def thawer() -> Thawer:
|
|
377
|
-
"""Get the i03 thawer, instantiate it if it hasn't already been.
|
|
378
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
379
|
-
"""
|
|
380
296
|
return Thawer(f"{PREFIX.beamline_prefix}-EA-THAW-01")
|
|
381
297
|
|
|
382
298
|
|
|
383
|
-
@
|
|
299
|
+
@devices.factory()
|
|
384
300
|
def lower_gonio() -> XYZStage:
|
|
385
|
-
"""Get the i03 lower gonio device, instantiate it if it hasn't already been.
|
|
386
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
387
|
-
"""
|
|
388
301
|
return XYZStage(f"{PREFIX.beamline_prefix}-MO-GONP-01:")
|
|
389
302
|
|
|
390
303
|
|
|
391
|
-
@
|
|
392
|
-
def cryostream() ->
|
|
393
|
-
""
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
304
|
+
@devices.factory()
|
|
305
|
+
def cryostream() -> OxfordCryoStream:
|
|
306
|
+
return OxfordCryoStream(f"{PREFIX.beamline_prefix}-EA-CSTRM-01:")
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
@devices.factory()
|
|
310
|
+
def cryojet() -> OxfordCryoJet:
|
|
311
|
+
return OxfordCryoJet(f"{PREFIX.beamline_prefix}-EA-CJET-01:")
|
|
397
312
|
|
|
398
313
|
|
|
399
|
-
@
|
|
314
|
+
@devices.factory()
|
|
400
315
|
def cryostream_gantry() -> CryoStreamGantry:
|
|
401
|
-
"""Get the i03 cryostream gantry device, instantiate it if it hasn't already been.
|
|
402
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
403
|
-
"""
|
|
404
316
|
return CryoStreamGantry(PREFIX.beamline_prefix)
|
|
405
317
|
|
|
406
318
|
|
|
407
|
-
@
|
|
319
|
+
@devices.factory()
|
|
408
320
|
def diamond_filter() -> DiamondFilter[I03Filters]:
|
|
409
|
-
"""Get the i03 diamond filter device, instantiate it if it hasn't already been.
|
|
410
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
411
|
-
"""
|
|
412
321
|
return DiamondFilter[I03Filters](
|
|
413
322
|
f"{PREFIX.beamline_prefix}-MO-FLTR-01:Y", I03Filters
|
|
414
323
|
)
|
|
415
324
|
|
|
416
325
|
|
|
417
|
-
@
|
|
326
|
+
@devices.factory()
|
|
418
327
|
def qbpm() -> QBPM:
|
|
419
|
-
"""Get the i03 qbpm device, instantiate it if it hasn't already been.
|
|
420
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
421
|
-
"""
|
|
422
328
|
return QBPM(f"{PREFIX.beamline_prefix}-DI-QBPM-01:")
|
|
423
329
|
|
|
424
330
|
|
|
425
|
-
@
|
|
331
|
+
@devices.factory()
|
|
426
332
|
def baton() -> Baton:
|
|
427
|
-
"""Get the i03 baton device, instantiate it if it hasn't already been.
|
|
428
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
429
|
-
"""
|
|
430
333
|
return Baton(f"{PREFIX.beamline_prefix}-CS-BATON-01:")
|
|
431
334
|
|
|
432
335
|
|
|
433
|
-
@
|
|
336
|
+
@devices.factory()
|
|
434
337
|
def fluorescence_det_motion() -> FluorescenceDetector:
|
|
435
|
-
"""Get the i03 device for moving the fluorescence detector, instantiate it if it hasn't already been.
|
|
436
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
437
|
-
"""
|
|
438
338
|
return FluorescenceDetector(f"{PREFIX.beamline_prefix}-EA-FLU-01:")
|
|
439
339
|
|
|
440
340
|
|
|
441
|
-
@
|
|
442
|
-
def scintillator() -> Scintillator:
|
|
443
|
-
"""Get the i03 scintillator device, instantiate it if it hasn't already been.
|
|
444
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
445
|
-
"""
|
|
341
|
+
@devices.factory()
|
|
342
|
+
def scintillator(aperture_scatterguard: ApertureScatterguard) -> Scintillator:
|
|
446
343
|
return Scintillator(
|
|
447
344
|
f"{PREFIX.beamline_prefix}-MO-SCIN-01:",
|
|
448
|
-
Reference(aperture_scatterguard
|
|
345
|
+
Reference(aperture_scatterguard),
|
|
449
346
|
get_beamline_parameters(),
|
|
450
347
|
)
|
|
451
348
|
|
|
452
349
|
|
|
453
|
-
@
|
|
350
|
+
@devices.factory()
|
|
454
351
|
def collimation_table() -> CollimationTable:
|
|
455
|
-
"""Get the i03 device for moving the collimation table, instantiate it if it hasn't already been.
|
|
456
|
-
If this is called when already instantiated in i03, it will return the existing object.
|
|
457
|
-
"""
|
|
458
352
|
return CollimationTable(prefix=f"{PREFIX.beamline_prefix}-MO-TABLE-01")
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
@devices.factory()
|
|
356
|
+
def beamsize(aperture_scatterguard: ApertureScatterguard) -> Beamsize:
|
|
357
|
+
return Beamsize(aperture_scatterguard)
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
@devices.factory()
|
|
361
|
+
def ipin() -> IPin:
|
|
362
|
+
return IPin(f"{PREFIX.beamline_prefix}-EA-PIN-01:")
|
dodal/beamlines/i04.py
CHANGED
|
@@ -13,6 +13,7 @@ from dodal.devices.aperturescatterguard import (
|
|
|
13
13
|
)
|
|
14
14
|
from dodal.devices.attenuator.attenuator import BinaryFilterAttenuator
|
|
15
15
|
from dodal.devices.backlight import Backlight
|
|
16
|
+
from dodal.devices.baton import Baton
|
|
16
17
|
from dodal.devices.detector import DetectorParams
|
|
17
18
|
from dodal.devices.detector.detector_motion import DetectorMotion
|
|
18
19
|
from dodal.devices.diamond_filter import DiamondFilter, I04Filters
|
|
@@ -20,7 +21,9 @@ from dodal.devices.eiger import EigerDetector
|
|
|
20
21
|
from dodal.devices.fast_grid_scan import ZebraFastGridScanThreeD
|
|
21
22
|
from dodal.devices.flux import Flux
|
|
22
23
|
from dodal.devices.i03.dcm import DCM
|
|
24
|
+
from dodal.devices.i04.beamsize import Beamsize
|
|
23
25
|
from dodal.devices.i04.constants import RedisConstants
|
|
26
|
+
from dodal.devices.i04.max_pixel import MaxPixel
|
|
24
27
|
from dodal.devices.i04.murko_results import MurkoResultsDevice
|
|
25
28
|
from dodal.devices.i04.transfocator import Transfocator
|
|
26
29
|
from dodal.devices.ipin import IPin
|
|
@@ -36,7 +39,7 @@ from dodal.devices.scintillator import Scintillator
|
|
|
36
39
|
from dodal.devices.smargon import Smargon
|
|
37
40
|
from dodal.devices.synchrotron import Synchrotron
|
|
38
41
|
from dodal.devices.thawer import Thawer
|
|
39
|
-
from dodal.devices.undulator import
|
|
42
|
+
from dodal.devices.undulator import UndulatorInKeV
|
|
40
43
|
from dodal.devices.xbpm_feedback import XBPMFeedback
|
|
41
44
|
from dodal.devices.zebra.zebra import Zebra
|
|
42
45
|
from dodal.devices.zebra.zebra_constants_mapping import (
|
|
@@ -141,12 +144,20 @@ def transfocator() -> Transfocator:
|
|
|
141
144
|
return Transfocator(f"{PREFIX.beamline_prefix}-MO-FSWT-01:")
|
|
142
145
|
|
|
143
146
|
|
|
147
|
+
@device_factory()
|
|
148
|
+
def baton() -> Baton:
|
|
149
|
+
"""Get the i04 baton device, instantiate it if it hasn't already been.
|
|
150
|
+
If this is called when already instantiated in i04, it will return the existing object.
|
|
151
|
+
"""
|
|
152
|
+
return Baton(f"{PREFIX.beamline_prefix}-CS-BATON-01:")
|
|
153
|
+
|
|
154
|
+
|
|
144
155
|
@device_factory()
|
|
145
156
|
def xbpm_feedback() -> XBPMFeedback:
|
|
146
157
|
"""Get the i04 xbpm_feedback device, instantiate it if it hasn't already been.
|
|
147
158
|
If this is called when already instantiated in i04, it will return the existing object.
|
|
148
159
|
"""
|
|
149
|
-
return XBPMFeedback(f"{PREFIX.beamline_prefix}-EA-FDBK-01:")
|
|
160
|
+
return XBPMFeedback(f"{PREFIX.beamline_prefix}-EA-FDBK-01:", baton=baton())
|
|
150
161
|
|
|
151
162
|
|
|
152
163
|
@device_factory()
|
|
@@ -228,13 +239,14 @@ def s4_slit_gaps() -> S4SlitGaps:
|
|
|
228
239
|
|
|
229
240
|
|
|
230
241
|
@device_factory()
|
|
231
|
-
def undulator() ->
|
|
242
|
+
def undulator() -> UndulatorInKeV:
|
|
232
243
|
"""Get the i04 undulator device, instantiate it if it hasn't already been.
|
|
233
244
|
If this is called when already instantiated in i04, it will return the existing object.
|
|
234
245
|
"""
|
|
235
|
-
return
|
|
246
|
+
return UndulatorInKeV(
|
|
236
247
|
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
|
|
237
248
|
id_gap_lookup_table_path="/dls_sw/i04/software/daq_configuration/lookup/BeamLine_Undulator_toGap.txt",
|
|
249
|
+
baton=baton(),
|
|
238
250
|
)
|
|
239
251
|
|
|
240
252
|
|
|
@@ -281,6 +293,7 @@ def oav_full_screen(params: OAVConfig | None = None) -> OAVBeamCentrePV:
|
|
|
281
293
|
prefix=f"{PREFIX.beamline_prefix}-DI-OAV-01:",
|
|
282
294
|
config=params or OAVConfig(ZOOM_PARAMS_FILE),
|
|
283
295
|
overlay_channel=3,
|
|
296
|
+
mjpeg_prefix="XTAL",
|
|
284
297
|
)
|
|
285
298
|
|
|
286
299
|
|
|
@@ -320,6 +333,8 @@ def oav_to_redis_forwarder() -> OAVToRedisForwarder:
|
|
|
320
333
|
"""
|
|
321
334
|
return OAVToRedisForwarder(
|
|
322
335
|
f"{PREFIX.beamline_prefix}-DI-OAV-01:",
|
|
336
|
+
oav_roi=oav(),
|
|
337
|
+
oav_fs=oav_full_screen(),
|
|
323
338
|
redis_host=RedisConstants.REDIS_HOST,
|
|
324
339
|
redis_password=RedisConstants.REDIS_PASSWORD,
|
|
325
340
|
redis_db=RedisConstants.MURKO_REDIS_DB,
|
|
@@ -374,3 +389,24 @@ def scintillator() -> Scintillator:
|
|
|
374
389
|
Reference(aperture_scatterguard()),
|
|
375
390
|
get_beamline_parameters(),
|
|
376
391
|
)
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
@device_factory()
|
|
395
|
+
def max_pixel() -> MaxPixel:
|
|
396
|
+
"""Get the i04 max pixel device, instantiate it if it hasn't already been.
|
|
397
|
+
If this is called when already instantiated in i04, it will return the existing object.
|
|
398
|
+
"""
|
|
399
|
+
return MaxPixel(
|
|
400
|
+
f"{PREFIX.beamline_prefix}-DI-OAV-01:",
|
|
401
|
+
)
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
@device_factory()
|
|
405
|
+
def beamsize() -> Beamsize:
|
|
406
|
+
"""Get the i04 beamsize device, instantiate it if it hasn't already been.
|
|
407
|
+
If this is called when already instantiated in i04, it will return the existing object.
|
|
408
|
+
"""
|
|
409
|
+
return Beamsize(
|
|
410
|
+
transfocator=transfocator(),
|
|
411
|
+
aperture_scatterguard=aperture_scatterguard(),
|
|
412
|
+
)
|
dodal/beamlines/i05.py
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
from dodal.beamline_specific_utils.i05_shared import pgm as i05_pgm
|
|
2
|
-
from dodal.common.beamlines.beamline_utils import
|
|
2
|
+
from dodal.common.beamlines.beamline_utils import (
|
|
3
|
+
device_factory,
|
|
4
|
+
)
|
|
3
5
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
6
|
+
from dodal.devices.insertion_device.apple2_undulator import (
|
|
7
|
+
Apple2,
|
|
8
|
+
UndulatorGap,
|
|
9
|
+
UndulatorLockedPhaseAxes,
|
|
10
|
+
)
|
|
4
11
|
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
5
12
|
from dodal.devices.synchrotron import Synchrotron
|
|
6
13
|
from dodal.log import set_beamline as set_log_beamline
|
|
@@ -20,3 +27,23 @@ def synchrotron() -> Synchrotron:
|
|
|
20
27
|
@device_factory()
|
|
21
28
|
def pgm() -> PlaneGratingMonochromator:
|
|
22
29
|
return i05_pgm()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@device_factory()
|
|
33
|
+
def id_gap() -> UndulatorGap:
|
|
34
|
+
return UndulatorGap(prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:")
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@device_factory()
|
|
38
|
+
def id_phase() -> UndulatorLockedPhaseAxes:
|
|
39
|
+
return UndulatorLockedPhaseAxes(
|
|
40
|
+
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
|
|
41
|
+
top_outer="PL",
|
|
42
|
+
btm_inner="PU",
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@device_factory()
|
|
47
|
+
def id() -> Apple2:
|
|
48
|
+
"""i05 insertion device."""
|
|
49
|
+
return Apple2(id_gap=id_gap(), id_phase=id_phase())
|