dls-dodal 1.49.0__py3-none-any.whl → 1.51.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.49.0.dist-info → dls_dodal-1.51.0.dist-info}/METADATA +3 -4
- {dls_dodal-1.49.0.dist-info → dls_dodal-1.51.0.dist-info}/RECORD +65 -60
- dodal/_version.py +2 -2
- dodal/beamlines/adsim.py +5 -3
- dodal/beamlines/b01_1.py +41 -5
- dodal/beamlines/b07.py +11 -1
- dodal/beamlines/b07_1.py +11 -1
- dodal/beamlines/b16.py +8 -4
- dodal/beamlines/b21.py +148 -0
- dodal/beamlines/i03.py +6 -11
- dodal/beamlines/i04.py +5 -5
- dodal/beamlines/i09.py +22 -1
- dodal/beamlines/i09_1.py +9 -1
- 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 +7 -1
- dodal/beamlines/i24.py +3 -3
- dodal/beamlines/p45.py +4 -3
- dodal/beamlines/p60.py +18 -1
- dodal/beamlines/p99.py +5 -5
- dodal/beamlines/training_rig.py +3 -3
- dodal/common/beamlines/beamline_utils.py +5 -2
- dodal/devices/aithre_lasershaping/goniometer.py +4 -5
- dodal/devices/aperture.py +4 -7
- dodal/devices/aperturescatterguard.py +2 -2
- dodal/devices/b07/__init__.py +3 -0
- dodal/devices/b07/grating.py +9 -0
- dodal/devices/b07_1/__init__.py +3 -0
- dodal/devices/b07_1/grating.py +10 -0
- dodal/devices/detector/detector_motion.py +19 -17
- dodal/devices/electron_analyser/abstract/base_driver_io.py +24 -25
- dodal/devices/electron_analyser/detector.py +3 -13
- dodal/devices/electron_analyser/specs/detector.py +9 -3
- dodal/devices/electron_analyser/specs/driver_io.py +5 -2
- dodal/devices/electron_analyser/vgscienta/detector.py +9 -3
- dodal/devices/electron_analyser/vgscienta/driver_io.py +5 -6
- dodal/devices/electron_analyser/vgscienta/region.py +0 -1
- dodal/devices/fast_grid_scan.py +1 -2
- dodal/devices/hutch_shutter.py +6 -6
- dodal/devices/i04/constants.py +1 -1
- dodal/devices/i09/__init__.py +4 -0
- dodal/devices/i09/dcm.py +26 -0
- dodal/devices/i09/grating.py +7 -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/motors.py +92 -35
- dodal/devices/p45.py +0 -12
- dodal/devices/p60/__init__.py +3 -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/zocalo/zocalo_results.py +27 -78
- dodal/plans/bimorph.py +333 -0
- 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.49.0.dist-info → dls_dodal-1.51.0.dist-info}/WHEEL +0 -0
- {dls_dodal-1.49.0.dist-info → dls_dodal-1.51.0.dist-info}/entry_points.txt +0 -0
- {dls_dodal-1.49.0.dist-info → dls_dodal-1.51.0.dist-info}/licenses/LICENSE +0 -0
- {dls_dodal-1.49.0.dist-info → dls_dodal-1.51.0.dist-info}/top_level.txt +0 -0
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
|
|
@@ -368,10 +368,7 @@ def zocalo() -> ZocaloResults:
|
|
|
368
368
|
"""Get the i03 ZocaloResults device, instantiate it if it hasn't already been.
|
|
369
369
|
If this is called when already instantiated in i03, it will return the existing object.
|
|
370
370
|
"""
|
|
371
|
-
return ZocaloResults(
|
|
372
|
-
name="zocalo",
|
|
373
|
-
prefix=PREFIX.beamline_prefix,
|
|
374
|
-
)
|
|
371
|
+
return ZocaloResults(name="zocalo", prefix=PREFIX.beamline_prefix, use_gpu=True)
|
|
375
372
|
|
|
376
373
|
|
|
377
374
|
@device_factory()
|
|
@@ -409,11 +406,11 @@ def thawer() -> Thawer:
|
|
|
409
406
|
|
|
410
407
|
|
|
411
408
|
@device_factory()
|
|
412
|
-
def lower_gonio() ->
|
|
409
|
+
def lower_gonio() -> XYZStage:
|
|
413
410
|
"""Get the i03 lower gonio device, instantiate it if it hasn't already been.
|
|
414
411
|
If this is called when already instantiated in i03, it will return the existing object.
|
|
415
412
|
"""
|
|
416
|
-
return
|
|
413
|
+
return XYZStage(
|
|
417
414
|
f"{PREFIX.beamline_prefix}-MO-GONP-01:",
|
|
418
415
|
"lower_gonio",
|
|
419
416
|
)
|
|
@@ -451,11 +448,9 @@ def qbpm() -> QBPM:
|
|
|
451
448
|
)
|
|
452
449
|
|
|
453
450
|
|
|
454
|
-
@device_factory(
|
|
455
|
-
skip=True
|
|
456
|
-
) # Skipping as not yet on the beamline, see https://jira.diamond.ac.uk/browse/I03-894
|
|
451
|
+
@device_factory()
|
|
457
452
|
def baton() -> Baton:
|
|
458
453
|
"""Get the i03 baton device, instantiate it if it hasn't already been.
|
|
459
454
|
If this is called when already instantiated in i03, it will return the existing object.
|
|
460
455
|
"""
|
|
461
|
-
return Baton(f"{PREFIX.beamline_prefix}:")
|
|
456
|
+
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
|
)
|
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, I09Grating
|
|
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
|
|
@@ -18,6 +20,25 @@ def synchrotron() -> Synchrotron:
|
|
|
18
20
|
return Synchrotron()
|
|
19
21
|
|
|
20
22
|
|
|
23
|
+
@device_factory()
|
|
24
|
+
def pgm() -> PGM:
|
|
25
|
+
return PGM(
|
|
26
|
+
prefix=f"{BeamlinePrefix(BL, suffix='J').beamline_prefix}-MO-PGM-01:",
|
|
27
|
+
grating=I09Grating,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@device_factory()
|
|
32
|
+
def dcm() -> DCM:
|
|
33
|
+
return DCM(prefix=f"{PREFIX.beamline_prefix}-MO-DCM-01:")
|
|
34
|
+
|
|
35
|
+
|
|
21
36
|
@device_factory()
|
|
22
37
|
def analyser_driver() -> VGScientaAnalyserDriverIO:
|
|
23
|
-
|
|
38
|
+
energy_sources = {
|
|
39
|
+
"source1": pgm().energy.user_readback,
|
|
40
|
+
"source2": dcm().energy_in_ev,
|
|
41
|
+
}
|
|
42
|
+
return VGScientaAnalyserDriverIO(
|
|
43
|
+
f"{PREFIX.beamline_prefix}-EA-DET-01:CAM:", energy_sources
|
|
44
|
+
)
|
dodal/beamlines/i09_1.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.specs import SpecsAnalyserDriverIO
|
|
6
|
+
from dodal.devices.i09.dcm import DCM
|
|
6
7
|
from dodal.devices.synchrotron import Synchrotron
|
|
7
8
|
from dodal.log import set_beamline as set_log_beamline
|
|
8
9
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -18,6 +19,13 @@ def synchrotron() -> Synchrotron:
|
|
|
18
19
|
return Synchrotron()
|
|
19
20
|
|
|
20
21
|
|
|
22
|
+
@device_factory()
|
|
23
|
+
def dcm() -> DCM:
|
|
24
|
+
return DCM(prefix=f"{PREFIX.beamline_prefix}-MO-DCM-01:")
|
|
25
|
+
|
|
26
|
+
|
|
21
27
|
@device_factory()
|
|
22
28
|
def analyser_driver() -> SpecsAnalyserDriverIO:
|
|
23
|
-
return SpecsAnalyserDriverIO(
|
|
29
|
+
return SpecsAnalyserDriverIO(
|
|
30
|
+
f"{PREFIX.beamline_prefix}-EA-DET-02:CAM:", {"source1": dcm().energy_in_ev}
|
|
31
|
+
)
|
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.grating import I09Grating
|
|
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=I09Grating)
|
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
|
@@ -22,6 +22,7 @@ from dodal.devices.i22.dcm import DCM
|
|
|
22
22
|
from dodal.devices.i22.fswitch import FSwitch
|
|
23
23
|
from dodal.devices.i22.nxsas import NXSasMetadataHolder, NXSasOAV, NXSasPilatus
|
|
24
24
|
from dodal.devices.linkam3 import Linkam3
|
|
25
|
+
from dodal.devices.motors import XYPitchStage
|
|
25
26
|
from dodal.devices.slits import Slits
|
|
26
27
|
from dodal.devices.synchrotron import Synchrotron
|
|
27
28
|
from dodal.devices.tetramm import TetrammDetector
|
|
@@ -136,7 +137,7 @@ def bimorph_hfm() -> BimorphMirror:
|
|
|
136
137
|
@device_factory()
|
|
137
138
|
def bimorph_vfm() -> BimorphMirror:
|
|
138
139
|
return BimorphMirror(
|
|
139
|
-
prefix=f"{PREFIX.beamline_prefix}-OP-KBM-01:G1:", number_of_channels=
|
|
140
|
+
prefix=f"{PREFIX.beamline_prefix}-OP-KBM-01:G1:", number_of_channels=32
|
|
140
141
|
)
|
|
141
142
|
|
|
142
143
|
|
|
@@ -264,3 +265,8 @@ def linkam() -> Linkam3:
|
|
|
264
265
|
def ppump() -> WatsonMarlow323Pump:
|
|
265
266
|
"""Sample Environment Peristaltic Pump"""
|
|
266
267
|
return WatsonMarlow323Pump(f"{PREFIX.beamline_prefix}-EA-PUMP-01:")
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
@device_factory()
|
|
271
|
+
def base_top() -> XYPitchStage:
|
|
272
|
+
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
|
|
@@ -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
|
)
|
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
|
|
6
7
|
from dodal.log import set_beamline as set_log_beamline
|
|
7
8
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
8
9
|
|
|
@@ -12,6 +13,22 @@ set_log_beamline(BL)
|
|
|
12
13
|
set_utils_beamline(BL)
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
@device_factory()
|
|
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
|
+
|
|
15
26
|
@device_factory()
|
|
16
27
|
def analyser_driver() -> VGScientaAnalyserDriverIO:
|
|
17
|
-
|
|
28
|
+
energy_sources = {
|
|
29
|
+
"source1": al_kalpha_source().energy_ev,
|
|
30
|
+
"source2": mg_kalpha_source().energy_ev,
|
|
31
|
+
}
|
|
32
|
+
return VGScientaAnalyserDriverIO(
|
|
33
|
+
f"{PREFIX.beamline_prefix}-EA-DET-01:CAM:", energy_sources
|
|
34
|
+
)
|
dodal/beamlines/p99.py
CHANGED
|
@@ -15,7 +15,7 @@ from dodal.common.visit import (
|
|
|
15
15
|
)
|
|
16
16
|
from dodal.devices.attenuator.filter import FilterMotor
|
|
17
17
|
from dodal.devices.attenuator.filter_selections import P99FilterSelections
|
|
18
|
-
from dodal.devices.motors import
|
|
18
|
+
from dodal.devices.motors import XYZStage
|
|
19
19
|
from dodal.devices.p99.andor2_point import Andor2Point
|
|
20
20
|
from dodal.devices.p99.sample_stage import SampleAngleStage
|
|
21
21
|
from dodal.log import set_beamline as set_log_beamline
|
|
@@ -38,13 +38,13 @@ def filter() -> FilterMotor:
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
@device_factory()
|
|
41
|
-
def sample_stage() ->
|
|
42
|
-
return
|
|
41
|
+
def sample_stage() -> XYZStage:
|
|
42
|
+
return XYZStage(f"{PREFIX.beamline_prefix}-MO-STAGE-02:")
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
@device_factory()
|
|
46
|
-
def lab_stage() ->
|
|
47
|
-
return
|
|
46
|
+
def lab_stage() -> XYZStage:
|
|
47
|
+
return XYZStage(f"{PREFIX.beamline_prefix}-MO-STAGE-02:LAB:")
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
set_path_provider(
|
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
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
import math
|
|
3
3
|
|
|
4
|
-
from ophyd_async.core import
|
|
4
|
+
from ophyd_async.core import derived_signal_rw
|
|
5
5
|
from ophyd_async.epics.motor import Motor
|
|
6
6
|
|
|
7
|
+
from dodal.devices.motors import XYZStage
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
class Goniometer(XYZStage):
|
|
9
11
|
"""The Aithre lab goniometer and the XYZ stage it sits on.
|
|
10
12
|
|
|
11
13
|
`x`, `y` and `z` control the axes of the positioner at the base, while `sampy` and
|
|
@@ -18,9 +20,6 @@ class Goniometer(StandardReadable):
|
|
|
18
20
|
"""
|
|
19
21
|
|
|
20
22
|
def __init__(self, prefix: str, name: str = "") -> None:
|
|
21
|
-
self.x = Motor(prefix + "X")
|
|
22
|
-
self.y = Motor(prefix + "Y")
|
|
23
|
-
self.z = Motor(prefix + "Z")
|
|
24
23
|
self.sampy = Motor(prefix + "SAMPY")
|
|
25
24
|
self.sampz = Motor(prefix + "SAMPZ")
|
|
26
25
|
self.omega = Motor(prefix + "OMEGA")
|
dodal/devices/aperture.py
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
from ophyd_async.core import StandardReadable
|
|
2
1
|
from ophyd_async.epics.core import epics_signal_r
|
|
3
|
-
from ophyd_async.epics.motor import Motor
|
|
4
2
|
|
|
3
|
+
from dodal.devices.motors import XYZStage
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
class Aperture(XYZStage):
|
|
7
7
|
def __init__(self, prefix: str, name: str = "") -> None:
|
|
8
|
-
self.x = Motor(prefix + "X")
|
|
9
|
-
self.y = Motor(prefix + "Y")
|
|
10
|
-
self.z = Motor(prefix + "Z")
|
|
11
8
|
self.small = epics_signal_r(float, prefix + "Y:SMALL_CALC")
|
|
12
9
|
self.medium = epics_signal_r(float, prefix + "Y:MEDIUM_CALC")
|
|
13
10
|
self.large = epics_signal_r(float, prefix + "Y:LARGE_CALC")
|
|
14
|
-
super().__init__(name)
|
|
11
|
+
super().__init__(prefix, name)
|
|
@@ -15,7 +15,7 @@ from pydantic import BaseModel, Field
|
|
|
15
15
|
|
|
16
16
|
from dodal.common.beamlines.beamline_parameters import GDABeamlineParameters
|
|
17
17
|
from dodal.devices.aperture import Aperture
|
|
18
|
-
from dodal.devices.
|
|
18
|
+
from dodal.devices.motors import XYStage
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class InvalidApertureMove(Exception):
|
|
@@ -164,7 +164,7 @@ class ApertureScatterguard(StandardReadable, Preparable):
|
|
|
164
164
|
name: str = "",
|
|
165
165
|
) -> None:
|
|
166
166
|
self.aperture = Aperture(prefix + "-MO-MAPT-01:")
|
|
167
|
-
self.scatterguard =
|
|
167
|
+
self.scatterguard = XYStage(prefix + "-MO-SCAT-01:")
|
|
168
168
|
self._loaded_positions = loaded_positions
|
|
169
169
|
self._tolerances = tolerances
|
|
170
170
|
with self.add_children_as_readables(StandardReadableFormat.HINTED_SIGNAL):
|
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
from ophyd_async.core import
|
|
1
|
+
from ophyd_async.core import StrictEnum
|
|
2
2
|
from ophyd_async.epics.core import epics_signal_r, epics_signal_rw
|
|
3
3
|
from ophyd_async.epics.motor import Motor
|
|
4
4
|
|
|
5
|
+
from dodal.devices.motors import XYZStage
|
|
6
|
+
|
|
5
7
|
|
|
6
8
|
class ShutterState(StrictEnum):
|
|
7
9
|
CLOSED = "Closed"
|
|
8
10
|
OPEN = "Open"
|
|
9
11
|
|
|
10
12
|
|
|
11
|
-
class DetectorMotion(
|
|
13
|
+
class DetectorMotion(XYZStage):
|
|
14
|
+
_device_prefix = "-MO-DET-01:"
|
|
15
|
+
_pmac_prefix = "-MO-PMAC-02:"
|
|
16
|
+
|
|
12
17
|
def __init__(self, prefix: str, name: str = ""):
|
|
13
|
-
device_prefix = "
|
|
14
|
-
pmac_prefix = "
|
|
18
|
+
device_prefix = f"{prefix}{self._device_prefix}"
|
|
19
|
+
pmac_prefix = f"{prefix}{self._pmac_prefix}"
|
|
15
20
|
|
|
16
|
-
self.upstream_x = Motor(f"{
|
|
17
|
-
self.downstream_x = Motor(f"{
|
|
18
|
-
self.
|
|
19
|
-
self.y = Motor(f"{prefix}{device_prefix}Y")
|
|
20
|
-
self.z = Motor(f"{prefix}{device_prefix}Z")
|
|
21
|
-
self.yaw = Motor(f"{prefix}{device_prefix}YAW")
|
|
21
|
+
self.upstream_x = Motor(f"{device_prefix}UPSTREAMX")
|
|
22
|
+
self.downstream_x = Motor(f"{device_prefix}DOWNSTREAMX")
|
|
23
|
+
self.yaw = Motor(f"{device_prefix}YAW")
|
|
22
24
|
|
|
23
25
|
self.shutter = epics_signal_rw(
|
|
24
|
-
ShutterState, f"{
|
|
26
|
+
ShutterState, f"{device_prefix}SET_SHUTTER_STATE"
|
|
25
27
|
)
|
|
26
28
|
self.shutter_closed_lim = epics_signal_r(
|
|
27
|
-
float, f"{
|
|
29
|
+
float, f"{device_prefix}CLOSE_LIMIT"
|
|
28
30
|
) # on limit = 1, off = 0
|
|
29
31
|
self.shutter_open_lim = epics_signal_r(
|
|
30
|
-
float, f"{
|
|
32
|
+
float, f"{device_prefix}OPEN_LIMIT"
|
|
31
33
|
) # on limit = 1, off = 0
|
|
32
34
|
self.z_disabled = epics_signal_r(
|
|
33
|
-
float, f"{
|
|
35
|
+
float, f"{device_prefix}Z:DISABLED"
|
|
34
36
|
) # robot interlock, 0=ok to move, 1=blocked
|
|
35
37
|
self.crate_power = epics_signal_r(
|
|
36
|
-
float, f"{
|
|
38
|
+
float, f"{pmac_prefix}CRATE2_HEALTHY"
|
|
37
39
|
) # returns 0 if no power
|
|
38
40
|
self.in_robot_load_safe_position = epics_signal_r(
|
|
39
|
-
int, f"{
|
|
41
|
+
int, f"{pmac_prefix}GPIO_INP_BITS.B2"
|
|
40
42
|
) # returns 1 if safe
|
|
41
43
|
|
|
42
|
-
super().__init__(name)
|
|
44
|
+
super().__init__(device_prefix, name)
|