dls-dodal 1.39.0__py3-none-any.whl → 1.41.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.39.0.dist-info → dls_dodal-1.41.0.dist-info}/METADATA +5 -3
- {dls_dodal-1.39.0.dist-info → dls_dodal-1.41.0.dist-info}/RECORD +61 -52
- {dls_dodal-1.39.0.dist-info → dls_dodal-1.41.0.dist-info}/WHEEL +1 -1
- dodal/_version.py +9 -4
- dodal/beamlines/__init__.py +2 -0
- dodal/beamlines/adsim.py +3 -2
- dodal/beamlines/b01_1.py +3 -3
- dodal/beamlines/i03.py +141 -292
- dodal/beamlines/i04.py +112 -198
- dodal/beamlines/i13_1.py +5 -4
- dodal/beamlines/i18.py +124 -0
- dodal/beamlines/i19_1.py +74 -0
- dodal/beamlines/i19_2.py +61 -0
- dodal/beamlines/i20_1.py +37 -22
- dodal/beamlines/i22.py +7 -7
- dodal/beamlines/i23.py +8 -11
- dodal/beamlines/i24.py +100 -145
- dodal/beamlines/p38.py +84 -220
- dodal/beamlines/p45.py +5 -4
- dodal/beamlines/training_rig.py +4 -4
- dodal/common/beamlines/beamline_utils.py +2 -3
- dodal/common/beamlines/device_helpers.py +3 -1
- dodal/devices/aperturescatterguard.py +150 -64
- dodal/devices/apple2_undulator.py +89 -114
- dodal/devices/attenuator/attenuator.py +1 -1
- dodal/devices/backlight.py +1 -1
- dodal/devices/bimorph_mirror.py +2 -2
- dodal/devices/eiger.py +3 -2
- dodal/devices/fast_grid_scan.py +26 -19
- dodal/devices/hutch_shutter.py +26 -13
- dodal/devices/i10/i10_apple2.py +3 -3
- dodal/devices/i10/rasor/rasor_scaler_cards.py +4 -4
- dodal/devices/i13_1/merlin.py +4 -3
- dodal/devices/i13_1/merlin_controller.py +2 -7
- dodal/devices/i18/KBMirror.py +19 -0
- dodal/devices/i18/diode.py +17 -0
- dodal/devices/i18/table.py +14 -0
- dodal/devices/i18/thor_labs_stage.py +12 -0
- dodal/devices/i19/__init__.py +0 -0
- dodal/devices/i19/shutter.py +57 -0
- dodal/devices/i22/nxsas.py +4 -4
- dodal/devices/i24/pmac.py +2 -2
- dodal/devices/motors.py +2 -2
- dodal/devices/oav/oav_detector.py +10 -19
- dodal/devices/pressure_jump_cell.py +43 -19
- dodal/devices/robot.py +31 -12
- dodal/devices/tetramm.py +8 -3
- dodal/devices/thawer.py +4 -4
- dodal/devices/turbo_slit.py +7 -6
- dodal/devices/undulator.py +1 -1
- dodal/devices/undulator_dcm.py +1 -1
- dodal/devices/util/epics_util.py +1 -1
- dodal/devices/zebra/zebra.py +4 -3
- dodal/devices/zebra/zebra_controlled_shutter.py +1 -1
- dodal/devices/zocalo/zocalo_results.py +21 -4
- dodal/plan_stubs/wrapped.py +10 -12
- dodal/plans/save_panda.py +30 -14
- dodal/utils.py +55 -21
- {dls_dodal-1.39.0.dist-info → dls_dodal-1.41.0.dist-info}/LICENSE +0 -0
- {dls_dodal-1.39.0.dist-info → dls_dodal-1.41.0.dist-info}/entry_points.txt +0 -0
- {dls_dodal-1.39.0.dist-info → dls_dodal-1.41.0.dist-info}/top_level.txt +0 -0
dodal/beamlines/i19_1.py
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
from dodal.common.beamlines.beamline_utils import (
|
|
2
|
+
device_factory,
|
|
3
|
+
)
|
|
4
|
+
from dodal.common.beamlines.beamline_utils import (
|
|
5
|
+
set_beamline as set_utils_beamline,
|
|
6
|
+
)
|
|
7
|
+
from dodal.devices.i19.shutter import HutchConditionalShutter, HutchState
|
|
8
|
+
from dodal.devices.oav.oav_detector import OAV
|
|
9
|
+
from dodal.devices.oav.oav_parameters import OAVConfig
|
|
10
|
+
from dodal.devices.synchrotron import Synchrotron
|
|
11
|
+
from dodal.devices.zebra.zebra import Zebra
|
|
12
|
+
from dodal.devices.zebra.zebra_constants_mapping import (
|
|
13
|
+
ZebraMapping,
|
|
14
|
+
ZebraSources,
|
|
15
|
+
ZebraTTLOutputs,
|
|
16
|
+
)
|
|
17
|
+
from dodal.log import set_beamline as set_log_beamline
|
|
18
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
19
|
+
|
|
20
|
+
# NOTE All PVs for both hutches and the optics have the prefix BL19I
|
|
21
|
+
BL = get_beamline_name("i19_1")
|
|
22
|
+
PREFIX = BeamlinePrefix("i19", "I")
|
|
23
|
+
set_log_beamline(BL)
|
|
24
|
+
set_utils_beamline(BL)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
I19_1_ZEBRA_MAPPING = ZebraMapping(
|
|
28
|
+
outputs=ZebraTTLOutputs(TTL_PILATUS=1),
|
|
29
|
+
sources=ZebraSources(),
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
ZOOM_PARAMS_FILE = (
|
|
33
|
+
"/dls_sw/i19-1/software/gda_versions/gda/config/xml/jCameraManZoomLevels.xml"
|
|
34
|
+
)
|
|
35
|
+
DISPLAY_CONFIG = "/dls_sw/i19-1/software/daq_configuration/domain/display.configuration"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@device_factory()
|
|
39
|
+
def oav() -> OAV:
|
|
40
|
+
return OAV(
|
|
41
|
+
prefix=f"{PREFIX.beamline_prefix}-DI-OAV-01:",
|
|
42
|
+
config=OAVConfig(ZOOM_PARAMS_FILE, DISPLAY_CONFIG),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@device_factory()
|
|
47
|
+
def zebra() -> Zebra:
|
|
48
|
+
"""Get the i19-1 zebra device, instantiate it if it hasn't already been.
|
|
49
|
+
If this is called when already instantiated in i19-1, it will return the existing object.
|
|
50
|
+
"""
|
|
51
|
+
return Zebra(
|
|
52
|
+
mapping=I19_1_ZEBRA_MAPPING,
|
|
53
|
+
name="zebra",
|
|
54
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-ZEBRA-03:",
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@device_factory()
|
|
59
|
+
def shutter() -> HutchConditionalShutter:
|
|
60
|
+
"""Get the i19-2 hutch shutter device, instantiate it if it hasn't already been.
|
|
61
|
+
If this is called when already instantiated, it will return the existing object.
|
|
62
|
+
"""
|
|
63
|
+
return HutchConditionalShutter(
|
|
64
|
+
prefix=f"{PREFIX.beamline_prefix}-PS-SHTR-01:",
|
|
65
|
+
hutch=HutchState.EH1,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@device_factory()
|
|
70
|
+
def synchrotron() -> Synchrotron:
|
|
71
|
+
"""Get the i19-1 synchrotron device, instantiate it if it hasn't already been.
|
|
72
|
+
If this is called when already instantiated in i19-1, it will return the existing object.
|
|
73
|
+
"""
|
|
74
|
+
return Synchrotron()
|
dodal/beamlines/i19_2.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from dodal.common.beamlines.beamline_utils import (
|
|
2
|
+
device_factory,
|
|
3
|
+
)
|
|
4
|
+
from dodal.common.beamlines.beamline_utils import (
|
|
5
|
+
set_beamline as set_utils_beamline,
|
|
6
|
+
)
|
|
7
|
+
from dodal.devices.i19.shutter import HutchConditionalShutter, HutchState
|
|
8
|
+
from dodal.devices.synchrotron import Synchrotron
|
|
9
|
+
from dodal.devices.zebra.zebra import Zebra
|
|
10
|
+
from dodal.devices.zebra.zebra_constants_mapping import (
|
|
11
|
+
ZebraMapping,
|
|
12
|
+
ZebraSources,
|
|
13
|
+
ZebraTTLOutputs,
|
|
14
|
+
)
|
|
15
|
+
from dodal.log import set_beamline as set_log_beamline
|
|
16
|
+
from dodal.utils import BeamlinePrefix
|
|
17
|
+
|
|
18
|
+
# NOTE all workstations on I19 default to i19-1 as beamline name
|
|
19
|
+
# Unless variable is exported (which is not usually done by scientists)
|
|
20
|
+
# NOTE All PVs for both hutches and the optics have the prefix BL19I
|
|
21
|
+
BL = "i19-2"
|
|
22
|
+
PREFIX = BeamlinePrefix("i19", "I")
|
|
23
|
+
set_log_beamline(BL)
|
|
24
|
+
set_utils_beamline(BL)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
I19_2_ZEBRA_MAPPING = ZebraMapping(
|
|
28
|
+
outputs=ZebraTTLOutputs(),
|
|
29
|
+
sources=ZebraSources(),
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@device_factory()
|
|
34
|
+
def zebra() -> Zebra:
|
|
35
|
+
"""Get the i19-2 zebra device, instantiate it if it hasn't already been.
|
|
36
|
+
If this is called when already instantiated in i19-2, it will return the existing object.
|
|
37
|
+
"""
|
|
38
|
+
return Zebra(
|
|
39
|
+
mapping=I19_2_ZEBRA_MAPPING,
|
|
40
|
+
name="zebra",
|
|
41
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-ZEBRA-01:",
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@device_factory()
|
|
46
|
+
def shutter() -> HutchConditionalShutter:
|
|
47
|
+
"""Get the i19-2 hutch shutter device, instantiate it if it hasn't already been.
|
|
48
|
+
If this is called when already instantiated, it will return the existing object.
|
|
49
|
+
"""
|
|
50
|
+
return HutchConditionalShutter(
|
|
51
|
+
prefix=f"{PREFIX.beamline_prefix}-PS-SHTR-01:",
|
|
52
|
+
hutch=HutchState.EH2,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
@device_factory()
|
|
57
|
+
def synchrotron() -> Synchrotron:
|
|
58
|
+
"""Get the i19-2 synchrotron device, instantiate it if it hasn't already been.
|
|
59
|
+
If this is called when already instantiated in i19-2, it will return the existing object.
|
|
60
|
+
"""
|
|
61
|
+
return Synchrotron()
|
dodal/beamlines/i20_1.py
CHANGED
|
@@ -1,43 +1,58 @@
|
|
|
1
|
-
from
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from dodal.common.beamlines.beamline_utils import (
|
|
4
|
+
device_factory,
|
|
5
|
+
set_path_provider,
|
|
6
|
+
)
|
|
2
7
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
8
|
+
from dodal.common.visit import RemoteDirectoryServiceClient, StaticVisitPathProvider
|
|
9
|
+
from dodal.devices.synchrotron import Synchrotron
|
|
3
10
|
from dodal.devices.turbo_slit import TurboSlit
|
|
4
11
|
from dodal.devices.xspress3.xspress3 import Xspress3
|
|
5
12
|
from dodal.log import set_beamline as set_log_beamline
|
|
6
|
-
from dodal.utils import get_beamline_name
|
|
13
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
7
14
|
|
|
8
|
-
BL = get_beamline_name("
|
|
15
|
+
BL = get_beamline_name("i20-1")
|
|
16
|
+
PREFIX = BeamlinePrefix(BL, suffix="J")
|
|
9
17
|
set_log_beamline(BL)
|
|
10
18
|
set_utils_beamline(BL)
|
|
11
19
|
|
|
12
20
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
# Currently we must hard-code the visit, determining the visit at runtime requires
|
|
22
|
+
# infrastructure that is still WIP.
|
|
23
|
+
# Communication with GDA is also WIP so for now we determine an arbitrary scan number
|
|
24
|
+
# locally and write the commissioning directory. The scan number is not guaranteed to
|
|
25
|
+
# be unique and the data is at risk - this configuration is for testing only.
|
|
26
|
+
set_path_provider(
|
|
27
|
+
StaticVisitPathProvider(
|
|
28
|
+
BL,
|
|
29
|
+
Path("/dls/i20-1/data/2023/cm33897-5/bluesky"),
|
|
30
|
+
client=RemoteDirectoryServiceClient("http://i20-1-control:8088/api"),
|
|
31
|
+
)
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@device_factory()
|
|
36
|
+
def turbo_slit() -> TurboSlit:
|
|
16
37
|
"""
|
|
17
38
|
turboslit for selecting energy from the polychromator
|
|
18
39
|
"""
|
|
19
40
|
|
|
20
|
-
return
|
|
21
|
-
TurboSlit,
|
|
22
|
-
prefix="-OP-PCHRO-01:TS:",
|
|
23
|
-
name="turbo_slit",
|
|
24
|
-
wait=wait_for_connection,
|
|
25
|
-
fake=fake_with_ophyd_sim,
|
|
26
|
-
)
|
|
41
|
+
return TurboSlit(f"{PREFIX.beamline_prefix}-OP-PCHRO-01:TS:")
|
|
27
42
|
|
|
28
43
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
) -> Xspress3:
|
|
44
|
+
@device_factory(skip=True)
|
|
45
|
+
def xspress3() -> Xspress3:
|
|
32
46
|
"""
|
|
33
47
|
16 channels Xspress3 detector
|
|
34
48
|
"""
|
|
35
49
|
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
prefix="-EA-DET-03:",
|
|
39
|
-
name="Xspress3",
|
|
50
|
+
return Xspress3(
|
|
51
|
+
f"{PREFIX.beamline_prefix}-EA-DET-03:",
|
|
40
52
|
num_channels=16,
|
|
41
|
-
wait=wait_for_connection,
|
|
42
|
-
fake=fake_with_ophyd_sim,
|
|
43
53
|
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
@device_factory()
|
|
57
|
+
def synchrotron() -> Synchrotron:
|
|
58
|
+
return Synchrotron()
|
dodal/beamlines/i22.py
CHANGED
|
@@ -10,7 +10,7 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
10
10
|
set_path_provider,
|
|
11
11
|
)
|
|
12
12
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
13
|
-
from dodal.common.beamlines.device_helpers import
|
|
13
|
+
from dodal.common.beamlines.device_helpers import CAM_SUFFIX, DET_SUFFIX, HDF5_SUFFIX
|
|
14
14
|
from dodal.common.crystal_metadata import (
|
|
15
15
|
MaterialsEnum,
|
|
16
16
|
make_crystal_metadata_from_material,
|
|
@@ -63,8 +63,8 @@ def saxs() -> PilatusDetector:
|
|
|
63
63
|
return NXSasPilatus(
|
|
64
64
|
prefix=f"{PREFIX.beamline_prefix}-EA-PILAT-01:",
|
|
65
65
|
path_provider=get_path_provider(),
|
|
66
|
-
drv_suffix=
|
|
67
|
-
|
|
66
|
+
drv_suffix=CAM_SUFFIX,
|
|
67
|
+
fileio_suffix=HDF5_SUFFIX,
|
|
68
68
|
metadata_holder=metadata_holder,
|
|
69
69
|
)
|
|
70
70
|
|
|
@@ -88,8 +88,8 @@ def waxs() -> PilatusDetector:
|
|
|
88
88
|
return NXSasPilatus(
|
|
89
89
|
prefix=f"{PREFIX.beamline_prefix}-EA-PILAT-03:",
|
|
90
90
|
path_provider=get_path_provider(),
|
|
91
|
-
drv_suffix=
|
|
92
|
-
|
|
91
|
+
drv_suffix=CAM_SUFFIX,
|
|
92
|
+
fileio_suffix=HDF5_SUFFIX,
|
|
93
93
|
metadata_holder=metadata_holder,
|
|
94
94
|
)
|
|
95
95
|
|
|
@@ -248,8 +248,8 @@ def oav() -> AravisDetector:
|
|
|
248
248
|
)
|
|
249
249
|
return NXSasOAV(
|
|
250
250
|
prefix=f"{PREFIX.beamline_prefix}-DI-OAV-01:",
|
|
251
|
-
drv_suffix=
|
|
252
|
-
|
|
251
|
+
drv_suffix=DET_SUFFIX,
|
|
252
|
+
fileio_suffix=HDF5_SUFFIX,
|
|
253
253
|
path_provider=get_path_provider(),
|
|
254
254
|
metadata_holder=metadata_holder,
|
|
255
255
|
)
|
dodal/beamlines/i23.py
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
from dodal.common.beamlines.beamline_utils import
|
|
1
|
+
from dodal.common.beamlines.beamline_utils import device_factory
|
|
2
2
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
3
3
|
from dodal.devices.oav.pin_image_recognition import PinTipDetection
|
|
4
4
|
from dodal.log import set_beamline as set_log_beamline
|
|
5
|
-
from dodal.utils import get_beamline_name, get_hostname
|
|
5
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name, get_hostname
|
|
6
6
|
|
|
7
7
|
BL = get_beamline_name("i23")
|
|
8
8
|
set_log_beamline(BL)
|
|
9
9
|
set_utils_beamline(BL)
|
|
10
10
|
|
|
11
|
+
PREFIX = BeamlinePrefix(BL)
|
|
12
|
+
|
|
11
13
|
|
|
12
14
|
def _is_i23_machine():
|
|
13
15
|
"""
|
|
@@ -18,16 +20,11 @@ def _is_i23_machine():
|
|
|
18
20
|
return hostname.startswith("i23-ws") or hostname.startswith("i23-control")
|
|
19
21
|
|
|
20
22
|
|
|
21
|
-
@
|
|
22
|
-
def oav_pin_tip_detection(
|
|
23
|
-
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
|
|
24
|
-
) -> PinTipDetection:
|
|
23
|
+
@device_factory(skip=lambda: not _is_i23_machine())
|
|
24
|
+
def oav_pin_tip_detection() -> PinTipDetection:
|
|
25
25
|
"""Get the i23 OAV pin-tip detection device"""
|
|
26
26
|
|
|
27
|
-
return
|
|
28
|
-
|
|
27
|
+
return PinTipDetection(
|
|
28
|
+
f"{PREFIX.beamline_prefix}-DI-OAV-01:",
|
|
29
29
|
"pin_tip_detection",
|
|
30
|
-
"-DI-OAV-01:",
|
|
31
|
-
wait_for_connection,
|
|
32
|
-
fake_with_ophyd_sim,
|
|
33
30
|
)
|
dodal/beamlines/i24.py
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
from dodal.common.beamlines.beamline_utils import
|
|
1
|
+
from dodal.common.beamlines.beamline_utils import (
|
|
2
|
+
BL,
|
|
3
|
+
device_factory,
|
|
4
|
+
)
|
|
2
5
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
3
6
|
from dodal.devices.attenuator.attenuator import ReadOnlyAttenuator
|
|
4
|
-
from dodal.devices.detector import DetectorParams
|
|
5
|
-
from dodal.devices.eiger import EigerDetector
|
|
6
7
|
from dodal.devices.hutch_shutter import HutchShutter
|
|
7
8
|
from dodal.devices.i24.aperture import Aperture
|
|
8
9
|
from dodal.devices.i24.beam_center import DetectorBeamCenter
|
|
@@ -23,7 +24,7 @@ from dodal.devices.zebra.zebra_constants_mapping import (
|
|
|
23
24
|
ZebraTTLOutputs,
|
|
24
25
|
)
|
|
25
26
|
from dodal.log import set_beamline as set_log_beamline
|
|
26
|
-
from dodal.utils import
|
|
27
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
27
28
|
|
|
28
29
|
ZOOM_PARAMS_FILE = (
|
|
29
30
|
"/dls_sw/i24/software/gda_versions/gda/config/xml/jCameraManZoomLevels.xml"
|
|
@@ -40,234 +41,188 @@ I24_ZEBRA_MAPPING = ZebraMapping(
|
|
|
40
41
|
sources=ZebraSources(),
|
|
41
42
|
)
|
|
42
43
|
|
|
44
|
+
PREFIX = BeamlinePrefix(BL)
|
|
45
|
+
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
) -> ReadOnlyAttenuator:
|
|
47
|
+
@device_factory()
|
|
48
|
+
def attenuator() -> ReadOnlyAttenuator:
|
|
47
49
|
"""Get a read-only attenuator device for i24, instantiate it if it hasn't already
|
|
48
50
|
been. If this is called when already instantiated in i24, it will return the
|
|
49
51
|
existing object."""
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
+
return ReadOnlyAttenuator(
|
|
53
|
+
f"{PREFIX.beamline_prefix}-OP-ATTN-01:",
|
|
52
54
|
"attenuator",
|
|
53
|
-
"-OP-ATTN-01:",
|
|
54
|
-
wait_for_connection,
|
|
55
|
-
fake_with_ophyd_sim,
|
|
56
55
|
)
|
|
57
56
|
|
|
58
57
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
) -> Aperture:
|
|
58
|
+
@device_factory()
|
|
59
|
+
def aperture() -> Aperture:
|
|
62
60
|
"""Get the i24 aperture device, instantiate it if it hasn't already been.
|
|
63
61
|
If this is called when already instantiated in i24, it will return the existing object.
|
|
64
62
|
"""
|
|
65
|
-
return
|
|
66
|
-
|
|
63
|
+
return Aperture(
|
|
64
|
+
f"{PREFIX.beamline_prefix}-AL-APTR-01:",
|
|
65
|
+
"aperture",
|
|
67
66
|
)
|
|
68
67
|
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
) -> Beamstop:
|
|
69
|
+
@device_factory()
|
|
70
|
+
def beamstop() -> Beamstop:
|
|
73
71
|
"""Get the i24 beamstop device, instantiate it if it hasn't already been.
|
|
74
72
|
If this is called when already instantiated in i24, it will return the existing object.
|
|
75
73
|
"""
|
|
76
|
-
return
|
|
77
|
-
|
|
74
|
+
return Beamstop(
|
|
75
|
+
f"{PREFIX.beamline_prefix}-MO-BS-01:",
|
|
78
76
|
"beamstop",
|
|
79
|
-
"-MO-BS-01:",
|
|
80
|
-
wait_for_connection,
|
|
81
|
-
fake_with_ophyd_sim,
|
|
82
77
|
)
|
|
83
78
|
|
|
84
79
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
) -> DualBacklight:
|
|
80
|
+
@device_factory()
|
|
81
|
+
def backlight() -> DualBacklight:
|
|
88
82
|
"""Get the i24 backlight device, instantiate it if it hasn't already been.
|
|
89
83
|
If this is called when already instantiated in i24, it will return the existing object.
|
|
90
84
|
"""
|
|
91
|
-
return
|
|
92
|
-
|
|
85
|
+
return DualBacklight(
|
|
86
|
+
prefix=PREFIX.beamline_prefix,
|
|
93
87
|
name="backlight",
|
|
94
|
-
prefix="",
|
|
95
|
-
wait=wait_for_connection,
|
|
96
|
-
fake=fake_with_ophyd_sim,
|
|
97
88
|
)
|
|
98
89
|
|
|
99
90
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
) -> DetectorMotion:
|
|
91
|
+
@device_factory()
|
|
92
|
+
def detector_motion() -> DetectorMotion:
|
|
103
93
|
"""Get the i24 detector motion device, instantiate it if it hasn't already been.
|
|
104
94
|
If this is called when already instantiated in i24, it will return the existing object.
|
|
105
95
|
"""
|
|
106
|
-
return
|
|
107
|
-
device_factory=DetectorMotion,
|
|
96
|
+
return DetectorMotion(
|
|
108
97
|
name="detector_motion",
|
|
109
|
-
prefix="-EA-DET-01:",
|
|
110
|
-
wait=wait_for_connection,
|
|
111
|
-
fake=fake_with_ophyd_sim,
|
|
98
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-DET-01:",
|
|
112
99
|
)
|
|
113
100
|
|
|
114
101
|
|
|
115
|
-
|
|
102
|
+
@device_factory()
|
|
103
|
+
def dcm() -> DCM:
|
|
116
104
|
"""Get the i24 DCM device, instantiate it if it hasn't already been.
|
|
117
105
|
If this is called when already instantiated in i24, it will return the existing object.
|
|
118
106
|
"""
|
|
119
|
-
return
|
|
120
|
-
device_factory=DCM,
|
|
107
|
+
return DCM(
|
|
121
108
|
name="dcm",
|
|
122
|
-
prefix=
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
@skip_device(lambda: BL == "s24")
|
|
129
|
-
def eiger(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
) -> EigerDetector:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
109
|
+
prefix=PREFIX.beamline_prefix,
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
# TODO implement ophyd-async eiger see
|
|
114
|
+
# https://github.com/DiamondLightSource/mx-bluesky/issues/62
|
|
115
|
+
# @skip_device(lambda: BL == "s24")
|
|
116
|
+
# def eiger(
|
|
117
|
+
# wait_for_connection: bool = True,
|
|
118
|
+
# fake_with_ophyd_sim: bool = False,
|
|
119
|
+
# params: DetectorParams | None = None,
|
|
120
|
+
# ) -> EigerDetector:
|
|
121
|
+
# """Get the i24 Eiger device, instantiate it if it hasn't already been.
|
|
122
|
+
# If this is called when already instantiated, it will return the existing object.
|
|
123
|
+
# If called with params, will update those params to the Eiger object.
|
|
124
|
+
# """
|
|
125
|
+
#
|
|
126
|
+
# def set_params(eiger: EigerDetector):
|
|
127
|
+
# if params is not None:
|
|
128
|
+
# eiger.set_detector_parameters(params)
|
|
129
|
+
#
|
|
130
|
+
# return device_instantiation(
|
|
131
|
+
# device_factory=EigerDetector,
|
|
132
|
+
# name="eiger",
|
|
133
|
+
# prefix="-EA-EIGER-01:",
|
|
134
|
+
# wait=wait_for_connection,
|
|
135
|
+
# fake=fake_with_ophyd_sim,
|
|
136
|
+
# post_create=set_params,
|
|
137
|
+
# )
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
@device_factory()
|
|
141
|
+
def pmac() -> PMAC:
|
|
154
142
|
"""Get the i24 PMAC device, instantiate it if it hasn't already been.
|
|
155
143
|
If this is called when already instantiated in i24, it will return the existing object.
|
|
156
144
|
"""
|
|
157
145
|
# prefix not BL but ME14E
|
|
158
|
-
return
|
|
159
|
-
PMAC,
|
|
160
|
-
"pmac",
|
|
146
|
+
return PMAC(
|
|
161
147
|
"ME14E-MO-CHIP-01:",
|
|
162
|
-
|
|
163
|
-
fake_with_ophyd_sim,
|
|
164
|
-
bl_prefix=False,
|
|
148
|
+
"pmac",
|
|
165
149
|
)
|
|
166
150
|
|
|
167
151
|
|
|
168
|
-
@
|
|
169
|
-
def oav(
|
|
170
|
-
return
|
|
171
|
-
OAV,
|
|
172
|
-
"oav",
|
|
173
|
-
"-DI-OAV-01:",
|
|
174
|
-
wait_for_connection,
|
|
175
|
-
fake_with_ophyd_sim,
|
|
152
|
+
@device_factory(skip=BL == "s24")
|
|
153
|
+
def oav() -> OAV:
|
|
154
|
+
return OAV(
|
|
155
|
+
prefix=f"{PREFIX.beamline_prefix}-DI-OAV-01:",
|
|
156
|
+
name="oav",
|
|
176
157
|
config=OAVConfig(ZOOM_PARAMS_FILE, DISPLAY_CONFIG),
|
|
177
158
|
)
|
|
178
159
|
|
|
179
160
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
) -> VerticalGoniometer:
|
|
161
|
+
@device_factory()
|
|
162
|
+
def vgonio() -> VerticalGoniometer:
|
|
183
163
|
"""Get the i24 vertical goniometer device, instantiate it if it hasn't already been.
|
|
184
164
|
If this is called when already instantiated, it will return the existing object.
|
|
185
165
|
"""
|
|
186
|
-
return
|
|
187
|
-
|
|
166
|
+
return VerticalGoniometer(
|
|
167
|
+
f"{PREFIX.beamline_prefix}-MO-VGON-01:",
|
|
188
168
|
"vgonio",
|
|
189
|
-
"-MO-VGON-01:",
|
|
190
|
-
wait_for_connection,
|
|
191
|
-
fake_with_ophyd_sim,
|
|
192
169
|
)
|
|
193
170
|
|
|
194
171
|
|
|
195
|
-
|
|
172
|
+
@device_factory()
|
|
173
|
+
def zebra() -> Zebra:
|
|
196
174
|
"""Get the i24 zebra device, instantiate it if it hasn't already been.
|
|
197
175
|
If this is called when already instantiated in i24, it will return the existing object.
|
|
198
176
|
"""
|
|
199
|
-
return
|
|
200
|
-
|
|
201
|
-
"
|
|
202
|
-
"-EA-ZEBRA-01:",
|
|
203
|
-
wait_for_connection,
|
|
204
|
-
fake_with_ophyd_sim,
|
|
177
|
+
return Zebra(
|
|
178
|
+
name="zebra",
|
|
179
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-ZEBRA-01:",
|
|
205
180
|
mapping=I24_ZEBRA_MAPPING,
|
|
206
181
|
)
|
|
207
182
|
|
|
208
183
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
) -> HutchShutter:
|
|
184
|
+
@device_factory()
|
|
185
|
+
def shutter() -> HutchShutter:
|
|
212
186
|
"""Get the i24 hutch shutter device, instantiate it if it hasn't already been.
|
|
213
187
|
If this is called when already instantiated, it will return the existing object.
|
|
214
188
|
"""
|
|
215
|
-
return
|
|
216
|
-
|
|
189
|
+
return HutchShutter(
|
|
190
|
+
f"{PREFIX.beamline_prefix}-PS-SHTR-01:",
|
|
217
191
|
"shutter",
|
|
218
|
-
"-PS-SHTR-01:",
|
|
219
|
-
wait_for_connection,
|
|
220
|
-
fake_with_ophyd_sim,
|
|
221
192
|
)
|
|
222
193
|
|
|
223
194
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
) -> FocusMirrorsMode:
|
|
195
|
+
@device_factory()
|
|
196
|
+
def focus_mirrors() -> FocusMirrorsMode:
|
|
227
197
|
"""Get the i24 focus mirror devise to find the beam size."""
|
|
228
|
-
return
|
|
229
|
-
|
|
198
|
+
return FocusMirrorsMode(
|
|
199
|
+
f"{PREFIX.beamline_prefix}-OP-MFM-01:",
|
|
230
200
|
"focus_mirrors",
|
|
231
|
-
"-OP-MFM-01:",
|
|
232
|
-
wait_for_connection,
|
|
233
|
-
fake_with_ophyd_sim,
|
|
234
201
|
)
|
|
235
202
|
|
|
236
203
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
) -> DetectorBeamCenter:
|
|
204
|
+
@device_factory()
|
|
205
|
+
def eiger_beam_center() -> DetectorBeamCenter:
|
|
240
206
|
"""A device for setting/reading the beamcenter from the eiger on i24."""
|
|
241
|
-
return
|
|
242
|
-
|
|
207
|
+
return DetectorBeamCenter(
|
|
208
|
+
f"{PREFIX.beamline_prefix}-EA-EIGER-01:CAM:",
|
|
243
209
|
"eiger_bc",
|
|
244
|
-
"-EA-EIGER-01:CAM:",
|
|
245
|
-
wait_for_connection,
|
|
246
|
-
fake_with_ophyd_sim,
|
|
247
210
|
)
|
|
248
211
|
|
|
249
212
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
) -> DetectorBeamCenter:
|
|
213
|
+
@device_factory()
|
|
214
|
+
def pilatus_beam_center() -> DetectorBeamCenter:
|
|
253
215
|
"""A device for setting/reading the beamcenter from the pilatus on i24."""
|
|
254
|
-
return
|
|
255
|
-
|
|
216
|
+
return DetectorBeamCenter(
|
|
217
|
+
f"{PREFIX.beamline_prefix}-EA-PILAT-01:cam1:",
|
|
256
218
|
"pilatus_bc",
|
|
257
|
-
"-EA-PILAT-01:cam1:",
|
|
258
|
-
wait_for_connection,
|
|
259
|
-
fake_with_ophyd_sim,
|
|
260
219
|
)
|
|
261
220
|
|
|
262
221
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
) -> PilatusMetadata:
|
|
222
|
+
@device_factory()
|
|
223
|
+
def pilatus_metadata() -> PilatusMetadata:
|
|
266
224
|
"""A small pilatus driver device for figuring out the filename template."""
|
|
267
|
-
return
|
|
268
|
-
|
|
225
|
+
return PilatusMetadata(
|
|
226
|
+
f"{PREFIX.beamline_prefix}-EA-PILAT-01:",
|
|
269
227
|
"pilatus_meta",
|
|
270
|
-
"-EA-PILAT-01:",
|
|
271
|
-
wait_for_connection,
|
|
272
|
-
fake_with_ophyd_sim,
|
|
273
228
|
)
|