dls-dodal 1.62.0__py3-none-any.whl → 1.63.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.62.0.dist-info → dls_dodal-1.63.0.dist-info}/METADATA +1 -1
- {dls_dodal-1.62.0.dist-info → dls_dodal-1.63.0.dist-info}/RECORD +76 -71
- dls_dodal-1.63.0.dist-info/entry_points.txt +3 -0
- dodal/_version.py +2 -2
- dodal/beamlines/__init__.py +1 -0
- dodal/beamlines/adsim.py +5 -3
- dodal/beamlines/b21.py +3 -1
- dodal/beamlines/i02_2.py +32 -0
- dodal/beamlines/i03.py +9 -0
- dodal/beamlines/i09.py +10 -3
- dodal/beamlines/i09_1.py +9 -3
- dodal/beamlines/i10.py +7 -69
- dodal/beamlines/i10_1.py +35 -0
- dodal/beamlines/i10_optics.py +205 -0
- dodal/beamlines/i15_1.py +5 -5
- dodal/beamlines/i17.py +50 -1
- dodal/beamlines/i18.py +15 -9
- dodal/beamlines/i19_1.py +3 -3
- dodal/beamlines/i19_2.py +2 -2
- dodal/beamlines/i19_optics.py +4 -1
- dodal/beamlines/i24.py +3 -3
- dodal/cli.py +4 -4
- dodal/common/visit.py +4 -4
- dodal/devices/aperturescatterguard.py +6 -4
- dodal/devices/apple2_undulator.py +211 -114
- dodal/devices/attenuator/filter_selections.py +6 -6
- dodal/devices/common_dcm.py +62 -15
- dodal/devices/current_amplifiers/femto.py +4 -4
- dodal/devices/current_amplifiers/sr570.py +3 -3
- dodal/devices/fast_grid_scan.py +4 -4
- dodal/devices/fast_shutter.py +19 -7
- dodal/devices/i02_2/__init__.py +0 -0
- dodal/devices/i03/dcm.py +4 -2
- dodal/devices/i04/murko_results.py +35 -14
- dodal/devices/i09/__init__.py +1 -2
- dodal/devices/i10/__init__.py +29 -0
- dodal/devices/i10/diagnostics.py +37 -5
- dodal/devices/i10/i10_apple2.py +125 -229
- dodal/devices/i10/slits.py +38 -6
- dodal/devices/i15/dcm.py +6 -45
- dodal/devices/i17/__init__.py +0 -0
- dodal/devices/i17/i17_apple2.py +51 -0
- dodal/devices/i19/access_controlled/__init__.py +0 -0
- dodal/devices/i19/{shutter.py → access_controlled/shutter.py} +7 -4
- dodal/devices/i22/dcm.py +2 -2
- dodal/devices/i24/dcm.py +2 -2
- dodal/devices/oav/oav_detector.py +1 -1
- dodal/devices/oav/oav_parameters.py +4 -4
- dodal/devices/oav/oav_to_redis_forwarder.py +4 -4
- dodal/devices/oav/pin_image_recognition/__init__.py +3 -3
- dodal/devices/oav/pin_image_recognition/utils.py +1 -1
- dodal/devices/oav/snapshots/snapshot.py +1 -1
- dodal/devices/oav/snapshots/snapshot_image_processing.py +12 -12
- dodal/devices/oav/snapshots/snapshot_with_grid.py +1 -1
- dodal/devices/oav/utils.py +2 -2
- dodal/devices/pgm.py +3 -3
- dodal/devices/robot.py +5 -5
- dodal/devices/tetramm.py +9 -5
- dodal/devices/thawer.py +0 -4
- dodal/devices/v2f.py +2 -2
- dodal/devices/zebra/zebra_constants_mapping.py +2 -2
- dodal/devices/zocalo/__init__.py +4 -4
- dodal/devices/zocalo/zocalo_results.py +4 -4
- dodal/log.py +9 -9
- dodal/plan_stubs/motor_utils.py +4 -4
- dodal/plans/configure_arm_trigger_and_disarm_detector.py +2 -2
- dodal/plans/save_panda.py +7 -7
- dodal/plans/verify_undulator_gap.py +2 -2
- dls_dodal-1.62.0.dist-info/entry_points.txt +0 -3
- dodal/beamlines/i10-1.py +0 -25
- dodal/devices/i09/dcm.py +0 -26
- {dls_dodal-1.62.0.dist-info → dls_dodal-1.63.0.dist-info}/WHEEL +0 -0
- {dls_dodal-1.62.0.dist-info → dls_dodal-1.63.0.dist-info}/licenses/LICENSE +0 -0
- {dls_dodal-1.62.0.dist-info → dls_dodal-1.63.0.dist-info}/top_level.txt +0 -0
- /dodal/devices/areadetector/plugins/{CAM.py → cam.py} +0 -0
- /dodal/devices/areadetector/plugins/{MJPG.py → mjpg.py} +0 -0
- /dodal/devices/i18/{KBMirror.py → kb_mirror.py} +0 -0
- /dodal/devices/i19/{blueapi_device.py → access_controlled/blueapi_device.py} +0 -0
- /dodal/devices/i19/{hutch_access.py → access_controlled/hutch_access.py} +0 -0
dodal/beamlines/i10_1.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from dodal.common.beamlines.beamline_utils import device_factory
|
|
2
|
+
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
3
|
+
from dodal.devices.i10 import I10JDiagnostic, I10JSlits, PiezoMirror
|
|
4
|
+
from dodal.devices.temperture_controller.lakeshore.lakeshore import Lakeshore336
|
|
5
|
+
from dodal.log import set_beamline as set_log_beamline
|
|
6
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
7
|
+
|
|
8
|
+
BL = get_beamline_name("i10-1")
|
|
9
|
+
set_log_beamline(BL)
|
|
10
|
+
set_utils_beamline(BL)
|
|
11
|
+
PREFIX = BeamlinePrefix("i10", "J")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@device_factory()
|
|
15
|
+
def em_temperature_controller() -> Lakeshore336:
|
|
16
|
+
return Lakeshore336(
|
|
17
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-TCTRL-41:",
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@device_factory()
|
|
22
|
+
def slits() -> I10JSlits:
|
|
23
|
+
return I10JSlits(prefix=f"{PREFIX.beamline_prefix}-AL-SLITS-")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@device_factory()
|
|
27
|
+
def diagnostic() -> I10JDiagnostic:
|
|
28
|
+
return I10JDiagnostic(
|
|
29
|
+
prefix=f"{PREFIX.beamline_prefix}-DI-",
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@device_factory()
|
|
34
|
+
def focusing_mirror() -> PiezoMirror:
|
|
35
|
+
return PiezoMirror(prefix=f"{PREFIX.beamline_prefix}-OP-FOCA-01:")
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
"""
|
|
2
|
+
note:
|
|
3
|
+
I10 has two insertion devices one up(idu) and one down stream(idd).
|
|
4
|
+
It is worth noting that the downstream device is slightly longer,
|
|
5
|
+
so it can reach Mn edge for linear arbitrary.
|
|
6
|
+
idd == id1, idu == id2.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from daq_config_server.client import ConfigServer
|
|
10
|
+
|
|
11
|
+
from dodal.common.beamlines.beamline_utils import device_factory
|
|
12
|
+
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
13
|
+
from dodal.devices.apple2_undulator import (
|
|
14
|
+
BeamEnergy,
|
|
15
|
+
InsertionDeviceEnergy,
|
|
16
|
+
InsertionDevicePolarisation,
|
|
17
|
+
UndulatorGap,
|
|
18
|
+
UndulatorJawPhase,
|
|
19
|
+
UndulatorPhaseAxes,
|
|
20
|
+
)
|
|
21
|
+
from dodal.devices.i10 import (
|
|
22
|
+
I10SharedDiagnostic,
|
|
23
|
+
I10SharedSlits,
|
|
24
|
+
I10SharedSlitsDrainCurrent,
|
|
25
|
+
PiezoMirror,
|
|
26
|
+
)
|
|
27
|
+
from dodal.devices.i10.i10_apple2 import (
|
|
28
|
+
I10Apple2,
|
|
29
|
+
I10Apple2Controller,
|
|
30
|
+
LinearArbitraryAngle,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
# Imports taken from i10 while we work out how to deal with split end stations
|
|
34
|
+
from dodal.devices.i10.i10_setting_data import I10Grating
|
|
35
|
+
from dodal.devices.pgm import PGM
|
|
36
|
+
from dodal.devices.synchrotron import Synchrotron
|
|
37
|
+
from dodal.log import set_beamline as set_log_beamline
|
|
38
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
39
|
+
|
|
40
|
+
BL = get_beamline_name("i10")
|
|
41
|
+
set_log_beamline(BL)
|
|
42
|
+
set_utils_beamline(BL)
|
|
43
|
+
PREFIX = BeamlinePrefix(BL)
|
|
44
|
+
|
|
45
|
+
LOOK_UPTABLE_DIR = "/dls_sw/i10/software/blueapi/scratch/i10-config/lookupTables/"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@device_factory()
|
|
49
|
+
def synchrotron() -> Synchrotron:
|
|
50
|
+
return Synchrotron()
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
"""Mirrors"""
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
@device_factory()
|
|
57
|
+
def first_mirror() -> PiezoMirror:
|
|
58
|
+
return PiezoMirror(prefix=f"{PREFIX.beamline_prefix}-OP-COL-01:")
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
@device_factory()
|
|
62
|
+
def pgm() -> PGM:
|
|
63
|
+
"I10 Plane Grating Monochromator, it can change energy via pgm.energy.set(<energy>)"
|
|
64
|
+
return PGM(
|
|
65
|
+
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
|
|
66
|
+
grating=I10Grating,
|
|
67
|
+
grating_pv="NLINES2",
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@device_factory()
|
|
72
|
+
def switching_mirror() -> PiezoMirror:
|
|
73
|
+
return PiezoMirror(prefix=f"{PREFIX.beamline_prefix}-OP-SWTCH-01:")
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
"""ID"""
|
|
77
|
+
|
|
78
|
+
I10_CONF_CLIENT = ConfigServer(url="https://daq-config.diamond.ac.uk")
|
|
79
|
+
|
|
80
|
+
LOOK_UPTABLE_DIR = "/dls_sw/i10/software/gda/workspace_git/gda-diamond.git/configurations/i10-shared/lookupTables/"
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
@device_factory()
|
|
84
|
+
def idd() -> I10Apple2:
|
|
85
|
+
"""i10 downstream insertion device:"""
|
|
86
|
+
return I10Apple2(
|
|
87
|
+
id_gap=UndulatorGap(prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:"),
|
|
88
|
+
id_phase=UndulatorPhaseAxes(
|
|
89
|
+
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
|
|
90
|
+
top_outer="RPQ1",
|
|
91
|
+
top_inner="RPQ2",
|
|
92
|
+
btm_inner="RPQ3",
|
|
93
|
+
btm_outer="RPQ4",
|
|
94
|
+
),
|
|
95
|
+
id_jaw_phase=UndulatorJawPhase(
|
|
96
|
+
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
|
|
97
|
+
move_pv="RPQ1",
|
|
98
|
+
),
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
@device_factory()
|
|
103
|
+
def idd_controller() -> I10Apple2Controller:
|
|
104
|
+
"""I10 downstream insertion device controller."""
|
|
105
|
+
return I10Apple2Controller(
|
|
106
|
+
apple2=idd(),
|
|
107
|
+
lookuptable_dir=LOOK_UPTABLE_DIR,
|
|
108
|
+
source=("Source", "idd"),
|
|
109
|
+
config_client=I10_CONF_CLIENT,
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
@device_factory()
|
|
114
|
+
def idd_energy() -> InsertionDeviceEnergy:
|
|
115
|
+
return InsertionDeviceEnergy(id_controller=idd_controller())
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
@device_factory()
|
|
119
|
+
def idd_polarisation() -> InsertionDevicePolarisation:
|
|
120
|
+
return InsertionDevicePolarisation(id_controller=idd_controller())
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
@device_factory()
|
|
124
|
+
def idd_laa() -> LinearArbitraryAngle:
|
|
125
|
+
return LinearArbitraryAngle(id_controller=idd_controller())
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
@device_factory()
|
|
129
|
+
def energy_dd() -> BeamEnergy:
|
|
130
|
+
"""Beam energy from down energy devices."""
|
|
131
|
+
return BeamEnergy(id_energy=idd_energy(), mono=pgm().energy)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
@device_factory()
|
|
135
|
+
def idu() -> I10Apple2:
|
|
136
|
+
"""i10 upstream insertion device"""
|
|
137
|
+
return I10Apple2(
|
|
138
|
+
id_gap=UndulatorGap(prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-21:"),
|
|
139
|
+
id_phase=UndulatorPhaseAxes(
|
|
140
|
+
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-21:",
|
|
141
|
+
top_outer="RPQ1",
|
|
142
|
+
top_inner="RPQ2",
|
|
143
|
+
btm_inner="RPQ3",
|
|
144
|
+
btm_outer="RPQ4",
|
|
145
|
+
),
|
|
146
|
+
id_jaw_phase=UndulatorJawPhase(
|
|
147
|
+
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-21:",
|
|
148
|
+
move_pv="RPQ1",
|
|
149
|
+
),
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
@device_factory()
|
|
154
|
+
def idu_controller() -> I10Apple2Controller:
|
|
155
|
+
"""I10 upstream insertion device controller."""
|
|
156
|
+
return I10Apple2Controller(
|
|
157
|
+
apple2=idu(),
|
|
158
|
+
lookuptable_dir=LOOK_UPTABLE_DIR,
|
|
159
|
+
source=("Source", "idu"),
|
|
160
|
+
config_client=I10_CONF_CLIENT,
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
@device_factory()
|
|
165
|
+
def idu_energy() -> InsertionDeviceEnergy:
|
|
166
|
+
return InsertionDeviceEnergy(id_controller=idu_controller())
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
@device_factory()
|
|
170
|
+
def idu_polarisation() -> InsertionDevicePolarisation:
|
|
171
|
+
return InsertionDevicePolarisation(id_controller=idu_controller())
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
@device_factory()
|
|
175
|
+
def idu_laa() -> LinearArbitraryAngle:
|
|
176
|
+
return LinearArbitraryAngle(id_controller=idu_controller())
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
@device_factory()
|
|
180
|
+
def energy_ud() -> BeamEnergy:
|
|
181
|
+
"""Beam energy from down energy devices."""
|
|
182
|
+
return BeamEnergy(id_energy=idu_energy(), mono=pgm().energy)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
"""Slits"""
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
@device_factory()
|
|
189
|
+
def optics_slits() -> I10SharedSlits:
|
|
190
|
+
return I10SharedSlits(prefix=f"{PREFIX.beamline_prefix}-AL-SLITS-")
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
"""Diagnostics"""
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
@device_factory()
|
|
197
|
+
def optics_diagnostics() -> I10SharedDiagnostic:
|
|
198
|
+
return I10SharedDiagnostic(
|
|
199
|
+
prefix=f"{PREFIX.beamline_prefix}-DI-",
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
@device_factory()
|
|
204
|
+
def optics_slits_current() -> I10SharedSlitsDrainCurrent:
|
|
205
|
+
return I10SharedSlitsDrainCurrent(prefix=f"{PREFIX.beamline_prefix}-")
|
dodal/beamlines/i15_1.py
CHANGED
|
@@ -25,7 +25,7 @@ to one or more Bluesky Protocols.
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
@device_factory()
|
|
28
|
-
def
|
|
28
|
+
def att_y() -> NumberedTripleAxisStage:
|
|
29
29
|
return NumberedTripleAxisStage(
|
|
30
30
|
f"{PREFIX.beamline_prefix}-OP-ATTN-01:",
|
|
31
31
|
axis1_infix="STICK1",
|
|
@@ -35,18 +35,18 @@ def attY() -> NumberedTripleAxisStage:
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
@device_factory()
|
|
38
|
-
def
|
|
38
|
+
def base_y() -> Motor:
|
|
39
39
|
return Motor(f"{PREFIX.beamline_prefix}-MO-TABLE-01:Y")
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
@device_factory()
|
|
43
|
-
def
|
|
43
|
+
def blower_y() -> Motor:
|
|
44
44
|
"""Same motor as blowerZ"""
|
|
45
45
|
return Motor(f"{PREFIX.beamline_prefix}-EA-BLOWR-01:TLATE")
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
@device_factory()
|
|
49
|
-
def
|
|
49
|
+
def blower_z() -> Motor:
|
|
50
50
|
"""Same motor as blowerY"""
|
|
51
51
|
return Motor(f"{PREFIX.beamline_prefix}-EA-BLOWR-01:TLATE")
|
|
52
52
|
|
|
@@ -67,7 +67,7 @@ def det2() -> YZStage:
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
@device_factory()
|
|
70
|
-
def
|
|
70
|
+
def env_x() -> Motor:
|
|
71
71
|
return Motor(f"{PREFIX.beamline_prefix}-MO-TABLE-01:ENV:X")
|
|
72
72
|
|
|
73
73
|
|
dodal/beamlines/i17.py
CHANGED
|
@@ -7,6 +7,16 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
7
7
|
device_factory,
|
|
8
8
|
)
|
|
9
9
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
10
|
+
from dodal.devices.apple2_undulator import (
|
|
11
|
+
Apple2,
|
|
12
|
+
Apple2Controller,
|
|
13
|
+
BeamEnergy,
|
|
14
|
+
InsertionDeviceEnergy,
|
|
15
|
+
InsertionDevicePolarisation,
|
|
16
|
+
UndulatorGap,
|
|
17
|
+
UndulatorPhaseAxes,
|
|
18
|
+
)
|
|
19
|
+
from dodal.devices.i17.i17_apple2 import I17Apple2Controller
|
|
10
20
|
from dodal.devices.pgm import PGM
|
|
11
21
|
from dodal.devices.synchrotron import Synchrotron
|
|
12
22
|
from dodal.log import set_beamline as set_log_beamline
|
|
@@ -33,5 +43,44 @@ def pgm() -> PGM:
|
|
|
33
43
|
return PGM(
|
|
34
44
|
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
|
|
35
45
|
grating=I17Grating,
|
|
36
|
-
|
|
46
|
+
grating_pv="NLINES2",
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@device_factory(skip=True)
|
|
51
|
+
def id() -> Apple2:
|
|
52
|
+
"""I17 insertion device:"""
|
|
53
|
+
return Apple2(
|
|
54
|
+
id_gap=UndulatorGap(prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:"),
|
|
55
|
+
id_phase=UndulatorPhaseAxes(
|
|
56
|
+
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
|
|
57
|
+
top_outer="RPQ1",
|
|
58
|
+
top_inner="RPQ2",
|
|
59
|
+
btm_inner="RPQ3",
|
|
60
|
+
btm_outer="RPQ4",
|
|
61
|
+
),
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
@device_factory(skip=True)
|
|
66
|
+
def id_controller() -> Apple2Controller:
|
|
67
|
+
"""I17 insertion device controller with dummy energy to motor_converter."""
|
|
68
|
+
return I17Apple2Controller(
|
|
69
|
+
apple2=id(), energy_to_motor_converter=lambda energy, pol: (0.0, 0.0)
|
|
37
70
|
)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
@device_factory(skip=True)
|
|
74
|
+
def id_energy() -> InsertionDeviceEnergy:
|
|
75
|
+
return InsertionDeviceEnergy(id_controller=id_controller())
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
@device_factory(skip=True)
|
|
79
|
+
def id_polarisation() -> InsertionDevicePolarisation:
|
|
80
|
+
return InsertionDevicePolarisation(id_controller=id_controller())
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
@device_factory(skip=True)
|
|
84
|
+
def energy() -> BeamEnergy:
|
|
85
|
+
"""Beam energy."""
|
|
86
|
+
return BeamEnergy(id_energy=id_energy(), mono=pgm().energy)
|
dodal/beamlines/i18.py
CHANGED
|
@@ -12,9 +12,13 @@ from dodal.common.visit import (
|
|
|
12
12
|
LocalDirectoryServiceClient,
|
|
13
13
|
StaticVisitPathProvider,
|
|
14
14
|
)
|
|
15
|
-
from dodal.devices.common_dcm import
|
|
15
|
+
from dodal.devices.common_dcm import (
|
|
16
|
+
DoubleCrystalMonochromatorWithDSpacing,
|
|
17
|
+
PitchAndRollCrystal,
|
|
18
|
+
RollCrystal,
|
|
19
|
+
)
|
|
16
20
|
from dodal.devices.i18.diode import Diode
|
|
17
|
-
from dodal.devices.i18.
|
|
21
|
+
from dodal.devices.i18.kb_mirror import KBMirror
|
|
18
22
|
from dodal.devices.motors import XYStage, XYZThetaStage
|
|
19
23
|
from dodal.devices.slits import Slits
|
|
20
24
|
from dodal.devices.synchrotron import Synchrotron
|
|
@@ -55,13 +59,15 @@ def undulator() -> Undulator:
|
|
|
55
59
|
|
|
56
60
|
# See https://github.com/DiamondLightSource/dodal/issues/1180
|
|
57
61
|
@device_factory(skip=True)
|
|
58
|
-
def dcm() ->
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
def dcm() -> DoubleCrystalMonochromatorWithDSpacing:
|
|
63
|
+
"""
|
|
64
|
+
A double crystal monocromator device, used to select the beam energy.
|
|
65
|
+
|
|
66
|
+
Once spacing is added Si111 d-spacing is 3.135 angsterm , and Si311 is 1.637
|
|
67
|
+
calculations are in gda/config/lookupTables/Si111/eV_Deg_converter.xml
|
|
68
|
+
"""
|
|
69
|
+
return DoubleCrystalMonochromatorWithDSpacing(
|
|
70
|
+
f"{PREFIX.beamline_prefix}-MO-DCM-01:", RollCrystal, PitchAndRollCrystal
|
|
65
71
|
)
|
|
66
72
|
|
|
67
73
|
|
dodal/beamlines/i19_1.py
CHANGED
|
@@ -4,12 +4,12 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
4
4
|
from dodal.common.beamlines.beamline_utils import (
|
|
5
5
|
set_beamline as set_utils_beamline,
|
|
6
6
|
)
|
|
7
|
-
from dodal.devices.i19.
|
|
8
|
-
from dodal.devices.i19.
|
|
9
|
-
from dodal.devices.i19.shutter import (
|
|
7
|
+
from dodal.devices.i19.access_controlled.blueapi_device import HutchState
|
|
8
|
+
from dodal.devices.i19.access_controlled.shutter import (
|
|
10
9
|
AccessControlledShutter,
|
|
11
10
|
HutchState,
|
|
12
11
|
)
|
|
12
|
+
from dodal.devices.i19.beamstop import BeamStop
|
|
13
13
|
from dodal.devices.oav.oav_detector import OAVBeamCentreFile
|
|
14
14
|
from dodal.devices.oav.oav_parameters import OAVConfigBeamCentre
|
|
15
15
|
from dodal.devices.synchrotron import Synchrotron
|
dodal/beamlines/i19_2.py
CHANGED
|
@@ -7,12 +7,12 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
7
7
|
from dodal.common.beamlines.beamline_utils import (
|
|
8
8
|
set_beamline as set_utils_beamline,
|
|
9
9
|
)
|
|
10
|
+
from dodal.devices.i19.access_controlled.blueapi_device import HutchState
|
|
11
|
+
from dodal.devices.i19.access_controlled.shutter import AccessControlledShutter
|
|
10
12
|
from dodal.devices.i19.backlight import BacklightPosition
|
|
11
13
|
from dodal.devices.i19.beamstop import BeamStop
|
|
12
|
-
from dodal.devices.i19.blueapi_device import HutchState
|
|
13
14
|
from dodal.devices.i19.diffractometer import FourCircleDiffractometer
|
|
14
15
|
from dodal.devices.i19.pin_col_stages import PinholeCollimatorControl
|
|
15
|
-
from dodal.devices.i19.shutter import AccessControlledShutter
|
|
16
16
|
from dodal.devices.synchrotron import Synchrotron
|
|
17
17
|
from dodal.devices.zebra.zebra import Zebra
|
|
18
18
|
from dodal.devices.zebra.zebra_constants_mapping import (
|
dodal/beamlines/i19_optics.py
CHANGED
|
@@ -5,7 +5,10 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
5
5
|
set_beamline as set_utils_beamline,
|
|
6
6
|
)
|
|
7
7
|
from dodal.devices.hutch_shutter import HutchShutter
|
|
8
|
-
from dodal.devices.i19.hutch_access import
|
|
8
|
+
from dodal.devices.i19.access_controlled.hutch_access import (
|
|
9
|
+
ACCESS_DEVICE_NAME,
|
|
10
|
+
HutchAccessControl,
|
|
11
|
+
)
|
|
9
12
|
from dodal.log import set_beamline as set_log_beamline
|
|
10
13
|
from dodal.utils import BeamlinePrefix
|
|
11
14
|
|
dodal/beamlines/i24.py
CHANGED
|
@@ -9,8 +9,8 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
9
9
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
10
10
|
from dodal.devices.attenuator.attenuator import EnumFilterAttenuator
|
|
11
11
|
from dodal.devices.attenuator.filter_selections import (
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
I24FilterOneSelections,
|
|
13
|
+
I24FilterTwoSelections,
|
|
14
14
|
)
|
|
15
15
|
from dodal.devices.hutch_shutter import HutchShutter
|
|
16
16
|
from dodal.devices.i24.aperture import Aperture
|
|
@@ -59,7 +59,7 @@ def attenuator() -> EnumFilterAttenuator:
|
|
|
59
59
|
existing object."""
|
|
60
60
|
return EnumFilterAttenuator(
|
|
61
61
|
f"{PREFIX.beamline_prefix}-OP-ATTN-01:",
|
|
62
|
-
filter_selection=(
|
|
62
|
+
filter_selection=(I24FilterOneSelections, I24FilterTwoSelections),
|
|
63
63
|
)
|
|
64
64
|
|
|
65
65
|
|
dodal/cli.py
CHANGED
|
@@ -58,7 +58,7 @@ def connect(beamline: str, all: bool, sim_backend: bool) -> None:
|
|
|
58
58
|
|
|
59
59
|
# We need to make a RunEngine to allow ophyd-async devices to connect.
|
|
60
60
|
# See https://blueskyproject.io/ophyd-async/main/explanations/event-loop-choice.html
|
|
61
|
-
|
|
61
|
+
run_engine = RunEngine(call_returns_result=True)
|
|
62
62
|
|
|
63
63
|
print(f"Attempting connection to {beamline} (using {full_module_path})")
|
|
64
64
|
|
|
@@ -71,7 +71,7 @@ def connect(beamline: str, all: bool, sim_backend: bool) -> None:
|
|
|
71
71
|
fake_with_ophyd_sim=sim_backend,
|
|
72
72
|
wait_for_connection=False,
|
|
73
73
|
)
|
|
74
|
-
devices, connect_exceptions = _connect_devices(
|
|
74
|
+
devices, connect_exceptions = _connect_devices(run_engine, devices, sim_backend)
|
|
75
75
|
|
|
76
76
|
# Inform user of successful connections
|
|
77
77
|
_report_successful_devices(devices, sim_backend)
|
|
@@ -96,7 +96,7 @@ def _report_successful_devices(
|
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
def _connect_devices(
|
|
99
|
-
|
|
99
|
+
run_engine: RunEngine,
|
|
100
100
|
devices: Mapping[str, AnyDevice],
|
|
101
101
|
sim_backend: bool,
|
|
102
102
|
) -> tuple[Mapping[str, AnyDevice], Mapping[str, Exception]]:
|
|
@@ -112,7 +112,7 @@ def _connect_devices(
|
|
|
112
112
|
|
|
113
113
|
# Connect ophyd-async devices
|
|
114
114
|
try:
|
|
115
|
-
|
|
115
|
+
run_engine(ensure_connected(*ophyd_async_devices.values(), mock=sim_backend))
|
|
116
116
|
except NotConnected as ex:
|
|
117
117
|
exceptions = {**exceptions, **ex.sub_errors}
|
|
118
118
|
|
dodal/common/visit.py
CHANGED
|
@@ -4,7 +4,7 @@ from typing import Literal
|
|
|
4
4
|
|
|
5
5
|
from aiohttp import ClientSession
|
|
6
6
|
from ophyd_async.core import FilenameProvider, PathInfo
|
|
7
|
-
from pydantic import BaseModel
|
|
7
|
+
from pydantic import BaseModel, Field
|
|
8
8
|
|
|
9
9
|
from dodal.common.types import UpdatingPathProvider
|
|
10
10
|
from dodal.log import LOGGER
|
|
@@ -20,7 +20,7 @@ class DataCollectionIdentifier(BaseModel):
|
|
|
20
20
|
Should be always incrementing, unique per-visit, co-ordinated with any other scan engines.
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
collection_number: int = Field(alias="collectionNumber")
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class DirectoryServiceClient(ABC):
|
|
@@ -46,7 +46,7 @@ class DiamondFilenameProvider(FilenameProvider):
|
|
|
46
46
|
def __call__(self, device_name: str | None = None):
|
|
47
47
|
assert device_name, "Diamond filename requires device_name to be passed"
|
|
48
48
|
assert self.collectionId is not None
|
|
49
|
-
return f"{self._beamline}-{self.collectionId.
|
|
49
|
+
return f"{self._beamline}-{self.collectionId.collection_number}-{device_name}"
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
class RemoteDirectoryServiceClient(DirectoryServiceClient):
|
|
@@ -143,7 +143,7 @@ class StaticVisitPathProvider(UpdatingPathProvider):
|
|
|
143
143
|
|
|
144
144
|
async def data_session(self) -> str:
|
|
145
145
|
collection = await self._client.get_current_collection()
|
|
146
|
-
return f"{self._beamline}-{collection.
|
|
146
|
+
return f"{self._beamline}-{collection.collection_number}"
|
|
147
147
|
|
|
148
148
|
def __call__(self, device_name: str | None = None) -> PathInfo:
|
|
149
149
|
assert device_name, "Must call PathProvider with device_name"
|
|
@@ -18,7 +18,7 @@ from dodal.devices.aperture import Aperture
|
|
|
18
18
|
from dodal.devices.motors import XYStage
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
class
|
|
21
|
+
class InvalidApertureMoveError(Exception):
|
|
22
22
|
pass
|
|
23
23
|
|
|
24
24
|
|
|
@@ -242,7 +242,7 @@ class ApertureScatterguard(StandardReadable, Preparable):
|
|
|
242
242
|
diff_on_z = abs(current_ap_z - expected_z_position)
|
|
243
243
|
aperture_z_tolerance = self._tolerances.aperture_z
|
|
244
244
|
if diff_on_z > aperture_z_tolerance:
|
|
245
|
-
raise
|
|
245
|
+
raise InvalidApertureMoveError(
|
|
246
246
|
f"Current aperture z ({current_ap_z}), outside of tolerance ({aperture_z_tolerance}) from target ({expected_z_position})."
|
|
247
247
|
)
|
|
248
248
|
|
|
@@ -256,7 +256,7 @@ class ApertureScatterguard(StandardReadable, Preparable):
|
|
|
256
256
|
for axis in all_axes:
|
|
257
257
|
axis_stationary = await axis.motor_done_move.get_value()
|
|
258
258
|
if not axis_stationary:
|
|
259
|
-
raise
|
|
259
|
+
raise InvalidApertureMoveError(
|
|
260
260
|
f"{axis.name} is still moving. Wait for it to finish before"
|
|
261
261
|
"triggering another move."
|
|
262
262
|
)
|
|
@@ -294,7 +294,9 @@ class ApertureScatterguard(StandardReadable, Preparable):
|
|
|
294
294
|
):
|
|
295
295
|
return ApertureValue.OUT_OF_BEAM
|
|
296
296
|
|
|
297
|
-
raise
|
|
297
|
+
raise InvalidApertureMoveError(
|
|
298
|
+
"Current aperture/scatterguard state unrecognised"
|
|
299
|
+
)
|
|
298
300
|
|
|
299
301
|
async def _safe_move_whilst_in_beam(self, position: AperturePosition):
|
|
300
302
|
"""
|