dls-dodal 1.64.0__py3-none-any.whl → 1.66.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.64.0.dist-info → dls_dodal-1.66.0.dist-info}/METADATA +3 -4
- {dls_dodal-1.64.0.dist-info → dls_dodal-1.66.0.dist-info}/RECORD +72 -66
- dodal/_version.py +2 -2
- dodal/beamline_specific_utils/i05_shared.py +6 -3
- dodal/beamlines/aithre.py +21 -2
- dodal/beamlines/b01_1.py +1 -1
- dodal/beamlines/b07.py +6 -3
- dodal/beamlines/b07_1.py +6 -3
- dodal/beamlines/i03.py +32 -4
- dodal/beamlines/i04.py +18 -3
- dodal/beamlines/i05.py +30 -3
- dodal/beamlines/i05_1.py +2 -2
- dodal/beamlines/i06.py +62 -0
- dodal/beamlines/i07.py +20 -0
- dodal/beamlines/i09.py +3 -3
- dodal/beamlines/i09_1.py +12 -1
- dodal/beamlines/i09_2.py +6 -3
- dodal/beamlines/i10_optics.py +21 -11
- dodal/beamlines/i17.py +3 -3
- dodal/beamlines/i18.py +3 -3
- dodal/beamlines/i19_2.py +22 -0
- dodal/beamlines/i21.py +3 -3
- dodal/beamlines/i22.py +3 -20
- dodal/beamlines/k07.py +6 -3
- dodal/beamlines/p38.py +3 -3
- dodal/devices/aithre_lasershaping/goniometer.py +26 -9
- dodal/devices/aperturescatterguard.py +3 -2
- dodal/devices/apple2_undulator.py +89 -44
- 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 +21 -0
- dodal/devices/detector/det_resolution.py +4 -2
- 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/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 +6 -2
- dodal/devices/i09_1_shared/hard_undulator_functions.py +85 -21
- dodal/devices/i10/i10_apple2.py +22 -316
- dodal/devices/i17/i17_apple2.py +7 -4
- dodal/devices/i22/nxsas.py +5 -24
- dodal/devices/ipin.py +20 -2
- dodal/devices/motors.py +19 -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/pgm.py +1 -1
- dodal/devices/robot.py +17 -7
- dodal/devices/scintillator.py +40 -14
- dodal/devices/smargon.py +2 -3
- dodal/devices/thawer.py +7 -45
- dodal/devices/undulator.py +178 -66
- dodal/devices/util/lookup_tables_apple2.py +390 -0
- dodal/plan_stubs/__init__.py +3 -0
- dodal/plans/load_panda_yaml.py +9 -0
- dodal/plans/verify_undulator_gap.py +2 -2
- dodal/testing/fixtures/run_engine.py +79 -7
- dodal/beamline_specific_utils/i03.py +0 -17
- dodal/testing/__init__.py +0 -3
- dodal/testing/setup.py +0 -67
- {dls_dodal-1.64.0.dist-info → dls_dodal-1.66.0.dist-info}/WHEEL +0 -0
- {dls_dodal-1.64.0.dist-info → dls_dodal-1.66.0.dist-info}/entry_points.txt +0 -0
- {dls_dodal-1.64.0.dist-info → dls_dodal-1.66.0.dist-info}/licenses/LICENSE +0 -0
- {dls_dodal-1.64.0.dist-info → dls_dodal-1.66.0.dist-info}/top_level.txt +0 -0
dodal/beamlines/i05.py
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
from dodal.beamline_specific_utils.i05_shared import pgm as i05_pgm
|
|
2
|
-
from dodal.common.beamlines.beamline_utils import
|
|
2
|
+
from dodal.common.beamlines.beamline_utils import (
|
|
3
|
+
device_factory,
|
|
4
|
+
)
|
|
3
5
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
4
|
-
from dodal.devices.
|
|
6
|
+
from dodal.devices.apple2_undulator import (
|
|
7
|
+
Apple2,
|
|
8
|
+
UndulatorGap,
|
|
9
|
+
UndulatorLockedPhaseAxes,
|
|
10
|
+
)
|
|
11
|
+
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
5
12
|
from dodal.devices.synchrotron import Synchrotron
|
|
6
13
|
from dodal.log import set_beamline as set_log_beamline
|
|
7
14
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -18,5 +25,25 @@ def synchrotron() -> Synchrotron:
|
|
|
18
25
|
|
|
19
26
|
|
|
20
27
|
@device_factory()
|
|
21
|
-
def pgm() ->
|
|
28
|
+
def pgm() -> PlaneGratingMonochromator:
|
|
22
29
|
return i05_pgm()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@device_factory()
|
|
33
|
+
def id_gap() -> UndulatorGap:
|
|
34
|
+
return UndulatorGap(prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:")
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@device_factory()
|
|
38
|
+
def id_phase() -> UndulatorLockedPhaseAxes:
|
|
39
|
+
return UndulatorLockedPhaseAxes(
|
|
40
|
+
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
|
|
41
|
+
top_outer="PL",
|
|
42
|
+
btm_inner="PU",
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@device_factory()
|
|
47
|
+
def id() -> Apple2:
|
|
48
|
+
"""i05 insertion device."""
|
|
49
|
+
return Apple2(id_gap=id_gap(), id_phase=id_phase())
|
dodal/beamlines/i05_1.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from dodal.beamline_specific_utils.i05_shared import pgm as i05_pgm
|
|
2
2
|
from dodal.common.beamlines.beamline_utils import device_factory
|
|
3
3
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
4
|
-
from dodal.devices.pgm import
|
|
4
|
+
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
5
5
|
from dodal.devices.synchrotron import Synchrotron
|
|
6
6
|
from dodal.log import set_beamline as set_log_beamline
|
|
7
7
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -13,7 +13,7 @@ set_utils_beamline(BL)
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
@device_factory()
|
|
16
|
-
def pgm() ->
|
|
16
|
+
def pgm() -> PlaneGratingMonochromator:
|
|
17
17
|
return i05_pgm()
|
|
18
18
|
|
|
19
19
|
|
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.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.py
CHANGED
|
@@ -10,7 +10,7 @@ from dodal.devices.common_dcm import (
|
|
|
10
10
|
from dodal.devices.electron_analyser import DualEnergySource
|
|
11
11
|
from dodal.devices.electron_analyser.vgscienta import VGScientaDetector
|
|
12
12
|
from dodal.devices.i09 import Grating, LensMode, PassEnergy, PsuMode
|
|
13
|
-
from dodal.devices.pgm import
|
|
13
|
+
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
14
14
|
from dodal.devices.synchrotron import Synchrotron
|
|
15
15
|
from dodal.log import set_beamline as set_log_beamline
|
|
16
16
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -27,8 +27,8 @@ def synchrotron() -> Synchrotron:
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
@device_factory()
|
|
30
|
-
def pgm() ->
|
|
31
|
-
return
|
|
30
|
+
def pgm() -> PlaneGratingMonochromator:
|
|
31
|
+
return PlaneGratingMonochromator(
|
|
32
32
|
prefix=f"{BeamlinePrefix(BL, suffix='J').beamline_prefix}-MO-PGM-01:",
|
|
33
33
|
grating=Grating,
|
|
34
34
|
)
|
dodal/beamlines/i09_1.py
CHANGED
|
@@ -11,6 +11,7 @@ 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
13
|
from dodal.devices.synchrotron import Synchrotron
|
|
14
|
+
from dodal.devices.undulator import UndulatorInMm, UndulatorOrder
|
|
14
15
|
from dodal.log import set_beamline as set_log_beamline
|
|
15
16
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
16
17
|
|
|
@@ -39,7 +40,7 @@ def energy_source() -> EnergySource:
|
|
|
39
40
|
|
|
40
41
|
# Connect will work again after this work completed
|
|
41
42
|
# https://jira.diamond.ac.uk/browse/I09-651
|
|
42
|
-
@device_factory()
|
|
43
|
+
@device_factory(skip=True)
|
|
43
44
|
def analyser() -> SpecsDetector[LensMode, PsuMode]:
|
|
44
45
|
return SpecsDetector[LensMode, PsuMode](
|
|
45
46
|
prefix=f"{PREFIX.beamline_prefix}-EA-DET-02:CAM:",
|
|
@@ -47,3 +48,13 @@ def analyser() -> SpecsDetector[LensMode, PsuMode]:
|
|
|
47
48
|
psu_mode_type=PsuMode,
|
|
48
49
|
energy_source=energy_source(),
|
|
49
50
|
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@device_factory()
|
|
54
|
+
def undulator() -> UndulatorInMm:
|
|
55
|
+
return UndulatorInMm(prefix=f"{PREFIX.beamline_prefix}-MO-UND-01:")
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@device_factory()
|
|
59
|
+
def harmonics() -> UndulatorOrder:
|
|
60
|
+
return UndulatorOrder(name="harmonics")
|
dodal/beamlines/i09_2.py
CHANGED
|
@@ -8,7 +8,7 @@ from dodal.devices.apple2_undulator import (
|
|
|
8
8
|
UndulatorPhaseAxes,
|
|
9
9
|
)
|
|
10
10
|
from dodal.devices.i09.enums import Grating
|
|
11
|
-
from dodal.devices.pgm import
|
|
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
|
|
14
14
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -25,8 +25,11 @@ def synchrotron() -> Synchrotron:
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
@device_factory()
|
|
28
|
-
def pgm() ->
|
|
29
|
-
return
|
|
28
|
+
def pgm() -> PlaneGratingMonochromator:
|
|
29
|
+
return PlaneGratingMonochromator(
|
|
30
|
+
prefix=f"{PREFIX.beamline_prefix}-MO-PGM-01:",
|
|
31
|
+
grating=Grating,
|
|
32
|
+
)
|
|
30
33
|
|
|
31
34
|
|
|
32
35
|
@device_factory()
|
dodal/beamlines/i10_optics.py
CHANGED
|
@@ -6,6 +6,8 @@ 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
|
|
@@ -32,8 +34,14 @@ from dodal.devices.i10.i10_apple2 import (
|
|
|
32
34
|
|
|
33
35
|
# Imports taken from i10 while we work out how to deal with split end stations
|
|
34
36
|
from dodal.devices.i10.i10_setting_data import I10Grating
|
|
35
|
-
from dodal.devices.pgm import
|
|
37
|
+
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
36
38
|
from dodal.devices.synchrotron import Synchrotron
|
|
39
|
+
from dodal.devices.util.lookup_tables_apple2 import (
|
|
40
|
+
DEFAULT_GAP_FILE,
|
|
41
|
+
DEFAULT_PHASE_FILE,
|
|
42
|
+
EnergyMotorLookup,
|
|
43
|
+
LookupTableConfig,
|
|
44
|
+
)
|
|
37
45
|
from dodal.log import set_beamline as set_log_beamline
|
|
38
46
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
39
47
|
|
|
@@ -59,9 +67,9 @@ def first_mirror() -> PiezoMirror:
|
|
|
59
67
|
|
|
60
68
|
|
|
61
69
|
@device_factory()
|
|
62
|
-
def pgm() ->
|
|
70
|
+
def pgm() -> PlaneGratingMonochromator:
|
|
63
71
|
"I10 Plane Grating Monochromator, it can change energy via pgm.energy.set(<energy>)"
|
|
64
|
-
return
|
|
72
|
+
return PlaneGratingMonochromator(
|
|
65
73
|
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
|
|
66
74
|
grating=I10Grating,
|
|
67
75
|
grating_pv="NLINES2",
|
|
@@ -115,12 +123,13 @@ def idd() -> I10Apple2:
|
|
|
115
123
|
@device_factory()
|
|
116
124
|
def idd_controller() -> I10Apple2Controller:
|
|
117
125
|
"""I10 downstream insertion device controller."""
|
|
118
|
-
|
|
119
|
-
apple2=idd(),
|
|
120
|
-
lookuptable_dir=LOOK_UPTABLE_DIR,
|
|
121
|
-
source=("Source", "idd"),
|
|
126
|
+
idd_energy_motor_lut = EnergyMotorLookup(
|
|
122
127
|
config_client=I10_CONF_CLIENT,
|
|
128
|
+
lut_config=LookupTableConfig(source=("Source", "idd")),
|
|
129
|
+
gap_path=Path(LOOK_UPTABLE_DIR, DEFAULT_GAP_FILE),
|
|
130
|
+
phase_path=Path(LOOK_UPTABLE_DIR, DEFAULT_PHASE_FILE),
|
|
123
131
|
)
|
|
132
|
+
return I10Apple2Controller(apple2=idd(), energy_motor_lut=idd_energy_motor_lut)
|
|
124
133
|
|
|
125
134
|
|
|
126
135
|
@device_factory()
|
|
@@ -179,12 +188,13 @@ def idu() -> I10Apple2:
|
|
|
179
188
|
@device_factory()
|
|
180
189
|
def idu_controller() -> I10Apple2Controller:
|
|
181
190
|
"""I10 upstream insertion device controller."""
|
|
182
|
-
|
|
183
|
-
apple2=idu(),
|
|
184
|
-
lookuptable_dir=LOOK_UPTABLE_DIR,
|
|
185
|
-
source=("Source", "idu"),
|
|
191
|
+
idu_energy_motor_lut = EnergyMotorLookup(
|
|
186
192
|
config_client=I10_CONF_CLIENT,
|
|
193
|
+
lut_config=LookupTableConfig(source=("Source", "idu")),
|
|
194
|
+
gap_path=Path(LOOK_UPTABLE_DIR, DEFAULT_GAP_FILE),
|
|
195
|
+
phase_path=Path(LOOK_UPTABLE_DIR, DEFAULT_PHASE_FILE),
|
|
187
196
|
)
|
|
197
|
+
return I10Apple2Controller(apple2=idd(), energy_motor_lut=idu_energy_motor_lut)
|
|
188
198
|
|
|
189
199
|
|
|
190
200
|
@device_factory()
|
dodal/beamlines/i17.py
CHANGED
|
@@ -17,7 +17,7 @@ from dodal.devices.apple2_undulator import (
|
|
|
17
17
|
UndulatorPhaseAxes,
|
|
18
18
|
)
|
|
19
19
|
from dodal.devices.i17.i17_apple2 import I17Apple2Controller
|
|
20
|
-
from dodal.devices.pgm import
|
|
20
|
+
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
21
21
|
from dodal.devices.synchrotron import Synchrotron
|
|
22
22
|
from dodal.log import set_beamline as set_log_beamline
|
|
23
23
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -39,8 +39,8 @@ def synchrotron() -> Synchrotron:
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
@device_factory(skip=True)
|
|
42
|
-
def pgm() ->
|
|
43
|
-
return
|
|
42
|
+
def pgm() -> PlaneGratingMonochromator:
|
|
43
|
+
return PlaneGratingMonochromator(
|
|
44
44
|
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
|
|
45
45
|
grating=I17Grating,
|
|
46
46
|
grating_pv="NLINES2",
|
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_2.py
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from ophyd_async.fastcs.eiger import EigerDetector
|
|
1
4
|
from ophyd_async.fastcs.panda import HDFPanda
|
|
2
5
|
|
|
3
6
|
from dodal.common.beamlines.beamline_utils import (
|
|
4
7
|
device_factory,
|
|
5
8
|
get_path_provider,
|
|
9
|
+
set_path_provider,
|
|
6
10
|
)
|
|
7
11
|
from dodal.common.beamlines.beamline_utils import (
|
|
8
12
|
set_beamline as set_utils_beamline,
|
|
9
13
|
)
|
|
14
|
+
from dodal.common.visit import StaticVisitPathProvider
|
|
10
15
|
from dodal.devices.i19.access_controlled.blueapi_device import HutchState
|
|
11
16
|
from dodal.devices.i19.access_controlled.shutter import AccessControlledShutter
|
|
12
17
|
from dodal.devices.i19.backlight import BacklightPosition
|
|
@@ -31,6 +36,13 @@ PREFIX = BeamlinePrefix("i19", "I")
|
|
|
31
36
|
set_log_beamline(BL)
|
|
32
37
|
set_utils_beamline(BL)
|
|
33
38
|
|
|
39
|
+
set_path_provider(
|
|
40
|
+
StaticVisitPathProvider(
|
|
41
|
+
BL,
|
|
42
|
+
Path("/dls/i19-2/data/2025/cm40639-4/"),
|
|
43
|
+
)
|
|
44
|
+
)
|
|
45
|
+
|
|
34
46
|
|
|
35
47
|
I19_2_ZEBRA_MAPPING = ZebraMapping(
|
|
36
48
|
outputs=ZebraTTLOutputs(),
|
|
@@ -105,3 +117,13 @@ def panda() -> HDFPanda:
|
|
|
105
117
|
prefix=f"{PREFIX.beamline_prefix}-EA-PANDA-01:",
|
|
106
118
|
path_provider=get_path_provider(),
|
|
107
119
|
)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
@device_factory()
|
|
123
|
+
def eiger() -> EigerDetector:
|
|
124
|
+
return EigerDetector(
|
|
125
|
+
prefix=PREFIX.beamline_prefix,
|
|
126
|
+
path_provider=get_path_provider(),
|
|
127
|
+
drv_suffix="-EA-EIGER-01:",
|
|
128
|
+
hdf_suffix="-EA-EIGER-01:OD:",
|
|
129
|
+
)
|
dodal/beamlines/i21.py
CHANGED
|
@@ -8,7 +8,7 @@ from dodal.devices.apple2_undulator import (
|
|
|
8
8
|
UndulatorPhaseAxes,
|
|
9
9
|
)
|
|
10
10
|
from dodal.devices.i21 import Grating
|
|
11
|
-
from dodal.devices.pgm import
|
|
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
|
|
14
14
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -25,8 +25,8 @@ def synchrotron() -> Synchrotron:
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
@device_factory()
|
|
28
|
-
def pgm() ->
|
|
29
|
-
return
|
|
28
|
+
def pgm() -> PlaneGratingMonochromator:
|
|
29
|
+
return PlaneGratingMonochromator(
|
|
30
30
|
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
|
|
31
31
|
grating=Grating,
|
|
32
32
|
)
|
dodal/beamlines/i22.py
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
1
|
from ophyd_async.epics.adaravis import AravisDetector
|
|
4
2
|
from ophyd_async.epics.adcore import NDPluginBaseIO, NDPluginStatsIO
|
|
5
3
|
from ophyd_async.epics.adpilatus import PilatusDetector
|
|
@@ -8,7 +6,6 @@ from ophyd_async.fastcs.panda import HDFPanda
|
|
|
8
6
|
from dodal.common.beamlines.beamline_utils import (
|
|
9
7
|
device_factory,
|
|
10
8
|
get_path_provider,
|
|
11
|
-
set_path_provider,
|
|
12
9
|
)
|
|
13
10
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
14
11
|
from dodal.common.beamlines.device_helpers import CAM_SUFFIX, DET_SUFFIX, HDF5_SUFFIX
|
|
@@ -16,7 +13,6 @@ from dodal.common.crystal_metadata import (
|
|
|
16
13
|
MaterialsEnum,
|
|
17
14
|
make_crystal_metadata_from_material,
|
|
18
15
|
)
|
|
19
|
-
from dodal.common.visit import RemoteDirectoryServiceClient, StaticVisitPathProvider
|
|
20
16
|
from dodal.devices.bimorph_mirror import BimorphMirror
|
|
21
17
|
from dodal.devices.focusing_mirror import FocusingMirror
|
|
22
18
|
from dodal.devices.i22.dcm import DCM
|
|
@@ -27,7 +23,7 @@ from dodal.devices.motors import XYPitchStage
|
|
|
27
23
|
from dodal.devices.slits import Slits
|
|
28
24
|
from dodal.devices.synchrotron import Synchrotron
|
|
29
25
|
from dodal.devices.tetramm import TetrammDetector
|
|
30
|
-
from dodal.devices.undulator import
|
|
26
|
+
from dodal.devices.undulator import UndulatorInKeV
|
|
31
27
|
from dodal.devices.watsonmarlow323_pump import WatsonMarlow323Pump
|
|
32
28
|
from dodal.log import set_beamline as set_log_beamline
|
|
33
29
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -37,19 +33,6 @@ PREFIX = BeamlinePrefix(BL)
|
|
|
37
33
|
set_log_beamline(BL)
|
|
38
34
|
set_utils_beamline(BL)
|
|
39
35
|
|
|
40
|
-
# Currently we must hard-code the visit, determining the visit at runtime requires
|
|
41
|
-
# infrastructure that is still WIP.
|
|
42
|
-
# Communication with GDA is also WIP so for now we determine an arbitrary scan number
|
|
43
|
-
# locally and write the commissioning directory. The scan number is not guaranteed to
|
|
44
|
-
# be unique and the data is at risk - this configuration is for testing only.
|
|
45
|
-
set_path_provider(
|
|
46
|
-
StaticVisitPathProvider(
|
|
47
|
-
BL,
|
|
48
|
-
Path("/dls/i22/data/2025/cm40643-4/"),
|
|
49
|
-
client=RemoteDirectoryServiceClient("http://i22-control:8088/api"),
|
|
50
|
-
)
|
|
51
|
-
)
|
|
52
|
-
|
|
53
36
|
|
|
54
37
|
@device_factory()
|
|
55
38
|
def saxs() -> PilatusDetector:
|
|
@@ -177,8 +160,8 @@ def dcm() -> DCM:
|
|
|
177
160
|
|
|
178
161
|
|
|
179
162
|
@device_factory()
|
|
180
|
-
def undulator() ->
|
|
181
|
-
return
|
|
163
|
+
def undulator() -> UndulatorInKeV:
|
|
164
|
+
return UndulatorInKeV(
|
|
182
165
|
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
|
|
183
166
|
id_gap_lookup_table_path="/dls_sw/i22/software/daq_configuration/lookup/BeamLine_Undulator_toGap.txt",
|
|
184
167
|
poles=80,
|
dodal/beamlines/k07.py
CHANGED
|
@@ -4,7 +4,7 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
4
4
|
device_factory,
|
|
5
5
|
)
|
|
6
6
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
7
|
-
from dodal.devices.pgm import
|
|
7
|
+
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
8
8
|
from dodal.devices.synchrotron import Synchrotron
|
|
9
9
|
from dodal.log import set_beamline as set_log_beamline
|
|
10
10
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -27,5 +27,8 @@ class Grating(StrictEnum):
|
|
|
27
27
|
|
|
28
28
|
# Grating does not exist yet - this class is a placeholder for when it does
|
|
29
29
|
@device_factory(skip=True)
|
|
30
|
-
def pgm() ->
|
|
31
|
-
return
|
|
30
|
+
def pgm() -> PlaneGratingMonochromator:
|
|
31
|
+
return PlaneGratingMonochromator(
|
|
32
|
+
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
|
|
33
|
+
grating=Grating,
|
|
34
|
+
)
|
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,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from ophyd_async.epics.motor import Motor
|
|
2
2
|
|
|
3
|
-
from dodal.devices.motors import
|
|
3
|
+
from dodal.devices.motors import XYZOmegaStage, create_axis_perp_to_rotation
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class Goniometer(
|
|
6
|
+
class Goniometer(XYZOmegaStage):
|
|
7
7
|
"""The Aithre lab goniometer and the XYZ stage it sits on.
|
|
8
8
|
|
|
9
9
|
`x`, `y` and `z` control the axes of the positioner at the base, while `sampy` and
|
|
@@ -15,11 +15,28 @@ class Goniometer(XYZStage):
|
|
|
15
15
|
regardless of the current rotation.
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
|
-
def __init__(
|
|
19
|
-
self
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
def __init__(
|
|
19
|
+
self,
|
|
20
|
+
prefix: str,
|
|
21
|
+
name: str = "",
|
|
22
|
+
x_infix: str = "X",
|
|
23
|
+
y_infix: str = "Y",
|
|
24
|
+
z_infix: str = "Z",
|
|
25
|
+
omega_infix: str = "OMEGA",
|
|
26
|
+
sampy_infix: str = "SAMPY",
|
|
27
|
+
sampz_infix: str = "SAMPZ",
|
|
28
|
+
) -> None:
|
|
29
|
+
super().__init__(
|
|
30
|
+
prefix=prefix,
|
|
31
|
+
name=name,
|
|
32
|
+
x_infix=x_infix,
|
|
33
|
+
y_infix=y_infix,
|
|
34
|
+
z_infix=z_infix,
|
|
35
|
+
omega_infix=omega_infix,
|
|
24
36
|
)
|
|
25
|
-
|
|
37
|
+
with self.add_children_as_readables():
|
|
38
|
+
self.sampy = Motor(prefix + sampy_infix)
|
|
39
|
+
self.sampz = Motor(prefix + sampz_infix)
|
|
40
|
+
self.vertical_position = create_axis_perp_to_rotation(
|
|
41
|
+
self.omega, self.sampz, self.sampy
|
|
42
|
+
)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import asyncio
|
|
4
|
+
from math import inf
|
|
4
5
|
|
|
5
6
|
from bluesky.protocols import Preparable
|
|
6
7
|
from ophyd_async.core import (
|
|
@@ -112,7 +113,7 @@ def load_positions_from_beamline_parameters(
|
|
|
112
113
|
) -> dict[ApertureValue, AperturePosition]:
|
|
113
114
|
return {
|
|
114
115
|
ApertureValue.OUT_OF_BEAM: AperturePosition.from_gda_params(
|
|
115
|
-
_GDAParamApertureValue.ROBOT_LOAD,
|
|
116
|
+
_GDAParamApertureValue.ROBOT_LOAD, inf, params
|
|
116
117
|
),
|
|
117
118
|
ApertureValue.SMALL: AperturePosition.from_gda_params(
|
|
118
119
|
_GDAParamApertureValue.SMALL, 20, params
|
|
@@ -124,7 +125,7 @@ def load_positions_from_beamline_parameters(
|
|
|
124
125
|
_GDAParamApertureValue.LARGE, 100, params
|
|
125
126
|
),
|
|
126
127
|
ApertureValue.PARKED: AperturePosition.from_gda_params(
|
|
127
|
-
_GDAParamApertureValue.MANUAL_LOAD,
|
|
128
|
+
_GDAParamApertureValue.MANUAL_LOAD, inf, params
|
|
128
129
|
),
|
|
129
130
|
}
|
|
130
131
|
|