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/i06.py
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
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.insertion_device.apple2_undulator import (
|
|
6
|
+
Apple2,
|
|
7
|
+
UndulatorGap,
|
|
8
|
+
UndulatorLockedPhaseAxes,
|
|
9
|
+
)
|
|
10
|
+
from dodal.devices.synchrotron import Synchrotron
|
|
11
|
+
from dodal.log import set_beamline as set_log_beamline
|
|
12
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
13
|
+
|
|
14
|
+
BL = get_beamline_name("i06")
|
|
15
|
+
PREFIX = BeamlinePrefix(BL)
|
|
16
|
+
set_log_beamline(BL)
|
|
17
|
+
set_utils_beamline(BL)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@device_factory()
|
|
21
|
+
def synchrotron() -> Synchrotron:
|
|
22
|
+
return Synchrotron()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@device_factory()
|
|
26
|
+
def idd_gap() -> UndulatorGap:
|
|
27
|
+
return UndulatorGap(prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:")
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@device_factory()
|
|
31
|
+
def idd_phase() -> UndulatorLockedPhaseAxes:
|
|
32
|
+
return UndulatorLockedPhaseAxes(
|
|
33
|
+
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
|
|
34
|
+
top_outer="PL",
|
|
35
|
+
btm_inner="PU",
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@device_factory()
|
|
40
|
+
def idd() -> Apple2:
|
|
41
|
+
"""i06 downstream insertion device."""
|
|
42
|
+
return Apple2(id_gap=idd_gap(), id_phase=idd_phase())
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@device_factory()
|
|
46
|
+
def idu_gap() -> UndulatorGap:
|
|
47
|
+
return UndulatorGap(prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-21:")
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@device_factory()
|
|
51
|
+
def idu_phase() -> UndulatorLockedPhaseAxes:
|
|
52
|
+
return UndulatorLockedPhaseAxes(
|
|
53
|
+
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-21:",
|
|
54
|
+
top_outer="PL",
|
|
55
|
+
btm_inner="PU",
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@device_factory()
|
|
60
|
+
def idu() -> Apple2:
|
|
61
|
+
"""i06 upstream insertion device."""
|
|
62
|
+
return Apple2(id_gap=idd_gap(), id_phase=idd_phase())
|
dodal/beamlines/i07.py
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
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.i07.dcm import DCM
|
|
4
|
+
from dodal.devices.i07.id import InsertionDevice
|
|
5
|
+
from dodal.devices.undulator import UndulatorOrder
|
|
4
6
|
from dodal.log import set_beamline as set_log_beamline
|
|
5
7
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
6
8
|
|
|
@@ -19,3 +21,21 @@ def dcm() -> DCM:
|
|
|
19
21
|
"dcm",
|
|
20
22
|
)
|
|
21
23
|
return dcm
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@device_factory()
|
|
27
|
+
def harmonic() -> UndulatorOrder:
|
|
28
|
+
return UndulatorOrder("harmonic")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@device_factory()
|
|
32
|
+
def id() -> InsertionDevice:
|
|
33
|
+
"""Get the i07 undulator device, instantiate it if it hasn't already been.
|
|
34
|
+
If this is called when already instantiated it will return the existing object.
|
|
35
|
+
"""
|
|
36
|
+
return InsertionDevice(
|
|
37
|
+
"id",
|
|
38
|
+
f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
|
|
39
|
+
harmonic(),
|
|
40
|
+
id_gap_lookup_table_path="/dls_sw/i07/software/gda/config/lookupTables/IIDCalibrationTable.txt",
|
|
41
|
+
)
|
dodal/beamlines/i09_1.py
CHANGED
|
@@ -10,8 +10,13 @@ from dodal.devices.common_dcm import (
|
|
|
10
10
|
from dodal.devices.electron_analyser import EnergySource
|
|
11
11
|
from dodal.devices.electron_analyser.specs import SpecsDetector
|
|
12
12
|
from dodal.devices.i09_1 import LensMode, PsuMode
|
|
13
|
+
from dodal.devices.i09_1_shared.hard_energy import HardEnergy, HardInsertionDeviceEnergy
|
|
14
|
+
from dodal.devices.i09_1_shared.hard_undulator_functions import (
|
|
15
|
+
calculate_energy_i09_hu,
|
|
16
|
+
calculate_gap_i09_hu,
|
|
17
|
+
)
|
|
13
18
|
from dodal.devices.synchrotron import Synchrotron
|
|
14
|
-
from dodal.devices.undulator import UndulatorOrder
|
|
19
|
+
from dodal.devices.undulator import UndulatorInMm, UndulatorOrder
|
|
15
20
|
from dodal.log import set_beamline as set_log_beamline
|
|
16
21
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
17
22
|
|
|
@@ -40,7 +45,7 @@ def energy_source() -> EnergySource:
|
|
|
40
45
|
|
|
41
46
|
# Connect will work again after this work completed
|
|
42
47
|
# https://jira.diamond.ac.uk/browse/I09-651
|
|
43
|
-
@device_factory()
|
|
48
|
+
@device_factory(skip=True)
|
|
44
49
|
def analyser() -> SpecsDetector[LensMode, PsuMode]:
|
|
45
50
|
return SpecsDetector[LensMode, PsuMode](
|
|
46
51
|
prefix=f"{PREFIX.beamline_prefix}-EA-DET-02:CAM:",
|
|
@@ -50,6 +55,30 @@ def analyser() -> SpecsDetector[LensMode, PsuMode]:
|
|
|
50
55
|
)
|
|
51
56
|
|
|
52
57
|
|
|
58
|
+
@device_factory()
|
|
59
|
+
def undulator() -> UndulatorInMm:
|
|
60
|
+
return UndulatorInMm(prefix=f"{BeamlinePrefix(BL).insertion_prefix}-MO-SERVC-01:")
|
|
61
|
+
|
|
62
|
+
|
|
53
63
|
@device_factory()
|
|
54
64
|
def harmonics() -> UndulatorOrder:
|
|
55
|
-
return UndulatorOrder(
|
|
65
|
+
return UndulatorOrder()
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@device_factory()
|
|
69
|
+
def hu_id_energy() -> HardInsertionDeviceEnergy:
|
|
70
|
+
return HardInsertionDeviceEnergy(
|
|
71
|
+
undulator_order=harmonics(),
|
|
72
|
+
undulator=undulator(),
|
|
73
|
+
lut={}, # ToDo https://github.com/DiamondLightSource/sm-bluesky/issues/239
|
|
74
|
+
gap_to_energy_func=calculate_energy_i09_hu,
|
|
75
|
+
energy_to_gap_func=calculate_gap_i09_hu,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
@device_factory()
|
|
80
|
+
def hu_energy() -> HardEnergy:
|
|
81
|
+
return HardEnergy(
|
|
82
|
+
dcm=dcm(),
|
|
83
|
+
undulator_energy=hu_id_energy(),
|
|
84
|
+
)
|
dodal/beamlines/i09_2.py
CHANGED
|
@@ -1,18 +1,39 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from daq_config_server.client import ConfigServer
|
|
4
|
+
|
|
1
5
|
from dodal.common.beamlines.beamline_utils import (
|
|
2
6
|
device_factory,
|
|
3
7
|
)
|
|
4
8
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
5
|
-
from dodal.devices.
|
|
9
|
+
from dodal.devices.i09.enums import Grating
|
|
10
|
+
from dodal.devices.i09_2_shared.i09_apple2 import (
|
|
11
|
+
J09_GAP_POLY_DEG_COLUMNS,
|
|
12
|
+
J09_PHASE_POLY_DEG_COLUMNS,
|
|
13
|
+
J09Apple2Controller,
|
|
14
|
+
)
|
|
15
|
+
from dodal.devices.insertion_device.apple2_undulator import (
|
|
6
16
|
Apple2,
|
|
17
|
+
BeamEnergy,
|
|
18
|
+
InsertionDeviceEnergy,
|
|
19
|
+
InsertionDevicePolarisation,
|
|
7
20
|
UndulatorGap,
|
|
8
21
|
UndulatorPhaseAxes,
|
|
9
22
|
)
|
|
10
|
-
from dodal.devices.
|
|
23
|
+
from dodal.devices.insertion_device.energy_motor_lookup import (
|
|
24
|
+
ConfigServerEnergyMotorLookup,
|
|
25
|
+
)
|
|
26
|
+
from dodal.devices.insertion_device.lookup_table_models import LookupTableColumnConfig
|
|
11
27
|
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
12
28
|
from dodal.devices.synchrotron import Synchrotron
|
|
13
29
|
from dodal.log import set_beamline as set_log_beamline
|
|
14
30
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
15
31
|
|
|
32
|
+
J09_CONF_CLIENT = ConfigServer(url="https://daq-config.diamond.ac.uk")
|
|
33
|
+
LOOK_UPTABLE_DIR = "/dls_sw/i09-2/software/gda/workspace_git/gda-diamond.git/configurations/i09-2-shared/lookupTables/"
|
|
34
|
+
GAP_LOOKUP_FILE_NAME = "JIDEnergy2GapCalibrations.csv"
|
|
35
|
+
PHASE_LOOKUP_FILE_NAME = "JIDEnergy2PhaseCalibrations.csv"
|
|
36
|
+
|
|
16
37
|
BL = get_beamline_name("i09-2")
|
|
17
38
|
PREFIX = BeamlinePrefix(BL, suffix="J")
|
|
18
39
|
set_log_beamline(BL)
|
|
@@ -55,3 +76,37 @@ def jid() -> Apple2:
|
|
|
55
76
|
id_gap=jid_gap(),
|
|
56
77
|
id_phase=jid_phase(),
|
|
57
78
|
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
@device_factory()
|
|
82
|
+
def jid_controller() -> J09Apple2Controller:
|
|
83
|
+
"""J09 insertion device controller."""
|
|
84
|
+
return J09Apple2Controller(
|
|
85
|
+
apple2=jid(),
|
|
86
|
+
gap_energy_motor_lut=ConfigServerEnergyMotorLookup(
|
|
87
|
+
lut_config=LookupTableColumnConfig(poly_deg=J09_GAP_POLY_DEG_COLUMNS),
|
|
88
|
+
config_client=J09_CONF_CLIENT,
|
|
89
|
+
path=Path(LOOK_UPTABLE_DIR, GAP_LOOKUP_FILE_NAME),
|
|
90
|
+
),
|
|
91
|
+
phase_energy_motor_lut=ConfigServerEnergyMotorLookup(
|
|
92
|
+
lut_config=LookupTableColumnConfig(poly_deg=J09_PHASE_POLY_DEG_COLUMNS),
|
|
93
|
+
config_client=J09_CONF_CLIENT,
|
|
94
|
+
path=Path(LOOK_UPTABLE_DIR, PHASE_LOOKUP_FILE_NAME),
|
|
95
|
+
),
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
@device_factory()
|
|
100
|
+
def jid_energy() -> InsertionDeviceEnergy:
|
|
101
|
+
return InsertionDeviceEnergy(id_controller=jid_controller())
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
@device_factory()
|
|
105
|
+
def jid_polarisation() -> InsertionDevicePolarisation:
|
|
106
|
+
return InsertionDevicePolarisation(id_controller=jid_controller())
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@device_factory()
|
|
110
|
+
def energy_jid() -> BeamEnergy:
|
|
111
|
+
"""Beam energy."""
|
|
112
|
+
return BeamEnergy(id_energy=jid_energy(), mono=pgm().energy)
|
dodal/beamlines/i10_optics.py
CHANGED
|
@@ -6,18 +6,12 @@ note:
|
|
|
6
6
|
idd == id1, idu == id2.
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
9
11
|
from daq_config_server.client import ConfigServer
|
|
10
12
|
|
|
11
13
|
from dodal.common.beamlines.beamline_utils import device_factory
|
|
12
14
|
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
15
|
from dodal.devices.i10 import (
|
|
22
16
|
I10SharedDiagnostic,
|
|
23
17
|
I10SharedSlits,
|
|
@@ -32,6 +26,23 @@ from dodal.devices.i10.i10_apple2 import (
|
|
|
32
26
|
|
|
33
27
|
# Imports taken from i10 while we work out how to deal with split end stations
|
|
34
28
|
from dodal.devices.i10.i10_setting_data import I10Grating
|
|
29
|
+
from dodal.devices.insertion_device.apple2_undulator import (
|
|
30
|
+
BeamEnergy,
|
|
31
|
+
InsertionDeviceEnergy,
|
|
32
|
+
InsertionDevicePolarisation,
|
|
33
|
+
UndulatorGap,
|
|
34
|
+
UndulatorJawPhase,
|
|
35
|
+
UndulatorPhaseAxes,
|
|
36
|
+
)
|
|
37
|
+
from dodal.devices.insertion_device.energy_motor_lookup import (
|
|
38
|
+
ConfigServerEnergyMotorLookup,
|
|
39
|
+
)
|
|
40
|
+
from dodal.devices.insertion_device.lookup_table_models import (
|
|
41
|
+
DEFAULT_GAP_FILE,
|
|
42
|
+
DEFAULT_PHASE_FILE,
|
|
43
|
+
LookupTableColumnConfig,
|
|
44
|
+
Source,
|
|
45
|
+
)
|
|
35
46
|
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
36
47
|
from dodal.devices.synchrotron import Synchrotron
|
|
37
48
|
from dodal.log import set_beamline as set_log_beamline
|
|
@@ -42,8 +53,6 @@ set_log_beamline(BL)
|
|
|
42
53
|
set_utils_beamline(BL)
|
|
43
54
|
PREFIX = BeamlinePrefix(BL)
|
|
44
55
|
|
|
45
|
-
LOOK_UPTABLE_DIR = "/dls_sw/i10/software/blueapi/scratch/i10-config/lookupTables/"
|
|
46
|
-
|
|
47
56
|
|
|
48
57
|
@device_factory()
|
|
49
58
|
def synchrotron() -> Synchrotron:
|
|
@@ -115,11 +124,21 @@ def idd() -> I10Apple2:
|
|
|
115
124
|
@device_factory()
|
|
116
125
|
def idd_controller() -> I10Apple2Controller:
|
|
117
126
|
"""I10 downstream insertion device controller."""
|
|
127
|
+
source = Source(column="Source", value="idd")
|
|
128
|
+
idd_gap_energy_motor_lut = ConfigServerEnergyMotorLookup(
|
|
129
|
+
config_client=I10_CONF_CLIENT,
|
|
130
|
+
lut_config=LookupTableColumnConfig(source=source),
|
|
131
|
+
path=Path(LOOK_UPTABLE_DIR, DEFAULT_GAP_FILE),
|
|
132
|
+
)
|
|
133
|
+
idd_phase_energy_motor_lut = ConfigServerEnergyMotorLookup(
|
|
134
|
+
config_client=I10_CONF_CLIENT,
|
|
135
|
+
lut_config=LookupTableColumnConfig(source=source),
|
|
136
|
+
path=Path(LOOK_UPTABLE_DIR, DEFAULT_PHASE_FILE),
|
|
137
|
+
)
|
|
118
138
|
return I10Apple2Controller(
|
|
119
139
|
apple2=idd(),
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
config_client=I10_CONF_CLIENT,
|
|
140
|
+
gap_energy_motor_lut=idd_gap_energy_motor_lut,
|
|
141
|
+
phase_energy_motor_lut=idd_phase_energy_motor_lut,
|
|
123
142
|
)
|
|
124
143
|
|
|
125
144
|
|
|
@@ -179,11 +198,21 @@ def idu() -> I10Apple2:
|
|
|
179
198
|
@device_factory()
|
|
180
199
|
def idu_controller() -> I10Apple2Controller:
|
|
181
200
|
"""I10 upstream insertion device controller."""
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
source=
|
|
201
|
+
source = Source(column="Source", value="idu")
|
|
202
|
+
idu_gap_energy_motor_lut = ConfigServerEnergyMotorLookup(
|
|
203
|
+
config_client=I10_CONF_CLIENT,
|
|
204
|
+
lut_config=LookupTableColumnConfig(source=source),
|
|
205
|
+
path=Path(LOOK_UPTABLE_DIR, DEFAULT_GAP_FILE),
|
|
206
|
+
)
|
|
207
|
+
idu_phase_energy_motor_lut = ConfigServerEnergyMotorLookup(
|
|
186
208
|
config_client=I10_CONF_CLIENT,
|
|
209
|
+
lut_config=LookupTableColumnConfig(source=source),
|
|
210
|
+
path=Path(LOOK_UPTABLE_DIR, DEFAULT_PHASE_FILE),
|
|
211
|
+
)
|
|
212
|
+
return I10Apple2Controller(
|
|
213
|
+
apple2=idd(),
|
|
214
|
+
gap_energy_motor_lut=idu_gap_energy_motor_lut,
|
|
215
|
+
phase_energy_motor_lut=idu_phase_energy_motor_lut,
|
|
187
216
|
)
|
|
188
217
|
|
|
189
218
|
|
dodal/beamlines/i17.py
CHANGED
|
@@ -7,7 +7,8 @@ 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.
|
|
10
|
+
from dodal.devices.i17.i17_apple2 import I17Apple2Controller
|
|
11
|
+
from dodal.devices.insertion_device.apple2_undulator import (
|
|
11
12
|
Apple2,
|
|
12
13
|
Apple2Controller,
|
|
13
14
|
BeamEnergy,
|
|
@@ -16,7 +17,8 @@ from dodal.devices.apple2_undulator import (
|
|
|
16
17
|
UndulatorGap,
|
|
17
18
|
UndulatorPhaseAxes,
|
|
18
19
|
)
|
|
19
|
-
from dodal.devices.
|
|
20
|
+
from dodal.devices.insertion_device.energy_motor_lookup import EnergyMotorLookup
|
|
21
|
+
from dodal.devices.insertion_device.lookup_table_models import LookupTable
|
|
20
22
|
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
21
23
|
from dodal.devices.synchrotron import Synchrotron
|
|
22
24
|
from dodal.log import set_beamline as set_log_beamline
|
|
@@ -76,7 +78,9 @@ def id() -> Apple2:
|
|
|
76
78
|
def id_controller() -> Apple2Controller:
|
|
77
79
|
"""I17 insertion device controller with dummy energy to motor_converter."""
|
|
78
80
|
return I17Apple2Controller(
|
|
79
|
-
apple2=id(),
|
|
81
|
+
apple2=id(),
|
|
82
|
+
gap_energy_motor_lut=EnergyMotorLookup(lut=LookupTable()),
|
|
83
|
+
phase_energy_motor_lut=EnergyMotorLookup(lut=LookupTable()),
|
|
80
84
|
)
|
|
81
85
|
|
|
82
86
|
|
dodal/beamlines/i18.py
CHANGED
|
@@ -23,7 +23,7 @@ from dodal.devices.motors import XYStage, XYZThetaStage
|
|
|
23
23
|
from dodal.devices.slits import Slits
|
|
24
24
|
from dodal.devices.synchrotron import Synchrotron
|
|
25
25
|
from dodal.devices.tetramm import TetrammDetector
|
|
26
|
-
from dodal.devices.undulator import
|
|
26
|
+
from dodal.devices.undulator import UndulatorInKeV
|
|
27
27
|
from dodal.log import set_beamline as set_log_beamline
|
|
28
28
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
29
29
|
|
|
@@ -53,8 +53,8 @@ def synchrotron() -> Synchrotron:
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
@device_factory()
|
|
56
|
-
def undulator() ->
|
|
57
|
-
return
|
|
56
|
+
def undulator() -> UndulatorInKeV:
|
|
57
|
+
return UndulatorInKeV(f"{PREFIX.insertion_prefix}-MO-SERVC-01:")
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
# See https://github.com/DiamondLightSource/dodal/issues/1180
|
dodal/beamlines/i19_1.py
CHANGED
|
@@ -4,6 +4,9 @@ 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.access_controlled.attenuator_motor_squad import (
|
|
8
|
+
AttenuatorMotorSquad,
|
|
9
|
+
)
|
|
7
10
|
from dodal.devices.i19.access_controlled.blueapi_device import HutchState
|
|
8
11
|
from dodal.devices.i19.access_controlled.shutter import (
|
|
9
12
|
AccessControlledShutter,
|
|
@@ -29,6 +32,8 @@ set_log_beamline(BL)
|
|
|
29
32
|
set_utils_beamline(BL)
|
|
30
33
|
|
|
31
34
|
|
|
35
|
+
I19_1_COMMISSIONING_INSTR_SESSION: str = "cm40638-5"
|
|
36
|
+
|
|
32
37
|
I19_1_ZEBRA_MAPPING = ZebraMapping(
|
|
33
38
|
outputs=ZebraTTLOutputs(TTL_PILATUS=1),
|
|
34
39
|
sources=ZebraSources(),
|
|
@@ -40,6 +45,13 @@ ZOOM_PARAMS_FILE = (
|
|
|
40
45
|
DISPLAY_CONFIG = "/dls_sw/i19-1/software/daq_configuration/domain/display.configuration"
|
|
41
46
|
|
|
42
47
|
|
|
48
|
+
@device_factory()
|
|
49
|
+
def attenuator_motor_squad() -> AttenuatorMotorSquad:
|
|
50
|
+
return AttenuatorMotorSquad(
|
|
51
|
+
hutch=HutchState.EH1, instrument_session=I19_1_COMMISSIONING_INSTR_SESSION
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
43
55
|
# Needs to wait until enum is fixed on the beamline
|
|
44
56
|
# See https://github.com/DiamondLightSource/dodal/issues/1150
|
|
45
57
|
@device_factory()
|
|
@@ -58,19 +70,6 @@ def oav() -> OAVBeamCentreFile:
|
|
|
58
70
|
)
|
|
59
71
|
|
|
60
72
|
|
|
61
|
-
# NOTE EH1 uses the Zebra 2 box. While a Zebra 1 box exists and is connected
|
|
62
|
-
# on the beamline, it is currently not in use
|
|
63
|
-
@device_factory()
|
|
64
|
-
def zebra() -> Zebra:
|
|
65
|
-
"""Get the i19-1 zebra device, instantiate it if it hasn't already been.
|
|
66
|
-
If this is called when already instantiated in i19-1, it will return the existing object.
|
|
67
|
-
"""
|
|
68
|
-
return Zebra(
|
|
69
|
-
mapping=I19_1_ZEBRA_MAPPING,
|
|
70
|
-
prefix=f"{PREFIX.beamline_prefix}-EA-ZEBRA-02:",
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
|
|
74
73
|
@device_factory()
|
|
75
74
|
def shutter() -> AccessControlledShutter:
|
|
76
75
|
"""Get the i19-1 hutch shutter device, instantiate it if it hasn't already been.
|
|
@@ -79,7 +78,7 @@ def shutter() -> AccessControlledShutter:
|
|
|
79
78
|
return AccessControlledShutter(
|
|
80
79
|
prefix=f"{PREFIX.beamline_prefix}-PS-SHTR-01:",
|
|
81
80
|
hutch=HutchState.EH1,
|
|
82
|
-
instrument_session=
|
|
81
|
+
instrument_session=I19_1_COMMISSIONING_INSTR_SESSION,
|
|
83
82
|
)
|
|
84
83
|
|
|
85
84
|
|
|
@@ -89,3 +88,16 @@ def synchrotron() -> Synchrotron:
|
|
|
89
88
|
If this is called when already instantiated in i19-1, it will return the existing object.
|
|
90
89
|
"""
|
|
91
90
|
return Synchrotron()
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
# NOTE EH1 uses the Zebra 2 box. While a Zebra 1 box exists and is connected
|
|
94
|
+
# on the beamline, it is currently not in use
|
|
95
|
+
@device_factory()
|
|
96
|
+
def zebra() -> Zebra:
|
|
97
|
+
"""Get the i19-1 zebra device, instantiate it if it hasn't already been.
|
|
98
|
+
If this is called when already instantiated in i19-1, it will return the existing object.
|
|
99
|
+
"""
|
|
100
|
+
return Zebra(
|
|
101
|
+
mapping=I19_1_ZEBRA_MAPPING,
|
|
102
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-ZEBRA-02:",
|
|
103
|
+
)
|
dodal/beamlines/i19_2.py
CHANGED
|
@@ -12,6 +12,9 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
12
12
|
set_beamline as set_utils_beamline,
|
|
13
13
|
)
|
|
14
14
|
from dodal.common.visit import StaticVisitPathProvider
|
|
15
|
+
from dodal.devices.i19.access_controlled.attenuator_motor_squad import (
|
|
16
|
+
AttenuatorMotorSquad,
|
|
17
|
+
)
|
|
15
18
|
from dodal.devices.i19.access_controlled.blueapi_device import HutchState
|
|
16
19
|
from dodal.devices.i19.access_controlled.shutter import AccessControlledShutter
|
|
17
20
|
from dodal.devices.i19.backlight import BacklightPosition
|
|
@@ -43,6 +46,7 @@ set_path_provider(
|
|
|
43
46
|
)
|
|
44
47
|
)
|
|
45
48
|
|
|
49
|
+
I19_2_COMMISSIONING_INSTR_SESSION: str = "cm40639-5"
|
|
46
50
|
|
|
47
51
|
I19_2_ZEBRA_MAPPING = ZebraMapping(
|
|
48
52
|
outputs=ZebraTTLOutputs(),
|
|
@@ -51,8 +55,18 @@ I19_2_ZEBRA_MAPPING = ZebraMapping(
|
|
|
51
55
|
|
|
52
56
|
|
|
53
57
|
@device_factory()
|
|
54
|
-
def
|
|
55
|
-
return
|
|
58
|
+
def attenuator_motor_squad() -> AttenuatorMotorSquad:
|
|
59
|
+
return AttenuatorMotorSquad(
|
|
60
|
+
hutch=HutchState.EH2, instrument_session=I19_2_COMMISSIONING_INSTR_SESSION
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@device_factory()
|
|
65
|
+
def backlight() -> BacklightPosition:
|
|
66
|
+
"""Get the i19-2 backlight device, instantiate it if it hasn't already been.
|
|
67
|
+
If this is called when already instantiated in i19-2, it will return the existing object.
|
|
68
|
+
"""
|
|
69
|
+
return BacklightPosition(prefix=f"{PREFIX.beamline_prefix}-EA-IOC-12:")
|
|
56
70
|
|
|
57
71
|
|
|
58
72
|
@device_factory()
|
|
@@ -64,34 +78,26 @@ def beamstop() -> BeamStop:
|
|
|
64
78
|
|
|
65
79
|
|
|
66
80
|
@device_factory()
|
|
67
|
-
def
|
|
68
|
-
|
|
69
|
-
If this is called when already instantiated in i19-2, it will return the existing object.
|
|
70
|
-
"""
|
|
71
|
-
return Zebra(
|
|
72
|
-
mapping=I19_2_ZEBRA_MAPPING,
|
|
73
|
-
prefix=f"{PREFIX.beamline_prefix}-EA-ZEBRA-03:",
|
|
74
|
-
)
|
|
81
|
+
def diffractometer() -> FourCircleDiffractometer:
|
|
82
|
+
return FourCircleDiffractometer(prefix=PREFIX.beamline_prefix)
|
|
75
83
|
|
|
76
84
|
|
|
77
85
|
@device_factory()
|
|
78
|
-
def
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
hutch=HutchState.EH2,
|
|
85
|
-
instrument_session="cm40639-4",
|
|
86
|
+
def eiger() -> EigerDetector:
|
|
87
|
+
return EigerDetector(
|
|
88
|
+
prefix=PREFIX.beamline_prefix,
|
|
89
|
+
path_provider=get_path_provider(),
|
|
90
|
+
drv_suffix="-EA-EIGER-01:",
|
|
91
|
+
hdf_suffix="-EA-EIGER-01:OD:",
|
|
86
92
|
)
|
|
87
93
|
|
|
88
94
|
|
|
89
95
|
@device_factory()
|
|
90
|
-
def
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
def panda() -> HDFPanda:
|
|
97
|
+
return HDFPanda(
|
|
98
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-PANDA-01:",
|
|
99
|
+
path_provider=get_path_provider(),
|
|
100
|
+
)
|
|
95
101
|
|
|
96
102
|
|
|
97
103
|
@device_factory()
|
|
@@ -104,26 +110,31 @@ def pinhole_and_collimator() -> PinholeCollimatorControl:
|
|
|
104
110
|
|
|
105
111
|
|
|
106
112
|
@device_factory()
|
|
107
|
-
def
|
|
108
|
-
"""Get the i19-2
|
|
109
|
-
If this is called when already instantiated
|
|
113
|
+
def shutter() -> AccessControlledShutter:
|
|
114
|
+
"""Get the i19-2 hutch shutter device, instantiate it if it hasn't already been.
|
|
115
|
+
If this is called when already instantiated, it will return the existing object.
|
|
110
116
|
"""
|
|
111
|
-
return
|
|
117
|
+
return AccessControlledShutter(
|
|
118
|
+
prefix=f"{PREFIX.beamline_prefix}-PS-SHTR-01:",
|
|
119
|
+
hutch=HutchState.EH2,
|
|
120
|
+
instrument_session=I19_2_COMMISSIONING_INSTR_SESSION,
|
|
121
|
+
)
|
|
112
122
|
|
|
113
123
|
|
|
114
124
|
@device_factory()
|
|
115
|
-
def
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
)
|
|
125
|
+
def synchrotron() -> Synchrotron:
|
|
126
|
+
"""Get the i19-2 synchrotron device, instantiate it if it hasn't already been.
|
|
127
|
+
If this is called when already instantiated in i19-2, it will return the existing object.
|
|
128
|
+
"""
|
|
129
|
+
return Synchrotron()
|
|
120
130
|
|
|
121
131
|
|
|
122
132
|
@device_factory()
|
|
123
|
-
def
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
133
|
+
def zebra() -> Zebra:
|
|
134
|
+
"""Get the i19-2 zebra device, instantiate it if it hasn't already been.
|
|
135
|
+
If this is called when already instantiated in i19-2, it will return the existing object.
|
|
136
|
+
"""
|
|
137
|
+
return Zebra(
|
|
138
|
+
mapping=I19_2_ZEBRA_MAPPING,
|
|
139
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-ZEBRA-03:",
|
|
129
140
|
)
|
dodal/beamlines/i21.py
CHANGED
|
@@ -2,12 +2,12 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
2
2
|
device_factory,
|
|
3
3
|
)
|
|
4
4
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
5
|
-
from dodal.devices.
|
|
5
|
+
from dodal.devices.i21 import Grating
|
|
6
|
+
from dodal.devices.insertion_device.apple2_undulator import (
|
|
6
7
|
Apple2,
|
|
7
8
|
UndulatorGap,
|
|
8
9
|
UndulatorPhaseAxes,
|
|
9
10
|
)
|
|
10
|
-
from dodal.devices.i21 import Grating
|
|
11
11
|
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
12
12
|
from dodal.devices.synchrotron import Synchrotron
|
|
13
13
|
from dodal.log import set_beamline as set_log_beamline
|
dodal/beamlines/i22.py
CHANGED
|
@@ -19,11 +19,11 @@ from dodal.devices.i22.dcm import DCM
|
|
|
19
19
|
from dodal.devices.i22.fswitch import FSwitch
|
|
20
20
|
from dodal.devices.i22.nxsas import NXSasMetadataHolder, NXSasOAV, NXSasPilatus
|
|
21
21
|
from dodal.devices.linkam3 import Linkam3
|
|
22
|
-
from dodal.devices.motors import XYPitchStage
|
|
22
|
+
from dodal.devices.motors import XYPitchStage, XYRollStage, XYStage
|
|
23
23
|
from dodal.devices.slits import Slits
|
|
24
24
|
from dodal.devices.synchrotron import Synchrotron
|
|
25
25
|
from dodal.devices.tetramm import TetrammDetector
|
|
26
|
-
from dodal.devices.undulator import
|
|
26
|
+
from dodal.devices.undulator import UndulatorInKeV
|
|
27
27
|
from dodal.devices.watsonmarlow323_pump import WatsonMarlow323Pump
|
|
28
28
|
from dodal.log import set_beamline as set_log_beamline
|
|
29
29
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -160,8 +160,8 @@ def dcm() -> DCM:
|
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
@device_factory()
|
|
163
|
-
def undulator() ->
|
|
164
|
-
return
|
|
163
|
+
def undulator() -> UndulatorInKeV:
|
|
164
|
+
return UndulatorInKeV(
|
|
165
165
|
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
|
|
166
166
|
id_gap_lookup_table_path="/dls_sw/i22/software/daq_configuration/lookup/BeamLine_Undulator_toGap.txt",
|
|
167
167
|
poles=80,
|
|
@@ -274,3 +274,18 @@ def ppump() -> WatsonMarlow323Pump:
|
|
|
274
274
|
@device_factory()
|
|
275
275
|
def base() -> XYPitchStage:
|
|
276
276
|
return XYPitchStage(f"{PREFIX.beamline_prefix}-MO-STABL-01:")
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
@device_factory()
|
|
280
|
+
def bs1() -> XYStage:
|
|
281
|
+
return XYStage(f"{PREFIX.beamline_prefix}-MO-SAXSP-01:BS1:")
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
@device_factory()
|
|
285
|
+
def bs2() -> XYStage:
|
|
286
|
+
return XYStage(f"{PREFIX.beamline_prefix}-MO-SAXSP-01:BS2:")
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
@device_factory()
|
|
290
|
+
def bs3() -> XYRollStage:
|
|
291
|
+
return XYRollStage(f"{PREFIX.beamline_prefix}-MO-SAXSP-01:BS3:")
|
dodal/beamlines/p38.py
CHANGED
|
@@ -22,7 +22,7 @@ from dodal.devices.linkam3 import Linkam3
|
|
|
22
22
|
from dodal.devices.pressure_jump_cell import PressureJumpCell
|
|
23
23
|
from dodal.devices.slits import Slits
|
|
24
24
|
from dodal.devices.tetramm import TetrammDetector
|
|
25
|
-
from dodal.devices.undulator import
|
|
25
|
+
from dodal.devices.undulator import UndulatorInKeV
|
|
26
26
|
from dodal.devices.watsonmarlow323_pump import WatsonMarlow323Pump
|
|
27
27
|
from dodal.log import set_beamline as set_log_beamline
|
|
28
28
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -157,8 +157,8 @@ def dcm() -> DCM:
|
|
|
157
157
|
|
|
158
158
|
|
|
159
159
|
@device_factory(mock=True)
|
|
160
|
-
def undulator() ->
|
|
161
|
-
return
|
|
160
|
+
def undulator() -> UndulatorInKeV:
|
|
161
|
+
return UndulatorInKeV(
|
|
162
162
|
f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
|
|
163
163
|
poles=80,
|
|
164
164
|
length=2.0,
|