Skip to content

Commit 21f9fed

Browse files
authored
Multipin snapshot fix (#1753)
* Beamline hotfixes for 500Hz gridscan, multipin snapshots, mod-360 robot load
1 parent bff8d34 commit 21f9fed

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/mx_bluesky/hyperion/blueapi/parameters.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,14 @@ def load_centre_collect_to_internal(
9595
) -> LoadCentreCollect:
9696
params_as_dict = external_params.model_dump()
9797
params_as_dict["parameter_model_version"] = get_param_version()
98-
tip_offset, grid_width = pin_type_to_tip_offset_and_grid_width(
99-
external_params.robot_load_then_centre.pin_type
100-
)
98+
pin_type = external_params.robot_load_then_centre.pin_type
99+
tip_offset, grid_width = pin_type_to_tip_offset_and_grid_width(pin_type)
101100
params_as_dict["robot_load_then_centre"]["grid_width_um"] = grid_width
102101
params_as_dict["robot_load_then_centre"]["tip_offset_um"] = tip_offset
103102
del params_as_dict["robot_load_then_centre"]["pin_type"]
103+
if pin_type.name == "msp":
104+
params_as_dict["multi_rotation_scan"]["use_grid_snapshots"] = True
105+
params_as_dict["multi_rotation_scan"]["snapshot_omegas_deg"] = None
104106

105107
return LoadCentreCollect(**params_as_dict)
106108

tests/unit_tests/hyperion/blueapi_plans/test_parameters.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def test_map_external_to_internal_parameters(tmp_path):
3434
)
3535
actual_internal = load_centre_collect_to_internal(external_params)
3636
assert expected_internal == actual_internal
37+
assert not actual_internal.multi_rotation_scan.use_grid_snapshots
3738

3839

3940
@pytest.mark.parametrize("expected_roi_mode", [True, False])
@@ -58,6 +59,8 @@ def test_map_external_to_internal_multisample_pin(tmp_path):
5859

5960
assert actual_internal.robot_load_then_centre.grid_width_um == 520
6061
assert actual_internal.robot_load_then_centre.tip_offset_um == 260
62+
assert actual_internal.multi_rotation_scan.use_grid_snapshots
63+
assert actual_internal.multi_rotation_scan.snapshot_omegas_deg is None
6164

6265

6366
def test_pin_type_to_tip_offset_and_grid_width_raises_value_error_on_unrecognised_type():

tests/unit_tests/hyperion/test_baton_handler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,6 @@ async def release_baton_and_check_commissioning_signal_set():
785785
call.current_user("Hyperion"),
786786
call.set_commissioning_signal(baton.commissioning),
787787
call.create_parameters_from_agamemnon(),
788-
call.create_parameters_from_agamemnon(),
789788
]
790789
)
791790
finally:

uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)