Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/mx_bluesky/hyperion/blueapi/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ def load_centre_collect_to_internal(
) -> LoadCentreCollect:
params_as_dict = external_params.model_dump()
params_as_dict["parameter_model_version"] = get_param_version()
tip_offset, grid_width = pin_type_to_tip_offset_and_grid_width(
external_params.robot_load_then_centre.pin_type
)
pin_type = external_params.robot_load_then_centre.pin_type
tip_offset, grid_width = pin_type_to_tip_offset_and_grid_width(pin_type)
params_as_dict["robot_load_then_centre"]["grid_width_um"] = grid_width
params_as_dict["robot_load_then_centre"]["tip_offset_um"] = tip_offset
del params_as_dict["robot_load_then_centre"]["pin_type"]
if pin_type.name == "msp":
params_as_dict["multi_rotation_scan"]["use_grid_snapshots"] = True
params_as_dict["multi_rotation_scan"]["snapshot_omegas_deg"] = None

return LoadCentreCollect(**params_as_dict)

Expand Down
3 changes: 3 additions & 0 deletions tests/unit_tests/hyperion/blueapi_plans/test_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def test_map_external_to_internal_parameters(tmp_path):
)
actual_internal = load_centre_collect_to_internal(external_params)
assert expected_internal == actual_internal
assert not actual_internal.multi_rotation_scan.use_grid_snapshots


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

assert actual_internal.robot_load_then_centre.grid_width_um == 520
assert actual_internal.robot_load_then_centre.tip_offset_um == 260
assert actual_internal.multi_rotation_scan.use_grid_snapshots
assert actual_internal.multi_rotation_scan.snapshot_omegas_deg is None


def test_pin_type_to_tip_offset_and_grid_width_raises_value_error_on_unrecognised_type():
Expand Down
1 change: 0 additions & 1 deletion tests/unit_tests/hyperion/test_baton_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,6 @@ async def release_baton_and_check_commissioning_signal_set():
call.current_user("Hyperion"),
call.set_commissioning_signal(baton.commissioning),
call.create_parameters_from_agamemnon(),
call.create_parameters_from_agamemnon(),
]
)
finally:
Expand Down
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading