mx-bluesky 1.2.0__py3-none-any.whl → 1.4.1a0__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/__init__.py +8 -3
- mx_bluesky/__main__.py +12 -7
- mx_bluesky/_version.py +2 -2
- mx_bluesky/beamlines/i04/callbacks/murko_callback.py +14 -4
- mx_bluesky/beamlines/i04/thawing_plan.py +49 -11
- mx_bluesky/beamlines/i24/serial/__init__.py +3 -0
- mx_bluesky/beamlines/i24/serial/dcid.py +19 -21
- mx_bluesky/beamlines/i24/serial/extruder/i24ssx_Extruder_Collect_py3v2.py +69 -91
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DiamondChipI24-py3v1.edl +2 -5
- mx_bluesky/beamlines/i24/serial/fixed_target/ft_utils.py +0 -1
- mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_Chip_Collect_py3v1.py +111 -143
- mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_Chip_Manager_py3v1.py +141 -222
- mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_Chip_StartUp_py3v1.py +7 -216
- mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_moveonclick.py +18 -17
- mx_bluesky/beamlines/i24/serial/log.py +58 -49
- mx_bluesky/beamlines/i24/serial/parameters/constants.py +0 -1
- mx_bluesky/beamlines/i24/serial/parameters/fixed_target/cs/cs_maker.json +3 -3
- mx_bluesky/beamlines/i24/serial/run_extruder.sh +30 -5
- mx_bluesky/beamlines/i24/serial/run_fixed_target.sh +30 -5
- mx_bluesky/beamlines/i24/serial/run_serial.py +24 -8
- mx_bluesky/beamlines/i24/serial/setup_beamline/ca.py +0 -2
- mx_bluesky/beamlines/i24/serial/setup_beamline/setup_beamline.py +79 -81
- mx_bluesky/beamlines/i24/serial/setup_beamline/setup_detector.py +9 -20
- mx_bluesky/beamlines/i24/serial/setup_beamline/setup_zebra_plans.py +26 -28
- mx_bluesky/beamlines/i24/serial/write_nexus.py +11 -11
- mx_bluesky/common/__init__.py +0 -0
- mx_bluesky/common/device_setup_plans/read_hardware_for_setup.py +14 -0
- mx_bluesky/common/external_interaction/config_server.py +46 -0
- mx_bluesky/common/parameters/components.py +258 -0
- mx_bluesky/common/parameters/constants.py +138 -0
- mx_bluesky/common/parameters/gridscan.py +94 -0
- mx_bluesky/common/parameters/robot_load.py +16 -0
- mx_bluesky/common/plans/__init__.py +1 -0
- mx_bluesky/common/plans/do_fgs.py +121 -0
- mx_bluesky/common/utils/log.py +118 -0
- mx_bluesky/{hyperion → common/utils}/tracing.py +2 -2
- mx_bluesky/hyperion/__main__.py +13 -10
- mx_bluesky/hyperion/device_setup_plans/dcm_pitch_roll_mirror_adjuster.py +31 -26
- mx_bluesky/hyperion/device_setup_plans/read_hardware_for_setup.py +6 -12
- mx_bluesky/hyperion/device_setup_plans/setup_oav.py +6 -12
- mx_bluesky/hyperion/device_setup_plans/setup_panda.py +5 -6
- mx_bluesky/hyperion/device_setup_plans/setup_zebra.py +49 -18
- mx_bluesky/hyperion/device_setup_plans/smargon.py +6 -6
- mx_bluesky/hyperion/device_setup_plans/utils.py +2 -2
- mx_bluesky/hyperion/device_setup_plans/xbpm_feedback.py +4 -4
- mx_bluesky/hyperion/experiment_plans/__init__.py +4 -0
- mx_bluesky/hyperion/experiment_plans/change_aperture_then_move_plan.py +83 -0
- mx_bluesky/hyperion/experiment_plans/common/xrc_result.py +47 -0
- mx_bluesky/hyperion/experiment_plans/experiment_registry.py +9 -9
- mx_bluesky/hyperion/experiment_plans/flyscan_xray_centre_plan.py +145 -161
- mx_bluesky/hyperion/experiment_plans/grid_detect_then_xray_centre_plan.py +56 -22
- mx_bluesky/hyperion/experiment_plans/load_centre_collect_full_plan.py +52 -10
- mx_bluesky/hyperion/experiment_plans/oav_grid_detection_plan.py +21 -20
- mx_bluesky/hyperion/experiment_plans/oav_snapshot_plan.py +11 -14
- mx_bluesky/hyperion/experiment_plans/optimise_attenuation_plan.py +2 -2
- mx_bluesky/hyperion/experiment_plans/pin_centre_then_xray_centre_plan.py +40 -21
- mx_bluesky/hyperion/experiment_plans/pin_tip_centring_plan.py +19 -19
- mx_bluesky/hyperion/experiment_plans/robot_load_and_change_energy.py +21 -21
- mx_bluesky/hyperion/experiment_plans/robot_load_then_centre_plan.py +51 -13
- mx_bluesky/hyperion/experiment_plans/rotation_scan_plan.py +24 -7
- mx_bluesky/hyperion/experiment_plans/set_energy_plan.py +5 -6
- mx_bluesky/hyperion/external_interaction/callbacks/__main__.py +1 -2
- mx_bluesky/hyperion/external_interaction/callbacks/common/abstract_event.py +66 -0
- mx_bluesky/hyperion/external_interaction/callbacks/common/ispyb_mapping.py +1 -1
- mx_bluesky/hyperion/external_interaction/callbacks/grid_detection_callback.py +30 -25
- mx_bluesky/hyperion/external_interaction/callbacks/ispyb_callback_base.py +29 -12
- mx_bluesky/hyperion/external_interaction/callbacks/log_uid_tag_callback.py +1 -1
- mx_bluesky/hyperion/external_interaction/callbacks/robot_load/ispyb_callback.py +1 -1
- mx_bluesky/hyperion/external_interaction/callbacks/rotation/ispyb_callback.py +7 -4
- mx_bluesky/hyperion/external_interaction/callbacks/rotation/nexus_callback.py +5 -3
- mx_bluesky/hyperion/external_interaction/callbacks/xray_centre/ispyb_callback.py +28 -20
- mx_bluesky/hyperion/external_interaction/callbacks/xray_centre/nexus_callback.py +5 -4
- mx_bluesky/hyperion/external_interaction/config_server.py +11 -28
- mx_bluesky/hyperion/external_interaction/ispyb/exp_eye_store.py +1 -1
- mx_bluesky/hyperion/external_interaction/ispyb/ispyb_store.py +1 -1
- mx_bluesky/hyperion/external_interaction/nexus/nexus_utils.py +2 -2
- mx_bluesky/hyperion/external_interaction/nexus/write_nexus.py +1 -1
- mx_bluesky/hyperion/log.py +0 -84
- mx_bluesky/hyperion/parameters/components.py +4 -251
- mx_bluesky/hyperion/parameters/constants.py +22 -119
- mx_bluesky/hyperion/parameters/gridscan.py +35 -74
- mx_bluesky/hyperion/parameters/load_centre_collect.py +16 -11
- mx_bluesky/hyperion/parameters/rotation.py +23 -10
- mx_bluesky/hyperion/utils/utils.py +17 -0
- mx_bluesky/hyperion/utils/validation.py +5 -6
- {mx_bluesky-1.2.0.dist-info → mx_bluesky-1.4.1a0.dist-info}/METADATA +36 -33
- {mx_bluesky-1.2.0.dist-info → mx_bluesky-1.4.1a0.dist-info}/RECORD +91 -81
- {mx_bluesky-1.2.0.dist-info → mx_bluesky-1.4.1a0.dist-info}/WHEEL +1 -1
- mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_Chip_Mapping_py3v1.py +0 -161
- mx_bluesky/example.py +0 -19
- mx_bluesky/hyperion/parameters/robot_load.py +0 -16
- {mx_bluesky-1.2.0.dist-info → mx_bluesky-1.4.1a0.dist-info}/LICENSE +0 -0
- {mx_bluesky-1.2.0.dist-info → mx_bluesky-1.4.1a0.dist-info}/entry_points.txt +0 -0
- {mx_bluesky-1.2.0.dist-info → mx_bluesky-1.4.1a0.dist-info}/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ import bluesky.plan_stubs as bps
|
|
|
4
4
|
from dodal.devices.focusing_mirror import (
|
|
5
5
|
FocusingMirrorWithStripes,
|
|
6
6
|
MirrorStripe,
|
|
7
|
-
|
|
7
|
+
MirrorVoltages,
|
|
8
8
|
)
|
|
9
9
|
from dodal.devices.undulator_dcm import UndulatorDCM
|
|
10
10
|
from dodal.devices.util.adjuster_plans import lookup_table_adjuster
|
|
@@ -13,6 +13,9 @@ from dodal.devices.util.lookup_tables import (
|
|
|
13
13
|
)
|
|
14
14
|
|
|
15
15
|
from mx_bluesky.hyperion.log import LOGGER
|
|
16
|
+
from mx_bluesky.hyperion.utils.utils import (
|
|
17
|
+
energy_to_bragg_angle,
|
|
18
|
+
)
|
|
16
19
|
|
|
17
20
|
MIRROR_VOLTAGE_GROUP = "MIRROR_VOLTAGE_GROUP"
|
|
18
21
|
DCM_GROUP = "DCM_GROUP"
|
|
@@ -20,40 +23,41 @@ DCM_GROUP = "DCM_GROUP"
|
|
|
20
23
|
|
|
21
24
|
def _apply_and_wait_for_voltages_to_settle(
|
|
22
25
|
stripe: MirrorStripe,
|
|
23
|
-
|
|
24
|
-
mirror_voltages: VFMMirrorVoltages,
|
|
26
|
+
mirror_voltages: MirrorVoltages,
|
|
25
27
|
):
|
|
26
28
|
with open(mirror_voltages.voltage_lookup_table_path) as lut_file:
|
|
27
29
|
json_obj = json.load(lut_file)
|
|
28
30
|
|
|
29
31
|
# sample mode is the only mode supported
|
|
30
32
|
sample_data = json_obj["sample"]
|
|
31
|
-
mirror_key = mirror.name.lower()
|
|
32
33
|
if stripe == MirrorStripe.BARE:
|
|
33
34
|
stripe_key = "bare"
|
|
34
35
|
elif stripe == MirrorStripe.RHODIUM:
|
|
35
36
|
stripe_key = "rh"
|
|
36
37
|
elif stripe == MirrorStripe.PLATINUM:
|
|
37
38
|
stripe_key = "pt"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
|
|
40
|
+
for mirror_key, channels in {
|
|
41
|
+
"hfm": mirror_voltages.horizontal_voltages,
|
|
42
|
+
"vfm": mirror_voltages.vertical_voltages,
|
|
43
|
+
}.items():
|
|
44
|
+
required_voltages = sample_data[stripe_key][mirror_key]
|
|
45
|
+
|
|
46
|
+
for voltage_channel, required_voltage in zip(
|
|
47
|
+
channels.values(), required_voltages, strict=True
|
|
48
|
+
):
|
|
49
|
+
LOGGER.debug(
|
|
50
|
+
f"Applying and waiting for voltage {voltage_channel.name} = {required_voltage}"
|
|
51
|
+
)
|
|
52
|
+
yield from bps.abs_set(
|
|
53
|
+
voltage_channel, required_voltage, group=MIRROR_VOLTAGE_GROUP
|
|
54
|
+
)
|
|
51
55
|
|
|
52
56
|
yield from bps.wait(group=MIRROR_VOLTAGE_GROUP)
|
|
53
57
|
|
|
54
58
|
|
|
55
59
|
def adjust_mirror_stripe(
|
|
56
|
-
energy_kev, mirror: FocusingMirrorWithStripes, mirror_voltages:
|
|
60
|
+
energy_kev, mirror: FocusingMirrorWithStripes, mirror_voltages: MirrorVoltages
|
|
57
61
|
):
|
|
58
62
|
"""Feedback should be OFF prior to entry, in order to prevent
|
|
59
63
|
feedback from making unnecessary corrections while beam is being adjusted."""
|
|
@@ -66,26 +70,27 @@ def adjust_mirror_stripe(
|
|
|
66
70
|
yield from bps.trigger(mirror.apply_stripe)
|
|
67
71
|
|
|
68
72
|
LOGGER.info("Adjusting mirror voltages...")
|
|
69
|
-
yield from _apply_and_wait_for_voltages_to_settle(stripe,
|
|
73
|
+
yield from _apply_and_wait_for_voltages_to_settle(stripe, mirror_voltages)
|
|
70
74
|
|
|
71
75
|
|
|
72
76
|
def adjust_dcm_pitch_roll_vfm_from_lut(
|
|
73
77
|
undulator_dcm: UndulatorDCM,
|
|
74
78
|
vfm: FocusingMirrorWithStripes,
|
|
75
|
-
|
|
79
|
+
mirror_voltages: MirrorVoltages,
|
|
76
80
|
energy_kev,
|
|
77
81
|
):
|
|
78
82
|
"""Beamline energy-change post-adjustments : Adjust DCM and VFM directly from lookup tables.
|
|
79
|
-
Lookups are performed against the Bragg angle which
|
|
80
|
-
|
|
83
|
+
Lookups are performed against the Bragg angle which is computed directly from the target energy
|
|
84
|
+
rather than waiting for the EPICS controls PV to reach it.
|
|
81
85
|
Feedback should be OFF prior to entry, in order to prevent
|
|
82
86
|
feedback from making unnecessary corrections while beam is being adjusted."""
|
|
83
87
|
|
|
84
|
-
# DCM Pitch
|
|
88
|
+
# Adjust DCM Pitch
|
|
85
89
|
dcm = undulator_dcm.dcm
|
|
86
90
|
LOGGER.info(f"Adjusting DCM and VFM for {energy_kev} keV")
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
d_spacing_a: float = yield from bps.rd(undulator_dcm.dcm.crystal_metadata_d_spacing)
|
|
92
|
+
bragg_deg = energy_to_bragg_angle(energy_kev, d_spacing_a)
|
|
93
|
+
LOGGER.info(f"Target Bragg angle = {bragg_deg} degrees")
|
|
89
94
|
dcm_pitch_adjuster = lookup_table_adjuster(
|
|
90
95
|
linear_interpolation_lut(undulator_dcm.pitch_energy_table_path),
|
|
91
96
|
dcm.pitch_in_mrad,
|
|
@@ -119,7 +124,7 @@ def adjust_dcm_pitch_roll_vfm_from_lut(
|
|
|
119
124
|
# not sure how we check this
|
|
120
125
|
|
|
121
126
|
# VFM Stripe selection
|
|
122
|
-
yield from adjust_mirror_stripe(energy_kev, vfm,
|
|
127
|
+
yield from adjust_mirror_stripe(energy_kev, vfm, mirror_voltages)
|
|
123
128
|
yield from bps.wait(DCM_GROUP)
|
|
124
129
|
|
|
125
130
|
# VFM Adjust - for I03 this table always returns the same value
|
|
@@ -6,7 +6,6 @@ from dodal.devices.attenuator import Attenuator
|
|
|
6
6
|
from dodal.devices.dcm import DCM
|
|
7
7
|
from dodal.devices.eiger import EigerDetector
|
|
8
8
|
from dodal.devices.flux import Flux
|
|
9
|
-
from dodal.devices.robot import BartRobot
|
|
10
9
|
from dodal.devices.s4_slit_gaps import S4SlitGaps
|
|
11
10
|
from dodal.devices.smargon import Smargon
|
|
12
11
|
from dodal.devices.synchrotron import Synchrotron
|
|
@@ -20,7 +19,7 @@ def read_hardware_pre_collection(
|
|
|
20
19
|
undulator: Undulator,
|
|
21
20
|
synchrotron: Synchrotron,
|
|
22
21
|
s4_slit_gaps: S4SlitGaps,
|
|
23
|
-
|
|
22
|
+
dcm: DCM,
|
|
24
23
|
smargon: Smargon,
|
|
25
24
|
):
|
|
26
25
|
LOGGER.info("Reading status of beamline for callbacks, pre collection.")
|
|
@@ -29,11 +28,12 @@ def read_hardware_pre_collection(
|
|
|
29
28
|
) # gives name to event *descriptor* document
|
|
30
29
|
yield from bps.read(undulator.current_gap)
|
|
31
30
|
yield from bps.read(synchrotron.synchrotron_mode)
|
|
32
|
-
yield from bps.read(s4_slit_gaps.xgap)
|
|
33
|
-
yield from bps.read(s4_slit_gaps.ygap)
|
|
31
|
+
yield from bps.read(s4_slit_gaps.xgap) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
32
|
+
yield from bps.read(s4_slit_gaps.ygap) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
34
33
|
yield from bps.read(smargon.x)
|
|
35
34
|
yield from bps.read(smargon.y)
|
|
36
35
|
yield from bps.read(smargon.z)
|
|
36
|
+
yield from bps.read(dcm.energy_in_kev)
|
|
37
37
|
yield from bps.save()
|
|
38
38
|
|
|
39
39
|
|
|
@@ -48,13 +48,7 @@ def read_hardware_during_collection(
|
|
|
48
48
|
yield from bps.create(name=CONST.DESCRIPTORS.HARDWARE_READ_DURING)
|
|
49
49
|
yield from bps.read(aperture_scatterguard)
|
|
50
50
|
yield from bps.read(attenuator.actual_transmission)
|
|
51
|
-
yield from bps.read(flux.flux_reading)
|
|
51
|
+
yield from bps.read(flux.flux_reading) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
52
52
|
yield from bps.read(dcm.energy_in_kev)
|
|
53
|
-
yield from bps.read(detector.bit_depth)
|
|
54
|
-
yield from bps.save()
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
def read_hardware_for_zocalo(detector: EigerDetector):
|
|
58
|
-
yield from bps.create(name=CONST.DESCRIPTORS.ZOCALO_HW_READ)
|
|
59
|
-
yield from bps.read(detector.odin.file_writer.id)
|
|
53
|
+
yield from bps.read(detector.bit_depth) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
60
54
|
yield from bps.save()
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
from functools import partial
|
|
2
2
|
|
|
3
3
|
import bluesky.plan_stubs as bps
|
|
4
|
+
from dodal.devices.areadetector.plugins.CAM import ColorMode
|
|
4
5
|
from dodal.devices.oav.oav_detector import OAV
|
|
5
|
-
from dodal.devices.oav.oav_errors import OAVError_ZoomLevelNotFound
|
|
6
6
|
from dodal.devices.oav.oav_parameters import OAVParameters
|
|
7
7
|
from dodal.devices.oav.pin_image_recognition import PinTipDetection
|
|
8
|
-
from dodal.devices.oav.utils import ColorMode
|
|
9
8
|
|
|
10
9
|
from mx_bluesky.hyperion.parameters.constants import CONST
|
|
11
10
|
|
|
@@ -56,19 +55,14 @@ def setup_pin_tip_detection_params(
|
|
|
56
55
|
|
|
57
56
|
|
|
58
57
|
def setup_general_oav_params(oav: OAV, parameters: OAVParameters):
|
|
59
|
-
yield from set_using_group(oav.cam.color_mode, ColorMode.RGB1)
|
|
60
|
-
yield from set_using_group(oav.cam.acquire_period, parameters.acquire_period)
|
|
61
|
-
yield from set_using_group(oav.cam.acquire_time, parameters.exposure)
|
|
62
|
-
yield from set_using_group(oav.cam.gain, parameters.gain)
|
|
58
|
+
yield from set_using_group(oav.cam.color_mode, ColorMode.RGB1) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
59
|
+
yield from set_using_group(oav.cam.acquire_period, parameters.acquire_period) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
60
|
+
yield from set_using_group(oav.cam.acquire_time, parameters.exposure) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
61
|
+
yield from set_using_group(oav.cam.gain, parameters.gain) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
63
62
|
|
|
64
63
|
zoom_level_str = f"{float(parameters.zoom)}x"
|
|
65
|
-
if zoom_level_str not in oav.zoom_controller.allowed_zoom_levels:
|
|
66
|
-
raise OAVError_ZoomLevelNotFound(
|
|
67
|
-
f"Found {zoom_level_str} as a zoom level but expected one of {oav.zoom_controller.allowed_zoom_levels}"
|
|
68
|
-
)
|
|
69
|
-
|
|
70
64
|
yield from bps.abs_set(
|
|
71
|
-
oav.zoom_controller,
|
|
65
|
+
oav.zoom_controller, # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
72
66
|
zoom_level_str,
|
|
73
67
|
wait=True,
|
|
74
68
|
)
|
|
@@ -4,7 +4,7 @@ from importlib import resources
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
|
|
6
6
|
import bluesky.plan_stubs as bps
|
|
7
|
-
from
|
|
7
|
+
from bluesky.utils import MsgGenerator
|
|
8
8
|
from dodal.common.beamlines.beamline_utils import get_path_provider
|
|
9
9
|
from dodal.devices.fast_grid_scan import PandAGridScanParams
|
|
10
10
|
from ophyd_async.core import load_device
|
|
@@ -20,6 +20,7 @@ from mx_bluesky.hyperion.log import LOGGER
|
|
|
20
20
|
MM_TO_ENCODER_COUNTS = 200000
|
|
21
21
|
GENERAL_TIMEOUT = 60
|
|
22
22
|
TICKS_PER_MS = 1000 # Panda sequencer prescaler will be set to us
|
|
23
|
+
PULSE_WIDTH_US = 50
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
class Enabled(Enum):
|
|
@@ -62,12 +63,12 @@ def _get_seq_table(
|
|
|
62
63
|
An instance of SeqTable describing the panda sequencer table
|
|
63
64
|
"""
|
|
64
65
|
|
|
65
|
-
start_of_grid_x_counts = int(parameters.
|
|
66
|
+
start_of_grid_x_counts = int(parameters.x_start_mm * MM_TO_ENCODER_COUNTS)
|
|
66
67
|
|
|
67
68
|
# x_start is the first trigger point, so we need to travel to x_steps-1 for the final trigger point
|
|
68
69
|
end_of_grid_x_counts = int(
|
|
69
70
|
start_of_grid_x_counts
|
|
70
|
-
+ (parameters.
|
|
71
|
+
+ (parameters.x_step_size_mm * (parameters.x_steps - 1) * MM_TO_ENCODER_COUNTS)
|
|
71
72
|
)
|
|
72
73
|
|
|
73
74
|
exposure_distance_x_counts = int(exposure_distance_mm * MM_TO_ENCODER_COUNTS)
|
|
@@ -76,8 +77,6 @@ def _get_seq_table(
|
|
|
76
77
|
|
|
77
78
|
delay_between_pulses = time_between_steps_ms * TICKS_PER_MS
|
|
78
79
|
|
|
79
|
-
PULSE_WIDTH_US = 1
|
|
80
|
-
|
|
81
80
|
assert delay_between_pulses > PULSE_WIDTH_US
|
|
82
81
|
|
|
83
82
|
# BITA_1 trigger wired from TTLIN1, this is the trigger input
|
|
@@ -141,7 +140,7 @@ def setup_panda_for_flyscan(
|
|
|
141
140
|
"""
|
|
142
141
|
assert parameters.x_steps > 0
|
|
143
142
|
assert time_between_x_steps_ms * 1000 >= exposure_time_s
|
|
144
|
-
assert sample_velocity_mm_per_s * exposure_time_s < parameters.
|
|
143
|
+
assert sample_velocity_mm_per_s * exposure_time_s < parameters.x_step_size_mm
|
|
145
144
|
|
|
146
145
|
yield from bps.stage(panda, group="panda-config")
|
|
147
146
|
|
|
@@ -3,16 +3,18 @@ from functools import wraps
|
|
|
3
3
|
|
|
4
4
|
import bluesky.plan_stubs as bps
|
|
5
5
|
import bluesky.preprocessors as bpp
|
|
6
|
-
from
|
|
6
|
+
from bluesky.utils import MsgGenerator
|
|
7
7
|
from dodal.devices.zebra import (
|
|
8
8
|
AUTO_SHUTTER_GATE,
|
|
9
|
-
|
|
9
|
+
AUTO_SHUTTER_INPUT_1,
|
|
10
|
+
AUTO_SHUTTER_INPUT_2,
|
|
10
11
|
DISCONNECT,
|
|
11
12
|
IN1_TTL,
|
|
12
13
|
IN3_TTL,
|
|
13
14
|
IN4_TTL,
|
|
14
15
|
PC_GATE,
|
|
15
16
|
PC_PULSE,
|
|
17
|
+
SOFT_IN1,
|
|
16
18
|
TTL_DETECTOR,
|
|
17
19
|
TTL_PANDA,
|
|
18
20
|
TTL_XSPRESS3,
|
|
@@ -55,7 +57,7 @@ def bluesky_retry(func: Callable):
|
|
|
55
57
|
|
|
56
58
|
|
|
57
59
|
def arm_zebra(zebra: Zebra):
|
|
58
|
-
yield from bps.abs_set(zebra.pc.arm, ArmDemand.ARM, wait=True)
|
|
60
|
+
yield from bps.abs_set(zebra.pc.arm, ArmDemand.ARM, wait=True) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
59
61
|
|
|
60
62
|
|
|
61
63
|
def tidy_up_zebra_after_rotation_scan(
|
|
@@ -64,7 +66,7 @@ def tidy_up_zebra_after_rotation_scan(
|
|
|
64
66
|
group="tidy_up_zebra_after_rotation",
|
|
65
67
|
wait=True,
|
|
66
68
|
):
|
|
67
|
-
yield from bps.abs_set(zebra.pc.arm, ArmDemand.DISARM, group=group)
|
|
69
|
+
yield from bps.abs_set(zebra.pc.arm, ArmDemand.DISARM, group=group) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
68
70
|
yield from bps.abs_set(
|
|
69
71
|
zebra_shutter.control_mode, ZebraShutterControl.MANUAL, group=group
|
|
70
72
|
)
|
|
@@ -73,15 +75,45 @@ def tidy_up_zebra_after_rotation_scan(
|
|
|
73
75
|
|
|
74
76
|
|
|
75
77
|
def set_shutter_auto_input(zebra: Zebra, input: int, group="set_shutter_trigger"):
|
|
76
|
-
"""Set the
|
|
78
|
+
"""Set the signal that controls the shutter. We use the second input to the
|
|
79
|
+
Zebra's AND2 gate for this input. ZebraShutter control mode must be in auto for this input to take control
|
|
77
80
|
|
|
78
81
|
For more details see the ZebraShutter device."""
|
|
79
82
|
auto_shutter_control = zebra.logic_gates.and_gates[AUTO_SHUTTER_GATE]
|
|
80
83
|
yield from bps.abs_set(
|
|
81
|
-
auto_shutter_control.sources[
|
|
84
|
+
auto_shutter_control.sources[AUTO_SHUTTER_INPUT_2], input, group
|
|
82
85
|
)
|
|
83
86
|
|
|
84
87
|
|
|
88
|
+
def configure_zebra_and_shutter_for_auto_shutter(
|
|
89
|
+
zebra: Zebra, zebra_shutter: ZebraShutter, input: int, group="use_automatic_shutter"
|
|
90
|
+
):
|
|
91
|
+
"""Set the shutter to auto mode, and configure the zebra to trigger the shutter on
|
|
92
|
+
an input source. For the input, use one of the source constants in zebra.py
|
|
93
|
+
|
|
94
|
+
When the shutter is in auto/manual, logic in EPICS sets the Zebra's
|
|
95
|
+
SOFT_IN1 to low/high respectively. The Zebra's AND2 gate should be used to control the shutter while in auto mode.
|
|
96
|
+
To do this, we need (AND2 = SOFT_IN1 AND input), where input is the zebra signal we want to control the shutter when in auto mode.
|
|
97
|
+
"""
|
|
98
|
+
# See https://github.com/DiamondLightSource/dodal/issues/813 for better typing here.
|
|
99
|
+
|
|
100
|
+
# Set shutter to auto mode
|
|
101
|
+
yield from bps.abs_set(
|
|
102
|
+
zebra_shutter.control_mode, ZebraShutterControl.AUTO, group=group
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
# Set first input of AND2 gate to SOFT_IN1, which is high when shutter is in auto mode
|
|
106
|
+
# Note the Zebra should ALWAYS be setup this way. See https://github.com/DiamondLightSource/mx-bluesky/issues/551
|
|
107
|
+
yield from bps.abs_set(
|
|
108
|
+
zebra.logic_gates.and_gates[AUTO_SHUTTER_GATE].sources[AUTO_SHUTTER_INPUT_1],
|
|
109
|
+
SOFT_IN1,
|
|
110
|
+
group=group,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
# Set the second input of AND2 gate to the requested zebra input source
|
|
114
|
+
yield from set_shutter_auto_input(zebra, input, group=group)
|
|
115
|
+
|
|
116
|
+
|
|
85
117
|
@bluesky_retry
|
|
86
118
|
def setup_zebra_for_rotation(
|
|
87
119
|
zebra: Zebra,
|
|
@@ -137,11 +169,10 @@ def setup_zebra_for_rotation(
|
|
|
137
169
|
yield from bps.abs_set(zebra.pc.pulse_start, abs(shutter_opening_s), group=group)
|
|
138
170
|
# Set gate position to be angle of interest
|
|
139
171
|
yield from bps.abs_set(zebra.pc.gate_trigger, axis.value, group=group)
|
|
140
|
-
#
|
|
141
|
-
yield from
|
|
142
|
-
zebra_shutter
|
|
172
|
+
# Set shutter to automatic and to trigger via PC_GATE
|
|
173
|
+
yield from configure_zebra_and_shutter_for_auto_shutter(
|
|
174
|
+
zebra, zebra_shutter, PC_GATE, group=group
|
|
143
175
|
)
|
|
144
|
-
yield from set_shutter_auto_input(zebra, PC_GATE, group=group)
|
|
145
176
|
# Trigger the detector with a pulse
|
|
146
177
|
yield from bps.abs_set(zebra.output.out_pvs[TTL_DETECTOR], PC_PULSE, group=group)
|
|
147
178
|
# Don't use the fluorescence detector
|
|
@@ -159,11 +190,12 @@ def setup_zebra_for_gridscan(
|
|
|
159
190
|
group="setup_zebra_for_gridscan",
|
|
160
191
|
wait=True,
|
|
161
192
|
):
|
|
162
|
-
|
|
163
|
-
yield from
|
|
164
|
-
zebra_shutter
|
|
193
|
+
# Set shutter to automatic and to trigger via motion controller GPIO signal (IN4_TTL)
|
|
194
|
+
yield from configure_zebra_and_shutter_for_auto_shutter(
|
|
195
|
+
zebra, zebra_shutter, IN4_TTL, group=group
|
|
165
196
|
)
|
|
166
|
-
|
|
197
|
+
|
|
198
|
+
yield from bps.abs_set(zebra.output.out_pvs[TTL_DETECTOR], IN3_TTL, group=group)
|
|
167
199
|
yield from bps.abs_set(zebra.output.out_pvs[TTL_XSPRESS3], DISCONNECT, group=group)
|
|
168
200
|
yield from bps.abs_set(zebra.output.pulse_1.input, DISCONNECT, group=group)
|
|
169
201
|
|
|
@@ -198,11 +230,10 @@ def setup_zebra_for_panda_flyscan(
|
|
|
198
230
|
# Forwards eiger trigger signal from panda
|
|
199
231
|
yield from bps.abs_set(zebra.output.out_pvs[TTL_DETECTOR], IN1_TTL, group=group)
|
|
200
232
|
|
|
201
|
-
#
|
|
202
|
-
yield from
|
|
203
|
-
zebra_shutter
|
|
233
|
+
# Set shutter to automatic and to trigger via motion controller GPIO signal (IN4_TTL)
|
|
234
|
+
yield from configure_zebra_and_shutter_for_auto_shutter(
|
|
235
|
+
zebra, zebra_shutter, IN4_TTL, group=group
|
|
204
236
|
)
|
|
205
|
-
yield from set_shutter_auto_input(zebra, IN4_TTL, group=group)
|
|
206
237
|
|
|
207
238
|
yield from bps.abs_set(zebra.output.out_pvs[TTL_XSPRESS3], DISCONNECT, group=group)
|
|
208
239
|
|
|
@@ -16,10 +16,10 @@ def move_smargon_warn_on_out_of_range(
|
|
|
16
16
|
"Pin tip centring failed - pin too long/short/bent and out of range"
|
|
17
17
|
)
|
|
18
18
|
yield from bps.mv(
|
|
19
|
-
smargon.x,
|
|
20
|
-
position[0],
|
|
21
|
-
smargon.y,
|
|
22
|
-
position[1],
|
|
23
|
-
smargon.z,
|
|
24
|
-
position[2],
|
|
19
|
+
smargon.x, # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
20
|
+
position[0], # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
21
|
+
smargon.y, # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
22
|
+
position[1], # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
23
|
+
smargon.z, # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
24
|
+
position[2], # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
25
25
|
)
|
|
@@ -41,7 +41,7 @@ def start_preparing_data_collection_then_do_plan(
|
|
|
41
41
|
"""
|
|
42
42
|
|
|
43
43
|
def wrapped_plan():
|
|
44
|
-
yield from bps.abs_set(eiger.do_arm, 1, group=group)
|
|
44
|
+
yield from bps.abs_set(eiger.do_arm, 1, group=group) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
45
45
|
if detector_distance_mm:
|
|
46
46
|
yield from set_detector_z_position(
|
|
47
47
|
detector_motion, detector_distance_mm, group
|
|
@@ -51,5 +51,5 @@ def start_preparing_data_collection_then_do_plan(
|
|
|
51
51
|
|
|
52
52
|
yield from bpp.contingency_wrapper(
|
|
53
53
|
wrapped_plan(),
|
|
54
|
-
except_plan=lambda e: (yield from bps.stop(eiger)),
|
|
54
|
+
except_plan=lambda e: (yield from bps.stop(eiger)), # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
55
55
|
)
|
|
@@ -23,14 +23,14 @@ def _check_and_pause_feedback(
|
|
|
23
23
|
turning XBPM feedback off.
|
|
24
24
|
|
|
25
25
|
"""
|
|
26
|
-
yield from bps.mv(attenuator, 1.0)
|
|
26
|
+
yield from bps.mv(attenuator, 1.0) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
27
27
|
LOGGER.info("Waiting for XBPM feedback to be stable")
|
|
28
28
|
yield from bps.trigger(xbpm_feedback, wait=True)
|
|
29
29
|
LOGGER.info(
|
|
30
30
|
f"XPBM feedback in position, pausing and setting transmission to {desired_transmission_fraction}"
|
|
31
31
|
)
|
|
32
|
-
yield from bps.mv(xbpm_feedback.pause_feedback, Pause.PAUSE)
|
|
33
|
-
yield from bps.mv(attenuator, desired_transmission_fraction)
|
|
32
|
+
yield from bps.mv(xbpm_feedback.pause_feedback, Pause.PAUSE) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
33
|
+
yield from bps.mv(attenuator, desired_transmission_fraction) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
def _unpause_xbpm_feedback_and_set_transmission_to_1(
|
|
@@ -44,7 +44,7 @@ def _unpause_xbpm_feedback_and_set_transmission_to_1(
|
|
|
44
44
|
the beam in position
|
|
45
45
|
attenuator (Attenuator): The attenuator used to set transmission
|
|
46
46
|
"""
|
|
47
|
-
yield from bps.mv(xbpm_feedback.pause_feedback, Pause.RUN, attenuator, 1.0)
|
|
47
|
+
yield from bps.mv(xbpm_feedback.pause_feedback, Pause.RUN, attenuator, 1.0) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
def transmission_and_xbpm_feedback_for_collection_wrapper(
|
|
@@ -9,6 +9,9 @@ from mx_bluesky.hyperion.experiment_plans.flyscan_xray_centre_plan import (
|
|
|
9
9
|
from mx_bluesky.hyperion.experiment_plans.grid_detect_then_xray_centre_plan import (
|
|
10
10
|
grid_detect_then_xray_centre,
|
|
11
11
|
)
|
|
12
|
+
from mx_bluesky.hyperion.experiment_plans.load_centre_collect_full_plan import (
|
|
13
|
+
load_centre_collect_full,
|
|
14
|
+
)
|
|
12
15
|
from mx_bluesky.hyperion.experiment_plans.pin_centre_then_xray_centre_plan import (
|
|
13
16
|
pin_tip_centre_then_xray_centre,
|
|
14
17
|
)
|
|
@@ -27,4 +30,5 @@ __all__ = [
|
|
|
27
30
|
"pin_tip_centre_then_xray_centre",
|
|
28
31
|
"multi_rotation_scan",
|
|
29
32
|
"robot_load_then_centre",
|
|
33
|
+
"load_centre_collect_full",
|
|
30
34
|
]
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import bluesky.plan_stubs as bps
|
|
2
|
+
import bluesky.preprocessors as bpp
|
|
3
|
+
import numpy
|
|
4
|
+
from dodal.devices.aperturescatterguard import ApertureScatterguard, ApertureValue
|
|
5
|
+
from dodal.devices.smargon import Smargon, StubPosition
|
|
6
|
+
|
|
7
|
+
from mx_bluesky.common.utils.tracing import TRACER
|
|
8
|
+
from mx_bluesky.hyperion.device_setup_plans.manipulate_sample import move_x_y_z
|
|
9
|
+
from mx_bluesky.hyperion.experiment_plans.common.xrc_result import XRayCentreResult
|
|
10
|
+
from mx_bluesky.hyperion.log import LOGGER
|
|
11
|
+
from mx_bluesky.hyperion.parameters.gridscan import HyperionThreeDGridScan
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def change_aperture_then_move_to_xtal(
|
|
15
|
+
best_hit: XRayCentreResult,
|
|
16
|
+
smargon: Smargon,
|
|
17
|
+
aperture_scatterguard: ApertureScatterguard,
|
|
18
|
+
parameters: HyperionThreeDGridScan | None = None,
|
|
19
|
+
):
|
|
20
|
+
"""For the given x-ray centring result,
|
|
21
|
+
* Change the aperture so that the beam size is comparable to the crystal size
|
|
22
|
+
* Centre on the centre-of-mass
|
|
23
|
+
* Reset the stub offsets if specified by params"""
|
|
24
|
+
if best_hit.bounding_box_mm is not None:
|
|
25
|
+
bounding_box_size = numpy.abs(
|
|
26
|
+
best_hit.bounding_box_mm[1] - best_hit.bounding_box_mm[0]
|
|
27
|
+
)
|
|
28
|
+
with TRACER.start_span("change_aperture"):
|
|
29
|
+
yield from _set_aperture_for_bbox_mm(
|
|
30
|
+
aperture_scatterguard, bounding_box_size
|
|
31
|
+
)
|
|
32
|
+
else:
|
|
33
|
+
LOGGER.warning("No bounding box size received")
|
|
34
|
+
|
|
35
|
+
# once we have the results, go to the appropriate position
|
|
36
|
+
LOGGER.info("Moving to centre of mass.")
|
|
37
|
+
with TRACER.start_span("move_to_result"):
|
|
38
|
+
x, y, z = best_hit.centre_of_mass_mm
|
|
39
|
+
yield from move_x_y_z(smargon, x, y, z, wait=True)
|
|
40
|
+
|
|
41
|
+
# TODO support for setting stub offsets in multipin
|
|
42
|
+
# https://github.com/DiamondLightSource/mx-bluesky/issues/552
|
|
43
|
+
if parameters and parameters.FGS_params.set_stub_offsets:
|
|
44
|
+
LOGGER.info("Recentring smargon co-ordinate system to this point.")
|
|
45
|
+
yield from bps.mv(
|
|
46
|
+
# See: https://github.com/bluesky/bluesky/issues/1809
|
|
47
|
+
smargon.stub_offsets, # type: ignore
|
|
48
|
+
StubPosition.CURRENT_AS_CENTER, # type: ignore
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _set_aperture_for_bbox_mm(
|
|
53
|
+
aperture_device: ApertureScatterguard, bbox_size_mm: list[float] | numpy.ndarray
|
|
54
|
+
):
|
|
55
|
+
# TODO confirm correction factor see https://github.com/DiamondLightSource/mx-bluesky/issues/618
|
|
56
|
+
ASSUMED_BOX_SIZE_MM = 0.020
|
|
57
|
+
bbox_size_boxes = [round(mm / ASSUMED_BOX_SIZE_MM) for mm in bbox_size_mm]
|
|
58
|
+
yield from set_aperture_for_bbox_size(aperture_device, bbox_size_boxes)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def set_aperture_for_bbox_size(
|
|
62
|
+
aperture_device: ApertureScatterguard,
|
|
63
|
+
bbox_size: list[int] | numpy.ndarray,
|
|
64
|
+
):
|
|
65
|
+
# bbox_size is [x,y,z], for i03 we only care about x
|
|
66
|
+
new_selected_aperture = (
|
|
67
|
+
ApertureValue.MEDIUM if bbox_size[0] < 2 else ApertureValue.LARGE
|
|
68
|
+
)
|
|
69
|
+
LOGGER.info(
|
|
70
|
+
f"Setting aperture to {new_selected_aperture} based on bounding box size {bbox_size}."
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
@bpp.set_run_key_decorator("change_aperture")
|
|
74
|
+
@bpp.run_decorator(
|
|
75
|
+
md={
|
|
76
|
+
"subplan_name": "change_aperture",
|
|
77
|
+
"aperture_size": new_selected_aperture.value,
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
def set_aperture():
|
|
81
|
+
yield from bps.abs_set(aperture_device, new_selected_aperture)
|
|
82
|
+
|
|
83
|
+
yield from set_aperture()
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import dataclasses
|
|
4
|
+
from collections.abc import Callable, Sequence
|
|
5
|
+
from functools import partial
|
|
6
|
+
|
|
7
|
+
import numpy as np
|
|
8
|
+
|
|
9
|
+
from mx_bluesky.common.parameters.components import (
|
|
10
|
+
MultiXtalSelection,
|
|
11
|
+
TopNByMaxCountSelection,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@dataclasses.dataclass
|
|
16
|
+
class XRayCentreResult:
|
|
17
|
+
"""Represents information about a hit from an X-ray centring."""
|
|
18
|
+
|
|
19
|
+
centre_of_mass_mm: np.ndarray
|
|
20
|
+
bounding_box_mm: tuple[np.ndarray, np.ndarray]
|
|
21
|
+
max_count: int
|
|
22
|
+
total_count: int
|
|
23
|
+
|
|
24
|
+
def __eq__(self, o):
|
|
25
|
+
return (
|
|
26
|
+
isinstance(o, XRayCentreResult)
|
|
27
|
+
and o.max_count == self.max_count
|
|
28
|
+
and o.total_count == self.total_count
|
|
29
|
+
and all(o.centre_of_mass_mm == self.centre_of_mass_mm)
|
|
30
|
+
and all(o.bounding_box_mm[0] == self.bounding_box_mm[0])
|
|
31
|
+
and all(o.bounding_box_mm[1] == self.bounding_box_mm[1])
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def top_n_by_max_count(
|
|
36
|
+
unfiltered: Sequence[XRayCentreResult], n: int
|
|
37
|
+
) -> Sequence[XRayCentreResult]:
|
|
38
|
+
sorted_hits = sorted(unfiltered, key=lambda result: result.max_count, reverse=True)
|
|
39
|
+
return sorted_hits[:n]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def resolve_selection_fn(
|
|
43
|
+
params: MultiXtalSelection,
|
|
44
|
+
) -> Callable[[Sequence[XRayCentreResult]], Sequence[XRayCentreResult]]:
|
|
45
|
+
if isinstance(params, TopNByMaxCountSelection):
|
|
46
|
+
return partial(top_n_by_max_count, n=params.n)
|
|
47
|
+
raise ValueError(f"Invalid selection function {params.name}")
|
|
@@ -5,6 +5,11 @@ from typing import TypedDict
|
|
|
5
5
|
|
|
6
6
|
import mx_bluesky.hyperion.experiment_plans.flyscan_xray_centre_plan as flyscan_xray_centre_plan
|
|
7
7
|
import mx_bluesky.hyperion.experiment_plans.rotation_scan_plan as rotation_scan_plan
|
|
8
|
+
from mx_bluesky.common.parameters.gridscan import (
|
|
9
|
+
GridScanWithEdgeDetect,
|
|
10
|
+
PinTipCentreThenXrayCentre,
|
|
11
|
+
RobotLoadThenCentre,
|
|
12
|
+
)
|
|
8
13
|
from mx_bluesky.hyperion.experiment_plans import (
|
|
9
14
|
grid_detect_then_xray_centre_plan,
|
|
10
15
|
load_centre_collect_full_plan,
|
|
@@ -18,12 +23,7 @@ from mx_bluesky.hyperion.external_interaction.callbacks.common.callback_util imp
|
|
|
18
23
|
create_robot_load_and_centre_callbacks,
|
|
19
24
|
create_rotation_callbacks,
|
|
20
25
|
)
|
|
21
|
-
from mx_bluesky.hyperion.parameters.gridscan import
|
|
22
|
-
GridScanWithEdgeDetect,
|
|
23
|
-
PinTipCentreThenXrayCentre,
|
|
24
|
-
RobotLoadThenCentre,
|
|
25
|
-
ThreeDGridScan,
|
|
26
|
-
)
|
|
26
|
+
from mx_bluesky.hyperion.parameters.gridscan import HyperionThreeDGridScan
|
|
27
27
|
from mx_bluesky.hyperion.parameters.load_centre_collect import LoadCentreCollect
|
|
28
28
|
from mx_bluesky.hyperion.parameters.rotation import MultiRotationScan, RotationScan
|
|
29
29
|
|
|
@@ -39,7 +39,7 @@ def do_nothing():
|
|
|
39
39
|
class ExperimentRegistryEntry(TypedDict):
|
|
40
40
|
setup: Callable
|
|
41
41
|
param_type: type[
|
|
42
|
-
|
|
42
|
+
HyperionThreeDGridScan
|
|
43
43
|
| GridScanWithEdgeDetect
|
|
44
44
|
| RotationScan
|
|
45
45
|
| MultiRotationScan
|
|
@@ -53,7 +53,7 @@ class ExperimentRegistryEntry(TypedDict):
|
|
|
53
53
|
PLAN_REGISTRY: dict[str, ExperimentRegistryEntry] = {
|
|
54
54
|
"flyscan_xray_centre": {
|
|
55
55
|
"setup": flyscan_xray_centre_plan.create_devices,
|
|
56
|
-
"param_type":
|
|
56
|
+
"param_type": HyperionThreeDGridScan,
|
|
57
57
|
"callbacks_factory": create_gridscan_callbacks,
|
|
58
58
|
},
|
|
59
59
|
"grid_detect_then_xray_centre": {
|
|
@@ -81,7 +81,7 @@ PLAN_REGISTRY: dict[str, ExperimentRegistryEntry] = {
|
|
|
81
81
|
"param_type": MultiRotationScan,
|
|
82
82
|
"callbacks_factory": create_rotation_callbacks,
|
|
83
83
|
},
|
|
84
|
-
"
|
|
84
|
+
"load_centre_collect_full": {
|
|
85
85
|
"setup": load_centre_collect_full_plan.create_devices,
|
|
86
86
|
"param_type": LoadCentreCollect,
|
|
87
87
|
"callbacks_factory": create_load_centre_collect_callbacks,
|