dls-dodal 1.57.0__py3-none-any.whl → 1.59.1__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.57.0.dist-info → dls_dodal-1.59.1.dist-info}/METADATA +2 -1
- {dls_dodal-1.57.0.dist-info → dls_dodal-1.59.1.dist-info}/RECORD +63 -46
- dodal/_version.py +2 -2
- dodal/beamlines/b07.py +10 -5
- dodal/beamlines/b07_1.py +10 -5
- dodal/beamlines/b21.py +22 -0
- dodal/beamlines/i02_1.py +80 -0
- dodal/beamlines/i03.py +7 -4
- dodal/beamlines/i04.py +20 -3
- dodal/beamlines/i09.py +10 -9
- dodal/beamlines/i09_1.py +10 -5
- dodal/beamlines/i10-1.py +25 -0
- dodal/beamlines/i10.py +17 -1
- dodal/beamlines/i11.py +0 -17
- dodal/beamlines/i19_2.py +20 -0
- dodal/beamlines/i21.py +27 -0
- dodal/beamlines/i22.py +12 -2
- dodal/beamlines/i24.py +32 -3
- dodal/beamlines/k07.py +31 -0
- dodal/beamlines/p60.py +10 -9
- dodal/common/beamlines/commissioning_mode.py +33 -0
- dodal/common/watcher_utils.py +1 -1
- dodal/devices/apple2_undulator.py +18 -142
- dodal/devices/attenuator/attenuator.py +48 -2
- dodal/devices/attenuator/filter.py +3 -0
- dodal/devices/attenuator/filter_selections.py +26 -0
- dodal/devices/baton.py +4 -0
- dodal/devices/eiger.py +2 -1
- dodal/devices/electron_analyser/__init__.py +4 -0
- dodal/devices/electron_analyser/abstract/base_driver_io.py +30 -18
- dodal/devices/electron_analyser/energy_sources.py +101 -0
- dodal/devices/electron_analyser/specs/detector.py +6 -6
- dodal/devices/electron_analyser/specs/driver_io.py +7 -15
- dodal/devices/electron_analyser/vgscienta/detector.py +6 -6
- dodal/devices/electron_analyser/vgscienta/driver_io.py +7 -14
- dodal/devices/fast_grid_scan.py +130 -64
- dodal/devices/focusing_mirror.py +30 -0
- dodal/devices/i02_1/__init__.py +0 -0
- dodal/devices/i02_1/fast_grid_scan.py +61 -0
- dodal/devices/i02_1/sample_motors.py +19 -0
- dodal/devices/i04/murko_results.py +69 -23
- dodal/devices/i10/i10_apple2.py +282 -140
- dodal/devices/i19/backlight.py +17 -0
- dodal/devices/i21/__init__.py +3 -0
- dodal/devices/i21/enums.py +8 -0
- dodal/devices/i22/nxsas.py +2 -0
- dodal/devices/i24/commissioning_jungfrau.py +114 -0
- dodal/devices/smargon.py +0 -56
- dodal/devices/temperture_controller/__init__.py +3 -0
- dodal/devices/temperture_controller/lakeshore/__init__.py +0 -0
- dodal/devices/temperture_controller/lakeshore/lakeshore.py +204 -0
- dodal/devices/temperture_controller/lakeshore/lakeshore_io.py +112 -0
- dodal/devices/tetramm.py +38 -16
- dodal/devices/undulator.py +13 -9
- dodal/devices/v2f.py +39 -0
- dodal/devices/xbpm_feedback.py +12 -6
- dodal/devices/zebra/zebra.py +1 -0
- dodal/devices/zebra/zebra_constants_mapping.py +1 -1
- dodal/parameters/experiment_parameter_base.py +1 -5
- {dls_dodal-1.57.0.dist-info → dls_dodal-1.59.1.dist-info}/WHEEL +0 -0
- {dls_dodal-1.57.0.dist-info → dls_dodal-1.59.1.dist-info}/entry_points.txt +0 -0
- {dls_dodal-1.57.0.dist-info → dls_dodal-1.59.1.dist-info}/licenses/LICENSE +0 -0
- {dls_dodal-1.57.0.dist-info → dls_dodal-1.59.1.dist-info}/top_level.txt +0 -0
dodal/beamlines/i09_1.py
CHANGED
|
@@ -2,8 +2,8 @@ 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.electron_analyser import
|
|
6
|
-
from dodal.devices.electron_analyser.specs import
|
|
5
|
+
from dodal.devices.electron_analyser import EnergySource
|
|
6
|
+
from dodal.devices.electron_analyser.specs import SpecsDetector
|
|
7
7
|
from dodal.devices.i09.dcm import DCM
|
|
8
8
|
from dodal.devices.i09_1 import LensMode, PsuMode
|
|
9
9
|
from dodal.devices.synchrotron import Synchrotron
|
|
@@ -26,13 +26,18 @@ def dcm() -> DCM:
|
|
|
26
26
|
return DCM(prefix=f"{PREFIX.beamline_prefix}-MO-DCM-01:")
|
|
27
27
|
|
|
28
28
|
|
|
29
|
+
@device_factory()
|
|
30
|
+
def energy_source() -> EnergySource:
|
|
31
|
+
return EnergySource(dcm().energy_in_ev)
|
|
32
|
+
|
|
33
|
+
|
|
29
34
|
# Connect will work again after this work completed
|
|
30
35
|
# https://jira.diamond.ac.uk/browse/I09-651
|
|
31
36
|
@device_factory()
|
|
32
|
-
def
|
|
33
|
-
return
|
|
37
|
+
def analyser() -> SpecsDetector[LensMode, PsuMode]:
|
|
38
|
+
return SpecsDetector[LensMode, PsuMode](
|
|
34
39
|
prefix=f"{PREFIX.beamline_prefix}-EA-DET-02:CAM:",
|
|
35
40
|
lens_mode_type=LensMode,
|
|
36
41
|
psu_mode_type=PsuMode,
|
|
37
|
-
|
|
42
|
+
energy_source=energy_source(),
|
|
38
43
|
)
|
dodal/beamlines/i10-1.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
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.synchrotron import Synchrotron
|
|
6
|
+
from dodal.devices.temperture_controller import Lakeshore336
|
|
7
|
+
from dodal.log import set_beamline as set_log_beamline
|
|
8
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
9
|
+
|
|
10
|
+
BL = get_beamline_name("i10-1")
|
|
11
|
+
PREFIX = BeamlinePrefix(BL, suffix="J")
|
|
12
|
+
set_log_beamline(BL)
|
|
13
|
+
set_utils_beamline(BL)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@device_factory()
|
|
17
|
+
def synchrotron() -> Synchrotron:
|
|
18
|
+
return Synchrotron()
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@device_factory()
|
|
22
|
+
def em_temperature_controller() -> Lakeshore336:
|
|
23
|
+
return Lakeshore336(
|
|
24
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-TCTRL-41:",
|
|
25
|
+
)
|
dodal/beamlines/i10.py
CHANGED
|
@@ -6,6 +6,8 @@ note:
|
|
|
6
6
|
idd == id1, idu == id2.
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
+
from daq_config_server.client import ConfigServer
|
|
10
|
+
|
|
9
11
|
from dodal.common.beamlines.beamline_utils import device_factory
|
|
10
12
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
11
13
|
from dodal.devices.current_amplifiers import CurrentAmpDet
|
|
@@ -25,6 +27,9 @@ from dodal.devices.i10.rasor.rasor_scaler_cards import RasorScalerCard1
|
|
|
25
27
|
from dodal.devices.i10.slits import I10Slits, I10SlitsDrainCurrent
|
|
26
28
|
from dodal.devices.motors import XYStage, XYZStage
|
|
27
29
|
from dodal.devices.pgm import PGM
|
|
30
|
+
from dodal.devices.temperture_controller import (
|
|
31
|
+
Lakeshore340,
|
|
32
|
+
)
|
|
28
33
|
from dodal.log import set_beamline as set_log_beamline
|
|
29
34
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
30
35
|
|
|
@@ -33,8 +38,10 @@ set_log_beamline(BL)
|
|
|
33
38
|
set_utils_beamline(BL)
|
|
34
39
|
PREFIX = BeamlinePrefix(BL)
|
|
35
40
|
|
|
41
|
+
I10_CONF_CLIENT = ConfigServer(url="https://daq-config.diamond.ac.uk")
|
|
36
42
|
|
|
37
|
-
|
|
43
|
+
|
|
44
|
+
LOOK_UPTABLE_DIR = "/dls_sw/i10/software/gda/workspace_git/gda-diamond.git/configurations/i10-shared/lookupTables/"
|
|
38
45
|
|
|
39
46
|
|
|
40
47
|
@device_factory()
|
|
@@ -60,6 +67,7 @@ def idd() -> I10Id:
|
|
|
60
67
|
pgm=pgm(),
|
|
61
68
|
look_up_table_dir=LOOK_UPTABLE_DIR,
|
|
62
69
|
source=("Source", "idd"),
|
|
70
|
+
config_client=I10_CONF_CLIENT,
|
|
63
71
|
)
|
|
64
72
|
|
|
65
73
|
|
|
@@ -76,6 +84,7 @@ def idu() -> I10Id:
|
|
|
76
84
|
pgm=pgm(),
|
|
77
85
|
look_up_table_dir=LOOK_UPTABLE_DIR,
|
|
78
86
|
source=("Source", "idu"),
|
|
87
|
+
config_client=I10_CONF_CLIENT,
|
|
79
88
|
)
|
|
80
89
|
|
|
81
90
|
|
|
@@ -153,6 +162,13 @@ def sample_stage() -> XYZStage:
|
|
|
153
162
|
return XYZStage(prefix="ME01D-MO-CRYO-01:")
|
|
154
163
|
|
|
155
164
|
|
|
165
|
+
@device_factory()
|
|
166
|
+
def rasor_temperature_controller() -> Lakeshore340:
|
|
167
|
+
return Lakeshore340(
|
|
168
|
+
prefix="ME01D-EA-TCTRL-01:",
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
|
|
156
172
|
@device_factory()
|
|
157
173
|
def rasor_femto() -> RasorFemto:
|
|
158
174
|
return RasorFemto(
|
dodal/beamlines/i11.py
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
1
|
from dodal.common.beamlines.beamline_utils import (
|
|
4
2
|
device_factory,
|
|
5
3
|
get_path_provider,
|
|
6
|
-
set_path_provider,
|
|
7
4
|
)
|
|
8
5
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
9
6
|
from dodal.common.beamlines.device_helpers import DET_SUFFIX
|
|
10
|
-
from dodal.common.visit import RemoteDirectoryServiceClient, StaticVisitPathProvider
|
|
11
7
|
from dodal.devices.cryostream import OxfordCryoStream
|
|
12
8
|
from dodal.devices.eurotherm import (
|
|
13
9
|
EurothermGeneral,
|
|
@@ -34,19 +30,6 @@ PREFIX = BeamlinePrefix(BL)
|
|
|
34
30
|
set_log_beamline(BL)
|
|
35
31
|
set_utils_beamline(BL)
|
|
36
32
|
|
|
37
|
-
# Currently we must hard-code the visit, determining the visit at runtime requires
|
|
38
|
-
# infrastructure that is still WIP.
|
|
39
|
-
# Communication with GDA is also WIP so for now we determine an arbitrary scan number
|
|
40
|
-
# locally and write the commissioning directory. The scan number is not guaranteed to
|
|
41
|
-
# be unique and the data is at risk - this configuration is for testing only.
|
|
42
|
-
set_path_provider(
|
|
43
|
-
StaticVisitPathProvider(
|
|
44
|
-
BL,
|
|
45
|
-
Path(f"/dls/{BL}/data/2025/cm40625-3/bluesky"),
|
|
46
|
-
client=RemoteDirectoryServiceClient(f"http://{BL}-control:8088/api"),
|
|
47
|
-
)
|
|
48
|
-
)
|
|
49
|
-
|
|
50
33
|
|
|
51
34
|
@device_factory()
|
|
52
35
|
def mythen3() -> Mythen3:
|
dodal/beamlines/i19_2.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
from ophyd_async.fastcs.panda import HDFPanda
|
|
2
|
+
|
|
1
3
|
from dodal.common.beamlines.beamline_utils import (
|
|
2
4
|
device_factory,
|
|
5
|
+
get_path_provider,
|
|
3
6
|
)
|
|
4
7
|
from dodal.common.beamlines.beamline_utils import (
|
|
5
8
|
set_beamline as set_utils_beamline,
|
|
6
9
|
)
|
|
10
|
+
from dodal.devices.i19.backlight import BacklightPosition
|
|
7
11
|
from dodal.devices.i19.beamstop import BeamStop
|
|
8
12
|
from dodal.devices.i19.blueapi_device import HutchState
|
|
9
13
|
from dodal.devices.i19.diffractometer import FourCircleDiffractometer
|
|
@@ -75,3 +79,19 @@ def synchrotron() -> Synchrotron:
|
|
|
75
79
|
If this is called when already instantiated in i19-2, it will return the existing object.
|
|
76
80
|
"""
|
|
77
81
|
return Synchrotron()
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
@device_factory()
|
|
85
|
+
def backlight() -> BacklightPosition:
|
|
86
|
+
"""Get the i19-2 backlight device, instantiate it if it hasn't already been.
|
|
87
|
+
If this is called when already instantiated in i19-2, it will return the existing object.
|
|
88
|
+
"""
|
|
89
|
+
return BacklightPosition(prefix=f"{PREFIX.beamline_prefix}-EA-IOC-12:")
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
@device_factory()
|
|
93
|
+
def panda() -> HDFPanda:
|
|
94
|
+
return HDFPanda(
|
|
95
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-PANDA-01:",
|
|
96
|
+
path_provider=get_path_provider(),
|
|
97
|
+
)
|
dodal/beamlines/i21.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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.i21 import Grating
|
|
6
|
+
from dodal.devices.pgm import PGM
|
|
7
|
+
from dodal.devices.synchrotron import Synchrotron
|
|
8
|
+
from dodal.log import set_beamline as set_log_beamline
|
|
9
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
10
|
+
|
|
11
|
+
BL = get_beamline_name("i21")
|
|
12
|
+
PREFIX = BeamlinePrefix(BL, suffix="I")
|
|
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(
|
|
25
|
+
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
|
|
26
|
+
grating=Grating,
|
|
27
|
+
)
|
dodal/beamlines/i22.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
|
|
3
3
|
from ophyd_async.epics.adaravis import AravisDetector
|
|
4
|
-
from ophyd_async.epics.adcore import NDPluginBaseIO
|
|
4
|
+
from ophyd_async.epics.adcore import NDPluginBaseIO, NDPluginStatsIO
|
|
5
5
|
from ophyd_async.epics.adpilatus import PilatusDetector
|
|
6
6
|
from ophyd_async.fastcs.panda import HDFPanda
|
|
7
7
|
|
|
@@ -68,6 +68,11 @@ def saxs() -> PilatusDetector:
|
|
|
68
68
|
drv_suffix=CAM_SUFFIX,
|
|
69
69
|
fileio_suffix=HDF5_SUFFIX,
|
|
70
70
|
metadata_holder=metadata_holder,
|
|
71
|
+
plugins={
|
|
72
|
+
"stats": NDPluginStatsIO(
|
|
73
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-PILAT-01:STAT:"
|
|
74
|
+
)
|
|
75
|
+
},
|
|
71
76
|
)
|
|
72
77
|
|
|
73
78
|
|
|
@@ -93,6 +98,11 @@ def waxs() -> PilatusDetector:
|
|
|
93
98
|
drv_suffix=CAM_SUFFIX,
|
|
94
99
|
fileio_suffix=HDF5_SUFFIX,
|
|
95
100
|
metadata_holder=metadata_holder,
|
|
101
|
+
plugins={
|
|
102
|
+
"stats": NDPluginStatsIO(
|
|
103
|
+
prefix=f"{PREFIX.beamline_prefix}-EA-PILAT-03:STAT:"
|
|
104
|
+
)
|
|
105
|
+
},
|
|
96
106
|
)
|
|
97
107
|
|
|
98
108
|
|
|
@@ -272,7 +282,7 @@ def linkam() -> Linkam3:
|
|
|
272
282
|
return Linkam3(prefix=f"{PREFIX.beamline_prefix}-EA-TEMPC-05:")
|
|
273
283
|
|
|
274
284
|
|
|
275
|
-
@device_factory()
|
|
285
|
+
@device_factory(skip=True)
|
|
276
286
|
def ppump() -> WatsonMarlow323Pump:
|
|
277
287
|
"""Sample Environment Peristaltic Pump"""
|
|
278
288
|
return WatsonMarlow323Pump(f"{PREFIX.beamline_prefix}-EA-PUMP-01:")
|
dodal/beamlines/i24.py
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
|
+
from pathlib import PurePath
|
|
2
|
+
|
|
3
|
+
from ophyd_async.core import AutoIncrementingPathProvider, StaticFilenameProvider
|
|
4
|
+
|
|
1
5
|
from dodal.common.beamlines.beamline_utils import (
|
|
2
6
|
BL,
|
|
3
7
|
device_factory,
|
|
4
8
|
)
|
|
5
9
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
6
|
-
from dodal.devices.attenuator.attenuator import
|
|
10
|
+
from dodal.devices.attenuator.attenuator import EnumFilterAttenuator
|
|
11
|
+
from dodal.devices.attenuator.filter_selections import (
|
|
12
|
+
I24_FilterOneSelections,
|
|
13
|
+
I24_FilterTwoSelections,
|
|
14
|
+
)
|
|
7
15
|
from dodal.devices.hutch_shutter import HutchShutter
|
|
8
16
|
from dodal.devices.i24.aperture import Aperture
|
|
9
17
|
from dodal.devices.i24.beam_center import DetectorBeamCenter
|
|
10
18
|
from dodal.devices.i24.beamstop import Beamstop
|
|
19
|
+
from dodal.devices.i24.commissioning_jungfrau import CommissioningJungfrau
|
|
11
20
|
from dodal.devices.i24.dcm import DCM
|
|
12
21
|
from dodal.devices.i24.dual_backlight import DualBacklight
|
|
13
22
|
from dodal.devices.i24.focus_mirrors import FocusMirrorsMode
|
|
@@ -44,12 +53,13 @@ PREFIX = BeamlinePrefix(BL)
|
|
|
44
53
|
|
|
45
54
|
|
|
46
55
|
@device_factory()
|
|
47
|
-
def attenuator() ->
|
|
56
|
+
def attenuator() -> EnumFilterAttenuator:
|
|
48
57
|
"""Get a read-only attenuator device for i24, instantiate it if it hasn't already
|
|
49
58
|
been. If this is called when already instantiated in i24, it will return the
|
|
50
59
|
existing object."""
|
|
51
|
-
return
|
|
60
|
+
return EnumFilterAttenuator(
|
|
52
61
|
f"{PREFIX.beamline_prefix}-OP-ATTN-01:",
|
|
62
|
+
filter_selection=(I24_FilterOneSelections, I24_FilterTwoSelections),
|
|
53
63
|
)
|
|
54
64
|
|
|
55
65
|
|
|
@@ -187,3 +197,22 @@ def eiger_beam_center() -> DetectorBeamCenter:
|
|
|
187
197
|
f"{PREFIX.beamline_prefix}-EA-EIGER-01:CAM:",
|
|
188
198
|
"eiger_bc",
|
|
189
199
|
)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
@device_factory()
|
|
203
|
+
def commissioning_jungfrau(
|
|
204
|
+
path_to_dir: str = "/tmp/jf", # Device factory doesn't allow for required args,
|
|
205
|
+
filename: str = "jf_output", # but these should be manually entered when commissioning
|
|
206
|
+
) -> CommissioningJungfrau:
|
|
207
|
+
"""Get the commissionning Jungfrau 9M device, which uses a temporary filewriter
|
|
208
|
+
device in place of Odin while the detector is in commissioning.
|
|
209
|
+
Instantiates the device if it hasn't already been.
|
|
210
|
+
If this is called when already instantiated, it will return the existing object."""
|
|
211
|
+
|
|
212
|
+
return CommissioningJungfrau(
|
|
213
|
+
f"{PREFIX.beamline_prefix}-EA-JFRAU-01:",
|
|
214
|
+
f"{PREFIX.beamline_prefix}-JUNGFRAU-META:FD:",
|
|
215
|
+
AutoIncrementingPathProvider(
|
|
216
|
+
StaticFilenameProvider(filename), PurePath(path_to_dir)
|
|
217
|
+
),
|
|
218
|
+
)
|
dodal/beamlines/k07.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from ophyd_async.core import StrictEnum
|
|
2
|
+
|
|
3
|
+
from dodal.common.beamlines.beamline_utils import (
|
|
4
|
+
device_factory,
|
|
5
|
+
)
|
|
6
|
+
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
7
|
+
from dodal.devices.pgm import PGM
|
|
8
|
+
from dodal.devices.synchrotron import Synchrotron
|
|
9
|
+
from dodal.log import set_beamline as set_log_beamline
|
|
10
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
11
|
+
|
|
12
|
+
BL = get_beamline_name("k07")
|
|
13
|
+
PREFIX = BeamlinePrefix(BL)
|
|
14
|
+
set_log_beamline(BL)
|
|
15
|
+
set_utils_beamline(BL)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@device_factory()
|
|
19
|
+
def synchrotron() -> Synchrotron:
|
|
20
|
+
return Synchrotron()
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# Grating does not exist yet - this class is a placeholder for when it does
|
|
24
|
+
class Grating(StrictEnum):
|
|
25
|
+
NO_GRATING = "No Grating"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# Grating does not exist yet - this class is a placeholder for when it does
|
|
29
|
+
@device_factory(skip=True)
|
|
30
|
+
def pgm() -> PGM:
|
|
31
|
+
return PGM(prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:", grating=Grating)
|
dodal/beamlines/p60.py
CHANGED
|
@@ -2,8 +2,8 @@ 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.electron_analyser import
|
|
6
|
-
from dodal.devices.electron_analyser.vgscienta import
|
|
5
|
+
from dodal.devices.electron_analyser import DualEnergySource
|
|
6
|
+
from dodal.devices.electron_analyser.vgscienta import VGScientaDetector
|
|
7
7
|
from dodal.devices.p60 import (
|
|
8
8
|
LabXraySource,
|
|
9
9
|
LabXraySourceReadable,
|
|
@@ -30,18 +30,19 @@ def mg_kalpha_source() -> LabXraySourceReadable:
|
|
|
30
30
|
return LabXraySourceReadable(LabXraySource.MG_KALPHA)
|
|
31
31
|
|
|
32
32
|
|
|
33
|
+
@device_factory()
|
|
34
|
+
def energy_source() -> DualEnergySource:
|
|
35
|
+
return DualEnergySource(al_kalpha_source().energy_ev, mg_kalpha_source().energy_ev)
|
|
36
|
+
|
|
37
|
+
|
|
33
38
|
# Connect will work again after this work completed
|
|
34
39
|
# https://jira.diamond.ac.uk/browse/P60-13
|
|
35
40
|
@device_factory()
|
|
36
|
-
def
|
|
37
|
-
|
|
38
|
-
SelectedSource.SOURCE1: al_kalpha_source().energy_ev,
|
|
39
|
-
SelectedSource.SOURCE2: mg_kalpha_source().energy_ev,
|
|
40
|
-
}
|
|
41
|
-
return VGScientaAnalyserDriverIO[LensMode, PsuMode, PassEnergy](
|
|
41
|
+
def r4000() -> VGScientaDetector[LensMode, PsuMode, PassEnergy]:
|
|
42
|
+
return VGScientaDetector[LensMode, PsuMode, PassEnergy](
|
|
42
43
|
prefix=f"{PREFIX.beamline_prefix}-EA-DET-01:CAM:",
|
|
43
44
|
lens_mode_type=LensMode,
|
|
44
45
|
psu_mode_type=PsuMode,
|
|
45
46
|
pass_energy_type=PassEnergy,
|
|
46
|
-
|
|
47
|
+
energy_source=energy_source(),
|
|
47
48
|
)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""Functions relating to commissioning mode.
|
|
2
|
+
|
|
3
|
+
Commissioning Mode can be enabled for a production beamline when there is no
|
|
4
|
+
beam. The intent is that when it is enabled, bluesky plans may be run without beam
|
|
5
|
+
and plans and devices will as far as is possible behave normally.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import bluesky.plan_stubs as bps
|
|
9
|
+
from bluesky.utils import MsgGenerator
|
|
10
|
+
from ophyd_async.core import SignalR
|
|
11
|
+
|
|
12
|
+
_commissioning_signal: SignalR | None = None
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def read_commissioning_mode() -> MsgGenerator[bool]:
|
|
16
|
+
"""Utility method for reading the commissioning mode state from the context
|
|
17
|
+
of a bluesky plan, where a baton may or may not be present, or
|
|
18
|
+
commissioning mode is provided by some other mechanism."""
|
|
19
|
+
if _commissioning_signal:
|
|
20
|
+
return (yield from bps.rd(_commissioning_signal))
|
|
21
|
+
else:
|
|
22
|
+
return False
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def set_commissioning_signal(signal: SignalR[bool] | None):
|
|
26
|
+
"""Commissioning mode is enabled by a PV which when set enables commissioning mode.
|
|
27
|
+
This allows beamline staff to ensure that commissioning mode is disabled prior
|
|
28
|
+
to production use, via their own 'good morning' startup scripts.
|
|
29
|
+
Args:
|
|
30
|
+
signal: The signal which will be read in order to determine whether
|
|
31
|
+
commissioning mode is enabled."""
|
|
32
|
+
global _commissioning_signal
|
|
33
|
+
_commissioning_signal = signal
|
dodal/common/watcher_utils.py
CHANGED
|
@@ -12,7 +12,6 @@ class _LogOnPercentageProgressWatcher(Watcher[Number]):
|
|
|
12
12
|
message_prefix: str,
|
|
13
13
|
percent_interval: Number = 25,
|
|
14
14
|
):
|
|
15
|
-
status.watch(self)
|
|
16
15
|
self.percent_interval = percent_interval
|
|
17
16
|
self._current_percent_interval = 0
|
|
18
17
|
self.message_prefix = message_prefix
|
|
@@ -20,6 +19,7 @@ class _LogOnPercentageProgressWatcher(Watcher[Number]):
|
|
|
20
19
|
raise ValueError(
|
|
21
20
|
f"Percent interval on class _LogOnPercentageProgressWatcher must be a positive number, but received {self.percent_interval}"
|
|
22
21
|
)
|
|
22
|
+
status.watch(self)
|
|
23
23
|
|
|
24
24
|
def __call__(
|
|
25
25
|
self,
|