dls-dodal 1.50.0__py3-none-any.whl → 1.52.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.50.0.dist-info → dls_dodal-1.52.0.dist-info}/METADATA +5 -5
- {dls_dodal-1.50.0.dist-info → dls_dodal-1.52.0.dist-info}/RECORD +76 -68
- dodal/_version.py +2 -2
- dodal/beamlines/adsim.py +5 -3
- dodal/beamlines/b01_1.py +41 -5
- dodal/beamlines/b07.py +13 -2
- dodal/beamlines/b07_1.py +13 -2
- dodal/beamlines/b16.py +8 -4
- dodal/beamlines/b21.py +148 -0
- dodal/beamlines/i03.py +10 -12
- dodal/beamlines/i04.py +7 -7
- dodal/beamlines/i09.py +25 -2
- dodal/beamlines/i09_1.py +13 -2
- dodal/beamlines/i09_2.py +24 -0
- dodal/beamlines/i10.py +5 -6
- dodal/beamlines/i13_1.py +5 -5
- dodal/beamlines/i18.py +5 -6
- dodal/beamlines/i22.py +18 -1
- dodal/beamlines/i24.py +5 -5
- dodal/beamlines/p45.py +4 -3
- dodal/beamlines/p60.py +21 -2
- dodal/beamlines/p99.py +19 -5
- dodal/beamlines/training_rig.py +3 -3
- dodal/common/beamlines/beamline_utils.py +5 -2
- dodal/common/device_utils.py +45 -0
- dodal/devices/aithre_lasershaping/goniometer.py +4 -5
- dodal/devices/aperture.py +4 -7
- dodal/devices/aperturescatterguard.py +2 -2
- dodal/devices/attenuator/attenuator.py +5 -3
- dodal/devices/b07/__init__.py +3 -0
- dodal/devices/b07/enums.py +24 -0
- dodal/devices/b07_1/__init__.py +3 -0
- dodal/devices/b07_1/enums.py +18 -0
- dodal/devices/detector/detector_motion.py +19 -17
- dodal/devices/electron_analyser/abstract/__init__.py +4 -0
- dodal/devices/electron_analyser/abstract/base_driver_io.py +44 -28
- dodal/devices/electron_analyser/abstract/base_region.py +20 -7
- dodal/devices/electron_analyser/detector.py +3 -13
- dodal/devices/electron_analyser/specs/detector.py +24 -4
- dodal/devices/electron_analyser/specs/driver_io.py +20 -5
- dodal/devices/electron_analyser/specs/region.py +9 -5
- dodal/devices/electron_analyser/types.py +21 -5
- dodal/devices/electron_analyser/vgscienta/detector.py +22 -7
- dodal/devices/electron_analyser/vgscienta/driver_io.py +16 -8
- dodal/devices/electron_analyser/vgscienta/region.py +11 -6
- dodal/devices/fast_grid_scan.py +1 -2
- dodal/devices/i04/constants.py +1 -1
- dodal/devices/i09/__init__.py +4 -0
- dodal/devices/i09/dcm.py +26 -0
- dodal/devices/i09/enums.py +15 -0
- dodal/devices/i09_1/__init__.py +3 -0
- dodal/devices/i09_1/enums.py +19 -0
- dodal/devices/i10/mirrors.py +4 -6
- dodal/devices/i10/rasor/rasor_motors.py +0 -14
- dodal/devices/i19/beamstop.py +3 -7
- dodal/devices/i24/aperture.py +4 -6
- dodal/devices/i24/beamstop.py +5 -8
- dodal/devices/i24/pmac.py +4 -8
- dodal/devices/linkam3.py +25 -81
- dodal/devices/motors.py +92 -35
- dodal/devices/oav/pin_image_recognition/__init__.py +11 -14
- dodal/devices/p45.py +0 -12
- dodal/devices/p60/__init__.py +4 -0
- dodal/devices/p60/enums.py +10 -0
- dodal/devices/p60/lab_xray_source.py +21 -0
- dodal/devices/pgm.py +1 -1
- dodal/devices/robot.py +11 -7
- dodal/devices/smargon.py +8 -9
- dodal/devices/tetramm.py +134 -150
- dodal/devices/xbpm_feedback.py +6 -3
- dodal/devices/zocalo/zocalo_results.py +27 -78
- dodal/plans/configure_arm_trigger_and_disarm_detector.py +7 -5
- dodal/devices/adsim.py +0 -13
- dodal/devices/i18/table.py +0 -14
- dodal/devices/i18/thor_labs_stage.py +0 -12
- dodal/devices/i24/i24_detector_motion.py +0 -12
- dodal/devices/scatterguard.py +0 -11
- dodal/devices/training_rig/__init__.py +0 -0
- dodal/devices/training_rig/sample_stage.py +0 -10
- {dls_dodal-1.50.0.dist-info → dls_dodal-1.52.0.dist-info}/WHEEL +0 -0
- {dls_dodal-1.50.0.dist-info → dls_dodal-1.52.0.dist-info}/entry_points.txt +0 -0
- {dls_dodal-1.50.0.dist-info → dls_dodal-1.52.0.dist-info}/licenses/LICENSE +0 -0
- {dls_dodal-1.50.0.dist-info → dls_dodal-1.52.0.dist-info}/top_level.txt +0 -0
dodal/beamlines/b21.py
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
from pathlib import Path # noqa
|
|
2
|
+
from ophyd_async.fastcs.panda import HDFPanda
|
|
3
|
+
from ophyd_async.epics.adaravis import AravisDetector
|
|
4
|
+
from dodal.devices.i22.nxsas import NXSasMetadataHolder, NXSasOAV
|
|
5
|
+
from dodal.common.beamlines.device_helpers import CAM_SUFFIX, HDF5_SUFFIX
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
from dodal.common.beamlines.beamline_utils import (
|
|
9
|
+
device_factory,
|
|
10
|
+
get_path_provider,
|
|
11
|
+
set_path_provider,
|
|
12
|
+
)
|
|
13
|
+
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
14
|
+
from dodal.common.visit import RemoteDirectoryServiceClient, StaticVisitPathProvider
|
|
15
|
+
from ophyd_async.fastcs.eiger import EigerDetector
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
from dodal.devices.linkam3 import Linkam3
|
|
19
|
+
from dodal.devices.slits import Slits
|
|
20
|
+
from dodal.devices.synchrotron import Synchrotron
|
|
21
|
+
|
|
22
|
+
from dodal.log import set_beamline as set_log_beamline
|
|
23
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
24
|
+
|
|
25
|
+
BL = get_beamline_name("b21")
|
|
26
|
+
PREFIX = BeamlinePrefix(BL)
|
|
27
|
+
set_log_beamline(BL)
|
|
28
|
+
set_utils_beamline(BL)
|
|
29
|
+
|
|
30
|
+
# Currently we must hard-code the visit, determining the visit at runtime requires
|
|
31
|
+
# infrastructure that is still WIP.
|
|
32
|
+
# Communication with GDA is also WIP so for now we determine an arbitrary scan number
|
|
33
|
+
# locally and write the commissioning directory. The scan number is not guaranteed to
|
|
34
|
+
# be unique and the data is at risk - this configuration is for testing only.
|
|
35
|
+
set_path_provider(
|
|
36
|
+
StaticVisitPathProvider(
|
|
37
|
+
BL,
|
|
38
|
+
Path("/dls/b21/data/2025/cm40642-3/bluesky"),
|
|
39
|
+
client=RemoteDirectoryServiceClient(f"http://{BL}-control:8088/api"),
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@device_factory(skip=True)
|
|
45
|
+
def saxs() -> EigerDetector:
|
|
46
|
+
return EigerDetector(
|
|
47
|
+
prefix=PREFIX.beamline_prefix,
|
|
48
|
+
path_provider=get_path_provider(),
|
|
49
|
+
drv_suffix="-EA-EIGER-01:",
|
|
50
|
+
hdf_suffix="-EA-EIGER-01:OD:",
|
|
51
|
+
# odin_nodes=1, # TODO: https://github.com/bluesky/ophyd-async/issues/923
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@device_factory(skip=True)
|
|
56
|
+
def waxs() -> EigerDetector:
|
|
57
|
+
return EigerDetector(
|
|
58
|
+
prefix=PREFIX.beamline_prefix,
|
|
59
|
+
path_provider=get_path_provider(),
|
|
60
|
+
drv_suffix="-EA-EIGER-02:",
|
|
61
|
+
hdf_suffix="-EA-EIGER-02:OD:",
|
|
62
|
+
# odin_nodes=1, # TODO: https://github.com/bluesky/ophyd-async/issues/923
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
@device_factory()
|
|
67
|
+
def panda1() -> HDFPanda:
|
|
68
|
+
return HDFPanda(
|
|
69
|
+
prefix=f"{PREFIX.beamline_prefix}-MO-PANDA-01:",
|
|
70
|
+
path_provider=get_path_provider(),
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
@device_factory()
|
|
75
|
+
def synchrotron() -> Synchrotron:
|
|
76
|
+
return Synchrotron()
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
@device_factory()
|
|
80
|
+
def slits_1() -> Slits:
|
|
81
|
+
return Slits(prefix=f"{PREFIX.beamline_prefix}-AL-SLITS-01:")
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
@device_factory()
|
|
85
|
+
def slits_2() -> Slits:
|
|
86
|
+
return Slits(prefix=f"{PREFIX.beamline_prefix}-AL-SLITS-02:")
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
@device_factory()
|
|
90
|
+
def slits_3() -> Slits:
|
|
91
|
+
return Slits(prefix=f"{PREFIX.beamline_prefix}-AL-SLITS-03:")
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
"""
|
|
95
|
+
Slits 4 was removed from B21 after the camera length was fixed, it is not used anymore.
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
@device_factory()
|
|
100
|
+
def slits_5() -> Slits:
|
|
101
|
+
return Slits(prefix=f"{PREFIX.beamline_prefix}-AL-SLITS-05:")
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
@device_factory()
|
|
105
|
+
def slits_6() -> Slits:
|
|
106
|
+
return Slits(prefix=f"{PREFIX.beamline_prefix}-AL-SLITS-06:")
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@device_factory()
|
|
110
|
+
def slits_7() -> Slits:
|
|
111
|
+
"""
|
|
112
|
+
Compact JJ slits device is used for B21 slits 7. PV's operate in same way
|
|
113
|
+
but physically different to other slits, and uses X:GAP nomenclature.
|
|
114
|
+
"""
|
|
115
|
+
return Slits(
|
|
116
|
+
prefix=f"{PREFIX.beamline_prefix}-AL-SLITS-07:",
|
|
117
|
+
x_gap="X:GAP",
|
|
118
|
+
y_gap="Y:GAP",
|
|
119
|
+
x_centre="X:CENTRE",
|
|
120
|
+
y_centre="Y:CENTRE",
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
@device_factory()
|
|
125
|
+
def wbscam() -> AravisDetector:
|
|
126
|
+
metadata_holder = NXSasMetadataHolder(
|
|
127
|
+
x_pixel_size=(1292, "pixels"), # Double check this figure
|
|
128
|
+
y_pixel_size=(964, "pixels"),
|
|
129
|
+
description="Manta_G-125B",
|
|
130
|
+
distance=(-1.0, "m"),
|
|
131
|
+
)
|
|
132
|
+
return NXSasOAV(
|
|
133
|
+
prefix=f"{PREFIX.beamline_prefix}-RS-ABSB-02:CAM:",
|
|
134
|
+
drv_suffix=CAM_SUFFIX,
|
|
135
|
+
fileio_suffix=HDF5_SUFFIX,
|
|
136
|
+
path_provider=get_path_provider(),
|
|
137
|
+
metadata_holder=metadata_holder,
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
@device_factory(skip=True)
|
|
142
|
+
def linkam() -> Linkam3:
|
|
143
|
+
return Linkam3(prefix=f"{PREFIX.beamline_prefix}-EA-HPLC-01:")
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
# TODO: https://github.com/DiamondLightSource/dodal/issues/1286
|
|
147
|
+
# def dmm() -> DMM: #b21 uses a dmm so
|
|
148
|
+
# return DMM()
|
dodal/beamlines/i03.py
CHANGED
|
@@ -28,7 +28,7 @@ from dodal.devices.focusing_mirror import FocusingMirrorWithStripes, MirrorVolta
|
|
|
28
28
|
from dodal.devices.i03 import Beamstop
|
|
29
29
|
from dodal.devices.i03.dcm import DCM
|
|
30
30
|
from dodal.devices.i03.undulator_dcm import UndulatorDCM
|
|
31
|
-
from dodal.devices.motors import
|
|
31
|
+
from dodal.devices.motors import XYZStage
|
|
32
32
|
from dodal.devices.oav.oav_detector import OAVBeamCentreFile
|
|
33
33
|
from dodal.devices.oav.oav_parameters import OAVConfigBeamCentre
|
|
34
34
|
from dodal.devices.oav.pin_image_recognition import PinTipDetection
|
|
@@ -92,7 +92,10 @@ def attenuator() -> BinaryFilterAttenuator:
|
|
|
92
92
|
"""Get the i03 attenuator device, instantiate it if it hasn't already been.
|
|
93
93
|
If this is called when already instantiated in i03, it will return the existing object.
|
|
94
94
|
"""
|
|
95
|
-
return BinaryFilterAttenuator(
|
|
95
|
+
return BinaryFilterAttenuator(
|
|
96
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-ATTN-01:",
|
|
97
|
+
num_filters=16,
|
|
98
|
+
)
|
|
96
99
|
|
|
97
100
|
|
|
98
101
|
@device_factory()
|
|
@@ -368,10 +371,7 @@ def zocalo() -> ZocaloResults:
|
|
|
368
371
|
"""Get the i03 ZocaloResults device, instantiate it if it hasn't already been.
|
|
369
372
|
If this is called when already instantiated in i03, it will return the existing object.
|
|
370
373
|
"""
|
|
371
|
-
return ZocaloResults(
|
|
372
|
-
name="zocalo",
|
|
373
|
-
prefix=PREFIX.beamline_prefix,
|
|
374
|
-
)
|
|
374
|
+
return ZocaloResults(name="zocalo", prefix=PREFIX.beamline_prefix, use_gpu=True)
|
|
375
375
|
|
|
376
376
|
|
|
377
377
|
@device_factory()
|
|
@@ -409,11 +409,11 @@ def thawer() -> Thawer:
|
|
|
409
409
|
|
|
410
410
|
|
|
411
411
|
@device_factory()
|
|
412
|
-
def lower_gonio() ->
|
|
412
|
+
def lower_gonio() -> XYZStage:
|
|
413
413
|
"""Get the i03 lower gonio device, instantiate it if it hasn't already been.
|
|
414
414
|
If this is called when already instantiated in i03, it will return the existing object.
|
|
415
415
|
"""
|
|
416
|
-
return
|
|
416
|
+
return XYZStage(
|
|
417
417
|
f"{PREFIX.beamline_prefix}-MO-GONP-01:",
|
|
418
418
|
"lower_gonio",
|
|
419
419
|
)
|
|
@@ -451,11 +451,9 @@ def qbpm() -> QBPM:
|
|
|
451
451
|
)
|
|
452
452
|
|
|
453
453
|
|
|
454
|
-
@device_factory(
|
|
455
|
-
skip=True
|
|
456
|
-
) # Skipping as not yet on the beamline, see https://jira.diamond.ac.uk/browse/I03-894
|
|
454
|
+
@device_factory()
|
|
457
455
|
def baton() -> Baton:
|
|
458
456
|
"""Get the i03 baton device, instantiate it if it hasn't already been.
|
|
459
457
|
If this is called when already instantiated in i03, it will return the existing object.
|
|
460
458
|
"""
|
|
461
|
-
return Baton(f"{PREFIX.beamline_prefix}:")
|
|
459
|
+
return Baton(f"{PREFIX.beamline_prefix}-CS-BATON-01:")
|
dodal/beamlines/i04.py
CHANGED
|
@@ -22,7 +22,7 @@ from dodal.devices.i04.constants import RedisConstants
|
|
|
22
22
|
from dodal.devices.i04.murko_results import MurkoResultsDevice
|
|
23
23
|
from dodal.devices.i04.transfocator import Transfocator
|
|
24
24
|
from dodal.devices.ipin import IPin
|
|
25
|
-
from dodal.devices.motors import
|
|
25
|
+
from dodal.devices.motors import XYZStage
|
|
26
26
|
from dodal.devices.mx_phase1.beamstop import Beamstop
|
|
27
27
|
from dodal.devices.oav.oav_detector import OAVBeamCentrePV
|
|
28
28
|
from dodal.devices.oav.oav_parameters import OAVConfig
|
|
@@ -77,22 +77,22 @@ def smargon() -> Smargon:
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
@device_factory()
|
|
80
|
-
def gonio_positioner() ->
|
|
80
|
+
def gonio_positioner() -> XYZStage:
|
|
81
81
|
"""Get the i04 lower_gonio_stages device, instantiate it if it hasn't already been.
|
|
82
82
|
If this is called when already instantiated in i04, it will return the existing object.
|
|
83
83
|
"""
|
|
84
|
-
return
|
|
84
|
+
return XYZStage(
|
|
85
85
|
f"{PREFIX.beamline_prefix}-MO-GONIO-01:",
|
|
86
86
|
"lower_gonio_stages",
|
|
87
87
|
)
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
@device_factory()
|
|
91
|
-
def sample_delivery_system() ->
|
|
91
|
+
def sample_delivery_system() -> XYZStage:
|
|
92
92
|
"""Get the i04 sample_delivery_system device, instantiate it if it hasn't already been.
|
|
93
93
|
If this is called when already instantiated in i04, it will return the existing object.
|
|
94
94
|
"""
|
|
95
|
-
return
|
|
95
|
+
return XYZStage(
|
|
96
96
|
f"{PREFIX.beamline_prefix}-MO-SDE-01:",
|
|
97
97
|
"sample_delivery_system",
|
|
98
98
|
)
|
|
@@ -137,8 +137,8 @@ def attenuator() -> BinaryFilterAttenuator:
|
|
|
137
137
|
If this is called when already instantiated in i04, it will return the existing object.
|
|
138
138
|
"""
|
|
139
139
|
return BinaryFilterAttenuator(
|
|
140
|
-
f"{PREFIX.beamline_prefix}-EA-ATTN-01:",
|
|
141
|
-
|
|
140
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-ATTN-01:",
|
|
141
|
+
num_filters=16,
|
|
142
142
|
)
|
|
143
143
|
|
|
144
144
|
|
dodal/beamlines/i09.py
CHANGED
|
@@ -3,6 +3,8 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
3
3
|
)
|
|
4
4
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
5
5
|
from dodal.devices.electron_analyser.vgscienta import VGScientaAnalyserDriverIO
|
|
6
|
+
from dodal.devices.i09 import DCM, Grating, LensMode
|
|
7
|
+
from dodal.devices.pgm import PGM
|
|
6
8
|
from dodal.devices.synchrotron import Synchrotron
|
|
7
9
|
from dodal.log import set_beamline as set_log_beamline
|
|
8
10
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -19,5 +21,26 @@ def synchrotron() -> Synchrotron:
|
|
|
19
21
|
|
|
20
22
|
|
|
21
23
|
@device_factory()
|
|
22
|
-
def
|
|
23
|
-
return
|
|
24
|
+
def pgm() -> PGM:
|
|
25
|
+
return PGM(
|
|
26
|
+
prefix=f"{BeamlinePrefix(BL, suffix='J').beamline_prefix}-MO-PGM-01:",
|
|
27
|
+
grating=Grating,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@device_factory()
|
|
32
|
+
def dcm() -> DCM:
|
|
33
|
+
return DCM(prefix=f"{PREFIX.beamline_prefix}-MO-DCM-01:")
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@device_factory()
|
|
37
|
+
def analyser_driver() -> VGScientaAnalyserDriverIO[LensMode]:
|
|
38
|
+
energy_sources = {
|
|
39
|
+
"source1": pgm().energy.user_readback,
|
|
40
|
+
"source2": dcm().energy_in_ev,
|
|
41
|
+
}
|
|
42
|
+
return VGScientaAnalyserDriverIO[LensMode](
|
|
43
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-DET-01:CAM:",
|
|
44
|
+
lens_mode_type=LensMode,
|
|
45
|
+
energy_sources=energy_sources,
|
|
46
|
+
)
|
dodal/beamlines/i09_1.py
CHANGED
|
@@ -3,6 +3,8 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
3
3
|
)
|
|
4
4
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
5
5
|
from dodal.devices.electron_analyser.specs import SpecsAnalyserDriverIO
|
|
6
|
+
from dodal.devices.i09.dcm import DCM
|
|
7
|
+
from dodal.devices.i09_1 import LensMode
|
|
6
8
|
from dodal.devices.synchrotron import Synchrotron
|
|
7
9
|
from dodal.log import set_beamline as set_log_beamline
|
|
8
10
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -19,5 +21,14 @@ def synchrotron() -> Synchrotron:
|
|
|
19
21
|
|
|
20
22
|
|
|
21
23
|
@device_factory()
|
|
22
|
-
def
|
|
23
|
-
return
|
|
24
|
+
def dcm() -> DCM:
|
|
25
|
+
return DCM(prefix=f"{PREFIX.beamline_prefix}-MO-DCM-01:")
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@device_factory()
|
|
29
|
+
def analyser_driver() -> SpecsAnalyserDriverIO[LensMode]:
|
|
30
|
+
return SpecsAnalyserDriverIO[LensMode](
|
|
31
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-DET-02:CAM:",
|
|
32
|
+
lens_mode_type=LensMode,
|
|
33
|
+
energy_sources={"source1": dcm().energy_in_ev},
|
|
34
|
+
)
|
dodal/beamlines/i09_2.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from dodal.common.beamlines.beamline_utils import (
|
|
2
|
+
device_factory,
|
|
3
|
+
)
|
|
4
|
+
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
5
|
+
from dodal.devices.i09.enums import Grating
|
|
6
|
+
from dodal.devices.pgm import PGM
|
|
7
|
+
from dodal.devices.synchrotron import Synchrotron
|
|
8
|
+
from dodal.log import set_beamline as set_log_beamline
|
|
9
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
10
|
+
|
|
11
|
+
BL = get_beamline_name("i09-2")
|
|
12
|
+
PREFIX = BeamlinePrefix(BL, suffix="J")
|
|
13
|
+
set_log_beamline(BL)
|
|
14
|
+
set_utils_beamline(BL)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@device_factory()
|
|
18
|
+
def synchrotron() -> Synchrotron:
|
|
19
|
+
return Synchrotron()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@device_factory()
|
|
23
|
+
def pgm() -> PGM:
|
|
24
|
+
return PGM(prefix=f"{PREFIX.beamline_prefix}-MO-PGM-01:", grating=Grating)
|
dodal/beamlines/i10.py
CHANGED
|
@@ -20,11 +20,10 @@ from dodal.devices.i10.rasor.rasor_motors import (
|
|
|
20
20
|
DetSlits,
|
|
21
21
|
Diffractometer,
|
|
22
22
|
PaStage,
|
|
23
|
-
PinHole,
|
|
24
23
|
)
|
|
25
24
|
from dodal.devices.i10.rasor.rasor_scaler_cards import RasorScalerCard1
|
|
26
25
|
from dodal.devices.i10.slits import I10Slits, I10SlitsDrainCurrent
|
|
27
|
-
from dodal.devices.motors import
|
|
26
|
+
from dodal.devices.motors import XYStage, XYZStage
|
|
28
27
|
from dodal.devices.pgm import PGM
|
|
29
28
|
from dodal.log import set_beamline as set_log_beamline
|
|
30
29
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -130,8 +129,8 @@ def d5a_det() -> I10Diagnostic5ADet:
|
|
|
130
129
|
|
|
131
130
|
|
|
132
131
|
@device_factory()
|
|
133
|
-
def pin_hole() ->
|
|
134
|
-
return
|
|
132
|
+
def pin_hole() -> XYStage:
|
|
133
|
+
return XYStage(prefix="ME01D-EA-PINH-01:")
|
|
135
134
|
|
|
136
135
|
|
|
137
136
|
@device_factory()
|
|
@@ -150,8 +149,8 @@ def pa_stage() -> PaStage:
|
|
|
150
149
|
|
|
151
150
|
|
|
152
151
|
@device_factory()
|
|
153
|
-
def sample_stage() ->
|
|
154
|
-
return
|
|
152
|
+
def sample_stage() -> XYZStage:
|
|
153
|
+
return XYZStage(prefix="ME01D-MO-CRYO-01:")
|
|
155
154
|
|
|
156
155
|
|
|
157
156
|
@device_factory()
|
dodal/beamlines/i13_1.py
CHANGED
|
@@ -10,7 +10,7 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
10
10
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
11
11
|
from dodal.common.visit import LocalDirectoryServiceClient, StaticVisitPathProvider
|
|
12
12
|
from dodal.devices.i13_1.merlin import Merlin
|
|
13
|
-
from dodal.devices.motors import
|
|
13
|
+
from dodal.devices.motors import XYZStage
|
|
14
14
|
from dodal.log import set_beamline as set_log_beamline
|
|
15
15
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
16
16
|
|
|
@@ -29,13 +29,13 @@ set_path_provider(
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
@device_factory()
|
|
32
|
-
def sample_xyz_stage() ->
|
|
33
|
-
return
|
|
32
|
+
def sample_xyz_stage() -> XYZStage:
|
|
33
|
+
return XYZStage(prefix=f"{PREFIX}-MO-PI-02:")
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
@device_factory()
|
|
37
|
-
def sample_xyz_lab_fa_stage() ->
|
|
38
|
-
return
|
|
37
|
+
def sample_xyz_lab_fa_stage() -> XYZStage:
|
|
38
|
+
return XYZStage(prefix=f"{PREFIX}-MO-PI-02:FIXANG:")
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
@device_factory()
|
dodal/beamlines/i18.py
CHANGED
|
@@ -15,8 +15,7 @@ from dodal.common.visit import (
|
|
|
15
15
|
from dodal.devices.common_dcm import BaseDCM, PitchAndRollCrystal, RollCrystal
|
|
16
16
|
from dodal.devices.i18.diode import Diode
|
|
17
17
|
from dodal.devices.i18.KBMirror import KBMirror
|
|
18
|
-
from dodal.devices.
|
|
19
|
-
from dodal.devices.i18.thor_labs_stage import ThorLabsStage
|
|
18
|
+
from dodal.devices.motors import XYStage, XYZThetaStage
|
|
20
19
|
from dodal.devices.slits import Slits
|
|
21
20
|
from dodal.devices.synchrotron import Synchrotron
|
|
22
21
|
from dodal.devices.tetramm import TetrammDetector
|
|
@@ -118,10 +117,10 @@ def d7_diode() -> Diode:
|
|
|
118
117
|
|
|
119
118
|
|
|
120
119
|
@device_factory()
|
|
121
|
-
def main_table() ->
|
|
122
|
-
return
|
|
120
|
+
def main_table() -> XYZThetaStage:
|
|
121
|
+
return XYZThetaStage(f"{PREFIX.beamline_prefix}-MO-TABLE-01:")
|
|
123
122
|
|
|
124
123
|
|
|
125
124
|
@device_factory()
|
|
126
|
-
def thor_labs_stage() ->
|
|
127
|
-
return
|
|
125
|
+
def thor_labs_stage() -> XYStage:
|
|
126
|
+
return XYStage(f"{PREFIX.beamline_prefix}-MO-TABLE-02:")
|
dodal/beamlines/i22.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
|
|
3
3
|
from ophyd_async.epics.adaravis import AravisDetector
|
|
4
|
+
from ophyd_async.epics.adcore import NDPluginStatsIO
|
|
4
5
|
from ophyd_async.epics.adpilatus import PilatusDetector
|
|
5
6
|
from ophyd_async.fastcs.panda import HDFPanda
|
|
6
7
|
|
|
@@ -22,6 +23,7 @@ from dodal.devices.i22.dcm import DCM
|
|
|
22
23
|
from dodal.devices.i22.fswitch import FSwitch
|
|
23
24
|
from dodal.devices.i22.nxsas import NXSasMetadataHolder, NXSasOAV, NXSasPilatus
|
|
24
25
|
from dodal.devices.linkam3 import Linkam3
|
|
26
|
+
from dodal.devices.motors import XYPitchStage
|
|
25
27
|
from dodal.devices.slits import Slits
|
|
26
28
|
from dodal.devices.synchrotron import Synchrotron
|
|
27
29
|
from dodal.devices.tetramm import TetrammDetector
|
|
@@ -100,6 +102,11 @@ def i0() -> TetrammDetector:
|
|
|
100
102
|
prefix=f"{PREFIX.beamline_prefix}-EA-XBPM-02:",
|
|
101
103
|
path_provider=get_path_provider(),
|
|
102
104
|
type="Cividec Diamond XBPM",
|
|
105
|
+
plugins={
|
|
106
|
+
"stats": NDPluginStatsIO(
|
|
107
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-XBPM-02:SumAll:"
|
|
108
|
+
)
|
|
109
|
+
},
|
|
103
110
|
)
|
|
104
111
|
|
|
105
112
|
|
|
@@ -109,6 +116,11 @@ def it() -> TetrammDetector:
|
|
|
109
116
|
prefix=f"{PREFIX.beamline_prefix}-EA-TTRM-02:",
|
|
110
117
|
path_provider=get_path_provider(),
|
|
111
118
|
type="PIN Diode",
|
|
119
|
+
plugins={
|
|
120
|
+
"stats": NDPluginStatsIO(
|
|
121
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-TTRM-02:SumAll:"
|
|
122
|
+
)
|
|
123
|
+
},
|
|
112
124
|
)
|
|
113
125
|
|
|
114
126
|
|
|
@@ -136,7 +148,7 @@ def bimorph_hfm() -> BimorphMirror:
|
|
|
136
148
|
@device_factory()
|
|
137
149
|
def bimorph_vfm() -> BimorphMirror:
|
|
138
150
|
return BimorphMirror(
|
|
139
|
-
prefix=f"{PREFIX.beamline_prefix}-OP-KBM-01:G1:", number_of_channels=
|
|
151
|
+
prefix=f"{PREFIX.beamline_prefix}-OP-KBM-01:G1:", number_of_channels=32
|
|
140
152
|
)
|
|
141
153
|
|
|
142
154
|
|
|
@@ -264,3 +276,8 @@ def linkam() -> Linkam3:
|
|
|
264
276
|
def ppump() -> WatsonMarlow323Pump:
|
|
265
277
|
"""Sample Environment Peristaltic Pump"""
|
|
266
278
|
return WatsonMarlow323Pump(f"{PREFIX.beamline_prefix}-EA-PUMP-01:")
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
@device_factory()
|
|
282
|
+
def base_top() -> XYPitchStage:
|
|
283
|
+
return XYPitchStage(f"{PREFIX.beamline_prefix}-MO-STABL-01:")
|
dodal/beamlines/i24.py
CHANGED
|
@@ -11,10 +11,10 @@ from dodal.devices.i24.beamstop import Beamstop
|
|
|
11
11
|
from dodal.devices.i24.dcm import DCM
|
|
12
12
|
from dodal.devices.i24.dual_backlight import DualBacklight
|
|
13
13
|
from dodal.devices.i24.focus_mirrors import FocusMirrorsMode
|
|
14
|
-
from dodal.devices.i24.i24_detector_motion import DetectorMotion
|
|
15
14
|
from dodal.devices.i24.pilatus_metadata import PilatusMetadata
|
|
16
15
|
from dodal.devices.i24.pmac import PMAC
|
|
17
16
|
from dodal.devices.i24.vgonio import VerticalGoniometer
|
|
17
|
+
from dodal.devices.motors import YZStage
|
|
18
18
|
from dodal.devices.oav.oav_detector import OAVBeamCentreFile
|
|
19
19
|
from dodal.devices.oav.oav_parameters import OAVConfigBeamCentre
|
|
20
20
|
from dodal.devices.zebra.zebra import Zebra
|
|
@@ -32,7 +32,7 @@ ZOOM_PARAMS_FILE = (
|
|
|
32
32
|
DISPLAY_CONFIG = "/dls_sw/i24/software/gda_versions/var/display.configuration"
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
BL = get_beamline_name("
|
|
35
|
+
BL = get_beamline_name("i24")
|
|
36
36
|
set_log_beamline(BL)
|
|
37
37
|
set_utils_beamline(BL)
|
|
38
38
|
|
|
@@ -89,11 +89,11 @@ def backlight() -> DualBacklight:
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
@device_factory()
|
|
92
|
-
def detector_motion() ->
|
|
92
|
+
def detector_motion() -> YZStage:
|
|
93
93
|
"""Get the i24 detector motion device, instantiate it if it hasn't already been.
|
|
94
94
|
If this is called when already instantiated in i24, it will return the existing object.
|
|
95
95
|
"""
|
|
96
|
-
return
|
|
96
|
+
return YZStage(
|
|
97
97
|
name="detector_motion",
|
|
98
98
|
prefix=f"{PREFIX.beamline_prefix}-EA-DET-01:",
|
|
99
99
|
)
|
|
@@ -149,7 +149,7 @@ def pmac() -> PMAC:
|
|
|
149
149
|
)
|
|
150
150
|
|
|
151
151
|
|
|
152
|
-
@device_factory(
|
|
152
|
+
@device_factory()
|
|
153
153
|
def oav() -> OAVBeamCentreFile:
|
|
154
154
|
return OAVBeamCentreFile(
|
|
155
155
|
prefix=f"{PREFIX.beamline_prefix}-DI-OAV-01:",
|
dodal/beamlines/p45.py
CHANGED
|
@@ -11,7 +11,8 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
11
11
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
12
12
|
from dodal.common.beamlines.device_helpers import DET_SUFFIX, HDF5_SUFFIX
|
|
13
13
|
from dodal.common.visit import StaticVisitPathProvider
|
|
14
|
-
from dodal.devices.
|
|
14
|
+
from dodal.devices.motors import XYStage
|
|
15
|
+
from dodal.devices.p45 import TomoStageWithStretchAndSkew
|
|
15
16
|
from dodal.log import set_beamline as set_log_beamline
|
|
16
17
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
17
18
|
|
|
@@ -34,8 +35,8 @@ def sample() -> TomoStageWithStretchAndSkew:
|
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
@device_factory()
|
|
37
|
-
def choppers() ->
|
|
38
|
-
return
|
|
38
|
+
def choppers() -> XYStage:
|
|
39
|
+
return XYStage(f"{PREFIX.beamline_prefix}-MO-CHOP-01:")
|
|
39
40
|
|
|
40
41
|
|
|
41
42
|
# Disconnected
|
dodal/beamlines/p60.py
CHANGED
|
@@ -3,6 +3,7 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
3
3
|
)
|
|
4
4
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
5
5
|
from dodal.devices.electron_analyser.vgscienta import VGScientaAnalyserDriverIO
|
|
6
|
+
from dodal.devices.p60 import LabXraySource, LabXraySourceReadable, LensMode
|
|
6
7
|
from dodal.log import set_beamline as set_log_beamline
|
|
7
8
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
8
9
|
|
|
@@ -13,5 +14,23 @@ set_utils_beamline(BL)
|
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
@device_factory()
|
|
16
|
-
def
|
|
17
|
-
return
|
|
17
|
+
def al_kalpha_source() -> LabXraySourceReadable:
|
|
18
|
+
return LabXraySourceReadable(LabXraySource.AL_KALPHA)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@device_factory()
|
|
22
|
+
def mg_kalpha_source() -> LabXraySourceReadable:
|
|
23
|
+
return LabXraySourceReadable(LabXraySource.MG_KALPHA)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@device_factory()
|
|
27
|
+
def analyser_driver() -> VGScientaAnalyserDriverIO[LensMode]:
|
|
28
|
+
energy_sources = {
|
|
29
|
+
"source1": al_kalpha_source().energy_ev,
|
|
30
|
+
"source2": mg_kalpha_source().energy_ev,
|
|
31
|
+
}
|
|
32
|
+
return VGScientaAnalyserDriverIO[LensMode](
|
|
33
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-DET-01:CAM:",
|
|
34
|
+
lens_mode_type=LensMode,
|
|
35
|
+
energy_sources=energy_sources,
|
|
36
|
+
)
|
dodal/beamlines/p99.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
|
|
3
3
|
from ophyd_async.epics.adandor import Andor2Detector
|
|
4
|
+
from ophyd_async.fastcs.panda import HDFPanda
|
|
4
5
|
|
|
5
6
|
from dodal.common.beamlines.beamline_utils import (
|
|
6
7
|
device_factory,
|
|
@@ -15,7 +16,7 @@ from dodal.common.visit import (
|
|
|
15
16
|
)
|
|
16
17
|
from dodal.devices.attenuator.filter import FilterMotor
|
|
17
18
|
from dodal.devices.attenuator.filter_selections import P99FilterSelections
|
|
18
|
-
from dodal.devices.motors import
|
|
19
|
+
from dodal.devices.motors import XYZStage
|
|
19
20
|
from dodal.devices.p99.andor2_point import Andor2Point
|
|
20
21
|
from dodal.devices.p99.sample_stage import SampleAngleStage
|
|
21
22
|
from dodal.log import set_beamline as set_log_beamline
|
|
@@ -38,13 +39,13 @@ def filter() -> FilterMotor:
|
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
@device_factory()
|
|
41
|
-
def sample_stage() ->
|
|
42
|
-
return
|
|
42
|
+
def sample_stage() -> XYZStage:
|
|
43
|
+
return XYZStage(f"{PREFIX.beamline_prefix}-MO-STAGE-02:")
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
@device_factory()
|
|
46
|
-
def lab_stage() ->
|
|
47
|
-
return
|
|
47
|
+
def lab_stage() -> XYZStage:
|
|
48
|
+
return XYZStage(f"{PREFIX.beamline_prefix}-MO-STAGE-02:LAB:")
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
set_path_provider(
|
|
@@ -76,3 +77,16 @@ def andor2_point() -> Andor2Point:
|
|
|
76
77
|
drv_suffix=CAM_SUFFIX,
|
|
77
78
|
read_uncached={"mean": "STAT:MeanValue_RBV", "total": "STAT:Total_RBV"},
|
|
78
79
|
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
@device_factory()
|
|
83
|
+
def panda() -> HDFPanda:
|
|
84
|
+
"""
|
|
85
|
+
The Panda device is connected to two PMAC motors for position comparison under
|
|
86
|
+
the pcomp[1] and pcomp[2] blocks, which handle positive and negative directions.
|
|
87
|
+
This setup is used for triggering detectors during a flyscan.
|
|
88
|
+
"""
|
|
89
|
+
return HDFPanda(
|
|
90
|
+
f"{PREFIX.beamline_prefix}-MO-PANDA-01:",
|
|
91
|
+
path_provider=get_path_provider(),
|
|
92
|
+
)
|
dodal/beamlines/training_rig.py
CHANGED
|
@@ -14,7 +14,7 @@ from dodal.common.visit import (
|
|
|
14
14
|
LocalDirectoryServiceClient,
|
|
15
15
|
StaticVisitPathProvider,
|
|
16
16
|
)
|
|
17
|
-
from dodal.devices.
|
|
17
|
+
from dodal.devices.motors import XThetaStage
|
|
18
18
|
from dodal.log import set_beamline as set_log_beamline
|
|
19
19
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
20
20
|
|
|
@@ -45,8 +45,8 @@ set_path_provider(
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
@device_factory()
|
|
48
|
-
def sample_stage() ->
|
|
49
|
-
return
|
|
48
|
+
def sample_stage() -> XThetaStage:
|
|
49
|
+
return XThetaStage(f"{PREFIX.beamline_prefix}-MO-MAP-01:STAGE:")
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
@device_factory()
|
|
@@ -33,12 +33,15 @@ def set_beamline(beamline: str):
|
|
|
33
33
|
|
|
34
34
|
def clear_devices():
|
|
35
35
|
global ACTIVE_DEVICES
|
|
36
|
-
for
|
|
37
|
-
|
|
36
|
+
for name in list(ACTIVE_DEVICES):
|
|
37
|
+
clear_device(name)
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
def clear_device(name: str):
|
|
41
41
|
global ACTIVE_DEVICES
|
|
42
|
+
device = ACTIVE_DEVICES[name]
|
|
43
|
+
if isinstance(device, OphydV1Device):
|
|
44
|
+
device.destroy()
|
|
42
45
|
del ACTIVE_DEVICES[name]
|
|
43
46
|
|
|
44
47
|
|