mx-bluesky 1.4.9__py3-none-any.whl → 1.5.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.
- mx_bluesky/_version.py +2 -2
- mx_bluesky/beamlines/i24/serial/__init__.py +4 -2
- mx_bluesky/beamlines/i24/serial/blueapi_config.yaml +4 -0
- mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_Chip_Collect_py3v1.py +32 -0
- mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_Chip_Manager_py3v1.py +2 -1
- mx_bluesky/beamlines/i24/serial/web_gui_plans/general_plans.py +77 -8
- mx_bluesky/common/device_setup_plans/manipulate_sample.py +4 -1
- mx_bluesky/common/device_setup_plans/utils.py +49 -0
- mx_bluesky/common/{plans → experiment_plans}/common_flyscan_xray_centre_plan.py +11 -19
- mx_bluesky/{hyperion/experiment_plans/grid_detect_then_xray_centre_plan.py → common/experiment_plans/common_grid_detect_then_xray_centre_plan.py} +108 -136
- mx_bluesky/common/{plans → experiment_plans}/inner_plans/do_fgs.py +1 -1
- mx_bluesky/common/experiment_plans/oav_grid_detection_plan.py +5 -13
- mx_bluesky/{hyperion → common}/experiment_plans/oav_snapshot_plan.py +5 -2
- mx_bluesky/common/parameters/components.py +1 -1
- mx_bluesky/common/parameters/device_composites.py +65 -0
- mx_bluesky/common/utils/__init__.py +0 -0
- mx_bluesky/hyperion/device_setup_plans/utils.py +0 -48
- mx_bluesky/hyperion/experiment_plans/__init__.py +3 -3
- mx_bluesky/hyperion/experiment_plans/experiment_registry.py +3 -3
- mx_bluesky/hyperion/experiment_plans/hyperion_flyscan_xray_centre_plan.py +40 -41
- mx_bluesky/hyperion/experiment_plans/hyperion_grid_detect_then_xray_centre_plan.py +60 -0
- mx_bluesky/hyperion/experiment_plans/pin_centre_then_xray_centre_plan.py +26 -15
- mx_bluesky/hyperion/experiment_plans/robot_load_then_centre_plan.py +8 -6
- mx_bluesky/hyperion/experiment_plans/rotation_scan_plan.py +11 -11
- mx_bluesky/hyperion/parameters/constants.py +0 -1
- mx_bluesky/hyperion/parameters/device_composites.py +5 -27
- mx_bluesky/hyperion/utils/validation.py +1 -1
- {mx_bluesky-1.4.9.dist-info → mx_bluesky-1.5.0.dist-info}/METADATA +3 -3
- {mx_bluesky-1.4.9.dist-info → mx_bluesky-1.5.0.dist-info}/RECORD +37 -33
- /mx_bluesky/common/{plans → experiment_plans}/__init__.py +0 -0
- /mx_bluesky/common/{plans → experiment_plans}/inner_plans/__init__ .py +0 -0
- /mx_bluesky/common/{plans → experiment_plans}/read_hardware.py +0 -0
- /mx_bluesky/common/{plans → experiment_plans}/write_sample_status.py +0 -0
- {mx_bluesky-1.4.9.dist-info → mx_bluesky-1.5.0.dist-info}/WHEEL +0 -0
- {mx_bluesky-1.4.9.dist-info → mx_bluesky-1.5.0.dist-info}/entry_points.txt +0 -0
- {mx_bluesky-1.4.9.dist-info → mx_bluesky-1.5.0.dist-info}/licenses/LICENSE +0 -0
- {mx_bluesky-1.4.9.dist-info → mx_bluesky-1.5.0.dist-info}/top_level.txt +0 -0
|
@@ -9,7 +9,7 @@ from dodal.devices.fast_grid_scan import (
|
|
|
9
9
|
set_fast_grid_scan_params,
|
|
10
10
|
)
|
|
11
11
|
|
|
12
|
-
from mx_bluesky.common.
|
|
12
|
+
from mx_bluesky.common.experiment_plans.common_flyscan_xray_centre_plan import (
|
|
13
13
|
construct_beamline_specific_FGS_features,
|
|
14
14
|
)
|
|
15
15
|
from mx_bluesky.common.utils.log import LOGGER
|
|
@@ -34,51 +34,50 @@ class SmargonSpeedException(Exception):
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
def construct_hyperion_specific_features(
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
xrc_composite: HyperionFlyScanXRayCentreComposite,
|
|
38
|
+
xrc_parameters: HyperionSpecifiedThreeDGridScan,
|
|
39
39
|
):
|
|
40
40
|
"""
|
|
41
41
|
Get all the information needed to do the Hyperion-specific parts of the XRC flyscan.
|
|
42
42
|
"""
|
|
43
|
-
|
|
44
43
|
signals_to_read_pre_flyscan = [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
xrc_composite.undulator.current_gap,
|
|
45
|
+
xrc_composite.synchrotron.synchrotron_mode,
|
|
46
|
+
xrc_composite.s4_slit_gaps.xgap,
|
|
47
|
+
xrc_composite.s4_slit_gaps.ygap,
|
|
48
|
+
xrc_composite.smargon.x,
|
|
49
|
+
xrc_composite.smargon.y,
|
|
50
|
+
xrc_composite.smargon.z,
|
|
51
|
+
xrc_composite.dcm.energy_in_kev,
|
|
53
52
|
]
|
|
54
53
|
|
|
55
54
|
signals_to_read_during_collection = [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
xrc_composite.aperture_scatterguard,
|
|
56
|
+
xrc_composite.attenuator.actual_transmission,
|
|
57
|
+
xrc_composite.flux.flux_reading,
|
|
58
|
+
xrc_composite.dcm.energy_in_kev,
|
|
59
|
+
xrc_composite.eiger.bit_depth,
|
|
61
60
|
]
|
|
62
61
|
|
|
63
|
-
if
|
|
62
|
+
if xrc_parameters.features.use_panda_for_gridscan:
|
|
64
63
|
setup_trigger_plan = _panda_triggering_setup
|
|
65
64
|
tidy_plan = _panda_tidy
|
|
66
65
|
set_flyscan_params_plan = partial(
|
|
67
66
|
set_fast_grid_scan_params,
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
xrc_composite.panda_fast_grid_scan,
|
|
68
|
+
xrc_parameters.panda_FGS_params,
|
|
70
69
|
)
|
|
71
|
-
fgs_motors =
|
|
70
|
+
fgs_motors = xrc_composite.panda_fast_grid_scan
|
|
72
71
|
|
|
73
72
|
else:
|
|
74
73
|
setup_trigger_plan = _zebra_triggering_setup
|
|
75
74
|
tidy_plan = partial(_generic_tidy, group="flyscan_zebra_tidy", wait=True)
|
|
76
75
|
set_flyscan_params_plan = partial(
|
|
77
76
|
set_fast_grid_scan_params,
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
xrc_composite.zebra_fast_grid_scan,
|
|
78
|
+
xrc_parameters.FGS_params,
|
|
80
79
|
)
|
|
81
|
-
fgs_motors =
|
|
80
|
+
fgs_motors = xrc_composite.zebra_fast_grid_scan
|
|
82
81
|
return construct_beamline_specific_FGS_features(
|
|
83
82
|
setup_trigger_plan,
|
|
84
83
|
tidy_plan,
|
|
@@ -91,47 +90,47 @@ def construct_hyperion_specific_features(
|
|
|
91
90
|
|
|
92
91
|
|
|
93
92
|
def _generic_tidy(
|
|
94
|
-
|
|
93
|
+
xrc_composite: HyperionFlyScanXRayCentreComposite, group, wait=True
|
|
95
94
|
) -> MsgGenerator:
|
|
96
95
|
LOGGER.info("Tidying up Zebra")
|
|
97
96
|
yield from tidy_up_zebra_after_gridscan(
|
|
98
|
-
|
|
97
|
+
xrc_composite.zebra, xrc_composite.sample_shutter, group=group, wait=wait
|
|
99
98
|
)
|
|
100
99
|
LOGGER.info("Tidying up Zocalo")
|
|
101
100
|
# make sure we don't consume any other results
|
|
102
|
-
yield from bps.unstage(
|
|
101
|
+
yield from bps.unstage(xrc_composite.zocalo, group=group, wait=wait)
|
|
103
102
|
|
|
104
103
|
# Turn off dev/shm streaming to avoid filling disk, see https://github.com/DiamondLightSource/hyperion/issues/1395
|
|
105
104
|
LOGGER.info("Turning off Eiger dev/shm streaming")
|
|
106
|
-
yield from bps.abs_set(
|
|
105
|
+
yield from bps.abs_set(xrc_composite.eiger.odin.fan.dev_shm_enable, 0) # type: ignore # Fix types in ophyd-async (https://github.com/DiamondLightSource/mx-bluesky/issues/855)
|
|
107
106
|
|
|
108
107
|
|
|
109
|
-
def _panda_tidy(
|
|
108
|
+
def _panda_tidy(xrc_composite: HyperionFlyScanXRayCentreComposite):
|
|
110
109
|
group = "panda_flyscan_tidy"
|
|
111
110
|
LOGGER.info("Disabling panda blocks")
|
|
112
|
-
yield from disarm_panda_for_gridscan(
|
|
113
|
-
yield from _generic_tidy(
|
|
111
|
+
yield from disarm_panda_for_gridscan(xrc_composite.panda, group)
|
|
112
|
+
yield from _generic_tidy(xrc_composite, group, False)
|
|
114
113
|
yield from bps.wait(group, timeout=10)
|
|
115
|
-
yield from bps.unstage(
|
|
114
|
+
yield from bps.unstage(xrc_composite.panda)
|
|
116
115
|
|
|
117
116
|
|
|
118
117
|
def _zebra_triggering_setup(
|
|
119
|
-
|
|
118
|
+
xrc_composite: HyperionFlyScanXRayCentreComposite,
|
|
120
119
|
parameters: HyperionSpecifiedThreeDGridScan,
|
|
121
120
|
) -> MsgGenerator:
|
|
122
121
|
yield from setup_zebra_for_gridscan(
|
|
123
|
-
|
|
122
|
+
xrc_composite.zebra, xrc_composite.sample_shutter, wait=True
|
|
124
123
|
)
|
|
125
124
|
|
|
126
125
|
|
|
127
126
|
def _panda_triggering_setup(
|
|
128
|
-
|
|
127
|
+
xrc_composite: HyperionFlyScanXRayCentreComposite,
|
|
129
128
|
parameters: HyperionSpecifiedThreeDGridScan,
|
|
130
129
|
) -> MsgGenerator:
|
|
131
130
|
LOGGER.info("Setting up Panda for flyscan")
|
|
132
131
|
|
|
133
132
|
run_up_distance_mm = yield from bps.rd(
|
|
134
|
-
|
|
133
|
+
xrc_composite.panda_fast_grid_scan.run_up_distance_mm
|
|
135
134
|
)
|
|
136
135
|
|
|
137
136
|
# Set the time between x steps pv
|
|
@@ -140,7 +139,7 @@ def _panda_triggering_setup(
|
|
|
140
139
|
time_between_x_steps_ms = (DEADTIME_S + parameters.exposure_time_s) * 1e3
|
|
141
140
|
|
|
142
141
|
smargon_speed_limit_mm_per_s = yield from bps.rd(
|
|
143
|
-
|
|
142
|
+
xrc_composite.smargon.x.max_velocity
|
|
144
143
|
)
|
|
145
144
|
|
|
146
145
|
sample_velocity_mm_per_s = (
|
|
@@ -161,7 +160,7 @@ def _panda_triggering_setup(
|
|
|
161
160
|
)
|
|
162
161
|
|
|
163
162
|
yield from bps.mv(
|
|
164
|
-
|
|
163
|
+
xrc_composite.panda_fast_grid_scan.time_between_x_steps_ms, # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
165
164
|
time_between_x_steps_ms, # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
166
165
|
)
|
|
167
166
|
|
|
@@ -169,9 +168,9 @@ def _panda_triggering_setup(
|
|
|
169
168
|
yield from set_panda_directory(directory_provider_root)
|
|
170
169
|
|
|
171
170
|
yield from setup_panda_for_flyscan(
|
|
172
|
-
|
|
171
|
+
xrc_composite.panda,
|
|
173
172
|
parameters.panda_FGS_params,
|
|
174
|
-
|
|
173
|
+
xrc_composite.smargon,
|
|
175
174
|
parameters.exposure_time_s,
|
|
176
175
|
time_between_x_steps_ms,
|
|
177
176
|
sample_velocity_mm_per_s,
|
|
@@ -179,5 +178,5 @@ def _panda_triggering_setup(
|
|
|
179
178
|
|
|
180
179
|
LOGGER.info("Setting up Zebra for panda flyscan")
|
|
181
180
|
yield from setup_zebra_for_panda_flyscan(
|
|
182
|
-
|
|
181
|
+
xrc_composite.zebra, xrc_composite.sample_shutter, wait=True
|
|
183
182
|
)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from blueapi.core import BlueskyContext
|
|
4
|
+
from bluesky.utils import MsgGenerator
|
|
5
|
+
from dodal.plans.preprocessors.verify_undulator_gap import (
|
|
6
|
+
verify_undulator_gap_before_run_decorator,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from mx_bluesky.common.experiment_plans.common_grid_detect_then_xray_centre_plan import (
|
|
10
|
+
grid_detect_then_xray_centre,
|
|
11
|
+
)
|
|
12
|
+
from mx_bluesky.common.parameters.constants import OavConstants, PlanNameConstants
|
|
13
|
+
from mx_bluesky.common.preprocessors.preprocessors import (
|
|
14
|
+
transmission_and_xbpm_feedback_for_collection_decorator,
|
|
15
|
+
)
|
|
16
|
+
from mx_bluesky.common.utils.context import device_composite_from_context
|
|
17
|
+
from mx_bluesky.hyperion.experiment_plans.hyperion_flyscan_xray_centre_plan import (
|
|
18
|
+
construct_hyperion_specific_features,
|
|
19
|
+
)
|
|
20
|
+
from mx_bluesky.hyperion.parameters.device_composites import (
|
|
21
|
+
HyperionGridDetectThenXRayCentreComposite,
|
|
22
|
+
)
|
|
23
|
+
from mx_bluesky.hyperion.parameters.gridscan import (
|
|
24
|
+
GridScanWithEdgeDetect,
|
|
25
|
+
HyperionSpecifiedThreeDGridScan,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def create_devices(
|
|
30
|
+
context: BlueskyContext,
|
|
31
|
+
) -> HyperionGridDetectThenXRayCentreComposite:
|
|
32
|
+
return device_composite_from_context(
|
|
33
|
+
context, HyperionGridDetectThenXRayCentreComposite
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def hyperion_grid_detect_then_xray_centre(
|
|
38
|
+
composite: HyperionGridDetectThenXRayCentreComposite,
|
|
39
|
+
parameters: GridScanWithEdgeDetect,
|
|
40
|
+
oav_config: str = OavConstants.OAV_CONFIG_JSON,
|
|
41
|
+
) -> MsgGenerator:
|
|
42
|
+
"""
|
|
43
|
+
A plan which combines the collection of snapshots from the OAV and the determination
|
|
44
|
+
of the grid dimensions to use for the following grid scan.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
@verify_undulator_gap_before_run_decorator(composite)
|
|
48
|
+
@transmission_and_xbpm_feedback_for_collection_decorator(
|
|
49
|
+
composite, parameters.transmission_frac, PlanNameConstants.GRIDSCAN_OUTER
|
|
50
|
+
)
|
|
51
|
+
def plan_to_perform():
|
|
52
|
+
yield from grid_detect_then_xray_centre(
|
|
53
|
+
composite=composite,
|
|
54
|
+
parameters=parameters,
|
|
55
|
+
xrc_params_type=HyperionSpecifiedThreeDGridScan,
|
|
56
|
+
construct_beamline_specific=construct_hyperion_specific_features,
|
|
57
|
+
oav_config=oav_config,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
yield from plan_to_perform()
|
|
@@ -9,9 +9,18 @@ from dodal.devices.eiger import EigerDetector
|
|
|
9
9
|
from dodal.devices.oav.oav_parameters import OAVParameters
|
|
10
10
|
|
|
11
11
|
from mx_bluesky.common.device_setup_plans.manipulate_sample import move_phi_chi_omega
|
|
12
|
+
from mx_bluesky.common.device_setup_plans.utils import (
|
|
13
|
+
start_preparing_data_collection_then_do_plan,
|
|
14
|
+
)
|
|
12
15
|
from mx_bluesky.common.experiment_plans.change_aperture_then_move_plan import (
|
|
13
16
|
change_aperture_then_move_to_xtal,
|
|
14
17
|
)
|
|
18
|
+
from mx_bluesky.common.experiment_plans.common_grid_detect_then_xray_centre_plan import (
|
|
19
|
+
detect_grid_and_do_gridscan,
|
|
20
|
+
)
|
|
21
|
+
from mx_bluesky.common.experiment_plans.oav_snapshot_plan import (
|
|
22
|
+
setup_beamline_for_OAV,
|
|
23
|
+
)
|
|
15
24
|
from mx_bluesky.common.external_interaction.callbacks.xray_centre.ispyb_callback import (
|
|
16
25
|
ispyb_activation_wrapper,
|
|
17
26
|
)
|
|
@@ -19,32 +28,33 @@ from mx_bluesky.common.parameters.constants import OavConstants
|
|
|
19
28
|
from mx_bluesky.common.utils.context import device_composite_from_context
|
|
20
29
|
from mx_bluesky.common.utils.log import LOGGER
|
|
21
30
|
from mx_bluesky.common.xrc_result import XRayCentreEventHandler
|
|
22
|
-
from mx_bluesky.hyperion.
|
|
23
|
-
|
|
24
|
-
)
|
|
25
|
-
from mx_bluesky.hyperion.experiment_plans.grid_detect_then_xray_centre_plan import (
|
|
26
|
-
GridDetectThenXRayCentreComposite,
|
|
27
|
-
detect_grid_and_do_gridscan,
|
|
28
|
-
)
|
|
29
|
-
from mx_bluesky.hyperion.experiment_plans.oav_snapshot_plan import (
|
|
30
|
-
setup_beamline_for_OAV,
|
|
31
|
+
from mx_bluesky.hyperion.experiment_plans.hyperion_flyscan_xray_centre_plan import (
|
|
32
|
+
construct_hyperion_specific_features,
|
|
31
33
|
)
|
|
32
34
|
from mx_bluesky.hyperion.experiment_plans.pin_tip_centring_plan import (
|
|
33
35
|
PinTipCentringComposite,
|
|
34
36
|
pin_tip_centre_plan,
|
|
35
37
|
)
|
|
36
38
|
from mx_bluesky.hyperion.parameters.constants import CONST
|
|
39
|
+
from mx_bluesky.hyperion.parameters.device_composites import (
|
|
40
|
+
HyperionGridDetectThenXRayCentreComposite,
|
|
41
|
+
)
|
|
37
42
|
from mx_bluesky.hyperion.parameters.gridscan import (
|
|
38
43
|
GridScanWithEdgeDetect,
|
|
44
|
+
HyperionSpecifiedThreeDGridScan,
|
|
39
45
|
PinTipCentreThenXrayCentre,
|
|
40
46
|
)
|
|
41
47
|
|
|
42
48
|
|
|
43
|
-
def create_devices(
|
|
49
|
+
def create_devices(
|
|
50
|
+
context: BlueskyContext,
|
|
51
|
+
) -> HyperionGridDetectThenXRayCentreComposite:
|
|
44
52
|
"""
|
|
45
|
-
|
|
53
|
+
HyperionGridDetectThenXRayCentreComposite contains all the devices we need, reuse that.
|
|
46
54
|
"""
|
|
47
|
-
return device_composite_from_context(
|
|
55
|
+
return device_composite_from_context(
|
|
56
|
+
context, HyperionGridDetectThenXRayCentreComposite
|
|
57
|
+
)
|
|
48
58
|
|
|
49
59
|
|
|
50
60
|
def create_parameters_for_grid_detection(
|
|
@@ -60,7 +70,7 @@ def create_parameters_for_grid_detection(
|
|
|
60
70
|
|
|
61
71
|
|
|
62
72
|
def pin_centre_then_flyscan_plan(
|
|
63
|
-
composite:
|
|
73
|
+
composite: HyperionGridDetectThenXRayCentreComposite,
|
|
64
74
|
parameters: PinTipCentreThenXrayCentre,
|
|
65
75
|
oav_config_file: str = OavConstants.OAV_CONFIG_JSON,
|
|
66
76
|
):
|
|
@@ -92,20 +102,21 @@ def pin_centre_then_flyscan_plan(
|
|
|
92
102
|
)
|
|
93
103
|
|
|
94
104
|
grid_detect_params = create_parameters_for_grid_detection(parameters)
|
|
95
|
-
|
|
96
105
|
oav_params = OAVParameters("xrayCentring", oav_config_file)
|
|
97
106
|
|
|
98
107
|
yield from detect_grid_and_do_gridscan(
|
|
99
108
|
composite,
|
|
100
109
|
grid_detect_params,
|
|
101
110
|
oav_params,
|
|
111
|
+
HyperionSpecifiedThreeDGridScan,
|
|
112
|
+
construct_hyperion_specific_features,
|
|
102
113
|
)
|
|
103
114
|
|
|
104
115
|
yield from ispyb_activation_wrapper(_pin_centre_then_flyscan_plan(), parameters)
|
|
105
116
|
|
|
106
117
|
|
|
107
118
|
def pin_tip_centre_then_xray_centre(
|
|
108
|
-
composite:
|
|
119
|
+
composite: HyperionGridDetectThenXRayCentreComposite,
|
|
109
120
|
parameters: PinTipCentreThenXrayCentre,
|
|
110
121
|
oav_config_file: str = OavConstants.OAV_CONFIG_JSON,
|
|
111
122
|
) -> MsgGenerator:
|
|
@@ -35,13 +35,12 @@ from dodal.devices.zocalo import ZocaloResults
|
|
|
35
35
|
from dodal.log import LOGGER
|
|
36
36
|
from ophyd_async.fastcs.panda import HDFPanda
|
|
37
37
|
|
|
38
|
+
from mx_bluesky.common.device_setup_plans.utils import (
|
|
39
|
+
start_preparing_data_collection_then_do_plan,
|
|
40
|
+
)
|
|
38
41
|
from mx_bluesky.common.parameters.constants import OavConstants
|
|
39
42
|
from mx_bluesky.hyperion.device_setup_plans.utils import (
|
|
40
43
|
fill_in_energy_if_not_supplied,
|
|
41
|
-
start_preparing_data_collection_then_do_plan,
|
|
42
|
-
)
|
|
43
|
-
from mx_bluesky.hyperion.experiment_plans.grid_detect_then_xray_centre_plan import (
|
|
44
|
-
GridDetectThenXRayCentreComposite,
|
|
45
44
|
)
|
|
46
45
|
from mx_bluesky.hyperion.experiment_plans.pin_centre_then_xray_centre_plan import (
|
|
47
46
|
pin_centre_then_flyscan_plan,
|
|
@@ -56,6 +55,9 @@ from mx_bluesky.hyperion.experiment_plans.set_energy_plan import (
|
|
|
56
55
|
set_energy_plan,
|
|
57
56
|
)
|
|
58
57
|
from mx_bluesky.hyperion.parameters.constants import CONST
|
|
58
|
+
from mx_bluesky.hyperion.parameters.device_composites import (
|
|
59
|
+
HyperionGridDetectThenXRayCentreComposite,
|
|
60
|
+
)
|
|
59
61
|
from mx_bluesky.hyperion.parameters.robot_load import RobotLoadThenCentre
|
|
60
62
|
|
|
61
63
|
|
|
@@ -65,7 +67,7 @@ class RobotLoadThenCentreComposite:
|
|
|
65
67
|
xbpm_feedback: XBPMFeedback
|
|
66
68
|
attenuator: BinaryFilterAttenuator
|
|
67
69
|
|
|
68
|
-
#
|
|
70
|
+
# HyperionGridDetectThenXRayCentreComposite fields
|
|
69
71
|
aperture_scatterguard: ApertureScatterguard
|
|
70
72
|
backlight: Backlight
|
|
71
73
|
detector_motion: DetectorMotion
|
|
@@ -110,7 +112,7 @@ def _flyscan_plan_from_robot_load_params(
|
|
|
110
112
|
oav_config_file: str = OavConstants.OAV_CONFIG_JSON,
|
|
111
113
|
):
|
|
112
114
|
yield from pin_centre_then_flyscan_plan(
|
|
113
|
-
cast(
|
|
115
|
+
cast(HyperionGridDetectThenXRayCentreComposite, composite),
|
|
114
116
|
params.pin_centre_then_xray_centre_params,
|
|
115
117
|
oav_config_file,
|
|
116
118
|
)
|
|
@@ -34,12 +34,20 @@ from mx_bluesky.common.device_setup_plans.manipulate_sample import (
|
|
|
34
34
|
cleanup_sample_environment,
|
|
35
35
|
setup_sample_environment,
|
|
36
36
|
)
|
|
37
|
-
from mx_bluesky.common.
|
|
38
|
-
|
|
37
|
+
from mx_bluesky.common.device_setup_plans.utils import (
|
|
38
|
+
start_preparing_data_collection_then_do_plan,
|
|
39
|
+
)
|
|
40
|
+
from mx_bluesky.common.experiment_plans.oav_snapshot_plan import (
|
|
41
|
+
OavSnapshotComposite,
|
|
42
|
+
oav_snapshot_plan,
|
|
43
|
+
setup_beamline_for_OAV,
|
|
44
|
+
)
|
|
45
|
+
from mx_bluesky.common.experiment_plans.read_hardware import (
|
|
39
46
|
read_hardware_for_zocalo,
|
|
40
47
|
standard_read_hardware_during_collection,
|
|
41
48
|
standard_read_hardware_pre_collection,
|
|
42
49
|
)
|
|
50
|
+
from mx_bluesky.common.parameters.components import WithSnapshot
|
|
43
51
|
from mx_bluesky.common.preprocessors.preprocessors import (
|
|
44
52
|
transmission_and_xbpm_feedback_for_collection_decorator,
|
|
45
53
|
)
|
|
@@ -50,14 +58,6 @@ from mx_bluesky.hyperion.device_setup_plans.setup_zebra import (
|
|
|
50
58
|
setup_zebra_for_rotation,
|
|
51
59
|
tidy_up_zebra_after_rotation_scan,
|
|
52
60
|
)
|
|
53
|
-
from mx_bluesky.hyperion.device_setup_plans.utils import (
|
|
54
|
-
start_preparing_data_collection_then_do_plan,
|
|
55
|
-
)
|
|
56
|
-
from mx_bluesky.hyperion.experiment_plans.oav_snapshot_plan import (
|
|
57
|
-
OavSnapshotComposite,
|
|
58
|
-
oav_snapshot_plan,
|
|
59
|
-
setup_beamline_for_OAV,
|
|
60
|
-
)
|
|
61
61
|
from mx_bluesky.hyperion.parameters.constants import CONST
|
|
62
62
|
from mx_bluesky.hyperion.parameters.rotation import (
|
|
63
63
|
RotationScan,
|
|
@@ -350,7 +350,7 @@ def _move_and_rotation(
|
|
|
350
350
|
yield from bps.prepare(
|
|
351
351
|
composite.aperture_scatterguard,
|
|
352
352
|
params.selected_aperture,
|
|
353
|
-
group=CONST.WAIT.
|
|
353
|
+
group=CONST.WAIT.PREPARE_APERTURE,
|
|
354
354
|
)
|
|
355
355
|
yield from oav_snapshot_plan(composite, params, oav_params)
|
|
356
356
|
yield from rotation_scan_plan(composite, params, motion_values)
|
|
@@ -19,7 +19,6 @@ TEST_MODE = os.environ.get("HYPERION_TEST_MODE")
|
|
|
19
19
|
|
|
20
20
|
@dataclass(frozen=True)
|
|
21
21
|
class I03Constants:
|
|
22
|
-
BASE_DATA_DIR = "/tmp/dls/i03/data/" if TEST_MODE else "/dls/i03/data/"
|
|
23
22
|
BEAMLINE = "BL03S" if TEST_MODE else "BL03I"
|
|
24
23
|
DETECTOR = EIGER2_X_16M_SIZE
|
|
25
24
|
INSERTION_PREFIX = "SR03S" if TEST_MODE else "SR03I"
|
|
@@ -7,19 +7,14 @@ from dodal.devices.aperturescatterguard import (
|
|
|
7
7
|
from dodal.devices.attenuator.attenuator import BinaryFilterAttenuator
|
|
8
8
|
from dodal.devices.backlight import Backlight
|
|
9
9
|
from dodal.devices.common_dcm import BaseDCM
|
|
10
|
-
from dodal.devices.detector.detector_motion import DetectorMotion
|
|
11
10
|
from dodal.devices.eiger import EigerDetector
|
|
12
11
|
from dodal.devices.fast_grid_scan import (
|
|
13
12
|
PandAFastGridScan,
|
|
14
13
|
ZebraFastGridScan,
|
|
15
14
|
)
|
|
16
15
|
from dodal.devices.flux import Flux
|
|
17
|
-
from dodal.devices.i03 import Beamstop
|
|
18
|
-
from dodal.devices.oav.oav_detector import OAV
|
|
19
|
-
from dodal.devices.oav.pin_image_recognition import PinTipDetection
|
|
20
16
|
from dodal.devices.robot import BartRobot
|
|
21
17
|
from dodal.devices.s4_slit_gaps import S4SlitGaps
|
|
22
|
-
from dodal.devices.smargon import Smargon
|
|
23
18
|
from dodal.devices.synchrotron import Synchrotron
|
|
24
19
|
from dodal.devices.undulator import Undulator
|
|
25
20
|
from dodal.devices.xbpm_feedback import XBPMFeedback
|
|
@@ -28,9 +23,12 @@ from dodal.devices.zebra.zebra_controlled_shutter import ZebraShutter
|
|
|
28
23
|
from dodal.devices.zocalo import ZocaloResults
|
|
29
24
|
from ophyd_async.fastcs.panda import HDFPanda
|
|
30
25
|
|
|
31
|
-
from mx_bluesky.common.
|
|
26
|
+
from mx_bluesky.common.experiment_plans.common_flyscan_xray_centre_plan import (
|
|
32
27
|
FlyScanEssentialDevices,
|
|
33
28
|
)
|
|
29
|
+
from mx_bluesky.common.parameters.device_composites import (
|
|
30
|
+
GridDetectThenXRayCentreComposite,
|
|
31
|
+
)
|
|
34
32
|
|
|
35
33
|
|
|
36
34
|
@pydantic.dataclasses.dataclass(config={"arbitrary_types_allowed": True})
|
|
@@ -57,28 +55,8 @@ class HyperionFlyScanXRayCentreComposite(FlyScanEssentialDevices):
|
|
|
57
55
|
|
|
58
56
|
|
|
59
57
|
@pydantic.dataclasses.dataclass(config={"arbitrary_types_allowed": True})
|
|
60
|
-
class GridDetectThenXRayCentreComposite:
|
|
58
|
+
class HyperionGridDetectThenXRayCentreComposite(GridDetectThenXRayCentreComposite):
|
|
61
59
|
"""All devices which are directly or indirectly required by this plan"""
|
|
62
60
|
|
|
63
|
-
aperture_scatterguard: ApertureScatterguard
|
|
64
|
-
attenuator: BinaryFilterAttenuator
|
|
65
|
-
backlight: Backlight
|
|
66
|
-
beamstop: Beamstop
|
|
67
|
-
dcm: BaseDCM
|
|
68
|
-
detector_motion: DetectorMotion
|
|
69
|
-
eiger: EigerDetector
|
|
70
|
-
zebra_fast_grid_scan: ZebraFastGridScan
|
|
71
|
-
flux: Flux
|
|
72
|
-
oav: OAV
|
|
73
|
-
pin_tip_detection: PinTipDetection
|
|
74
|
-
smargon: Smargon
|
|
75
|
-
synchrotron: Synchrotron
|
|
76
|
-
s4_slit_gaps: S4SlitGaps
|
|
77
|
-
undulator: Undulator
|
|
78
|
-
xbpm_feedback: XBPMFeedback
|
|
79
|
-
zebra: Zebra
|
|
80
|
-
zocalo: ZocaloResults
|
|
81
61
|
panda: HDFPanda
|
|
82
62
|
panda_fast_grid_scan: PandAFastGridScan
|
|
83
|
-
robot: BartRobot
|
|
84
|
-
sample_shutter: ZebraShutter
|
|
@@ -10,7 +10,7 @@ from dodal.beamlines import i03
|
|
|
10
10
|
from dodal.devices.oav.oav_detector import OAVConfigBeamCentre
|
|
11
11
|
from ophyd_async.testing import set_mock_value
|
|
12
12
|
|
|
13
|
-
from mx_bluesky.common.
|
|
13
|
+
from mx_bluesky.common.experiment_plans.read_hardware import (
|
|
14
14
|
standard_read_hardware_during_collection,
|
|
15
15
|
)
|
|
16
16
|
from mx_bluesky.hyperion.experiment_plans.rotation_scan_plan import (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mx-bluesky
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: Bluesky tools for MX Beamlines at DLS
|
|
5
5
|
Author-email: Dominic Oram <dominic.oram@diamond.ac.uk>
|
|
6
6
|
License: Apache License
|
|
@@ -234,12 +234,12 @@ Requires-Dist: scanspec
|
|
|
234
234
|
Requires-Dist: scipy
|
|
235
235
|
Requires-Dist: semver
|
|
236
236
|
Requires-Dist: matplotlib
|
|
237
|
-
Requires-Dist: blueapi>=0.
|
|
237
|
+
Requires-Dist: blueapi>=0.11.1
|
|
238
238
|
Requires-Dist: daq-config-server==0.1.1
|
|
239
239
|
Requires-Dist: ophyd>=1.10.5
|
|
240
240
|
Requires-Dist: ophyd-async>=0.10.0a2
|
|
241
241
|
Requires-Dist: bluesky>=1.13.1
|
|
242
|
-
Requires-Dist: dls-dodal==1.
|
|
242
|
+
Requires-Dist: dls-dodal==1.49.0
|
|
243
243
|
Provides-Extra: dev
|
|
244
244
|
Requires-Dist: black; extra == "dev"
|
|
245
245
|
Requires-Dist: build; extra == "dev"
|