From bfc189f182cdb3a9574c30bddd2f89fe0576874b Mon Sep 17 00:00:00 2001 From: Oliver Silvester Date: Wed, 28 Feb 2024 13:05:58 +0000 Subject: [PATCH] Make run-up optional --- .../external_interaction/callbacks/grid_detection_callback.py | 2 +- tests/unit_tests/experiment_plans/test_grid_detection_plan.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hyperion/external_interaction/callbacks/grid_detection_callback.py b/src/hyperion/external_interaction/callbacks/grid_detection_callback.py index bf8a3ae51..247aa4960 100644 --- a/src/hyperion/external_interaction/callbacks/grid_detection_callback.py +++ b/src/hyperion/external_interaction/callbacks/grid_detection_callback.py @@ -15,7 +15,7 @@ def __init__( oav_params: OAVConfigParams, exposure_time: float, set_stub_offsets: bool, - run_up_distance_mm: float, + run_up_distance_mm: float = 0.15, *args, ) -> None: super().__init__(*args) diff --git a/tests/unit_tests/experiment_plans/test_grid_detection_plan.py b/tests/unit_tests/experiment_plans/test_grid_detection_plan.py index 249772380..5ceff24a5 100644 --- a/tests/unit_tests/experiment_plans/test_grid_detection_plan.py +++ b/tests/unit_tests/experiment_plans/test_grid_detection_plan.py @@ -153,7 +153,7 @@ def test_given_when_grid_detect_then_upper_left_and_start_position_as_expected( box_size_y_pixels = box_size_microns / composite.oav.parameters.micronsPerYPixel oav_cb = OavSnapshotCallback() - grid_param_cb = GridDetectionCallback(composite.oav.parameters, 0.004, False, 0.15) + grid_param_cb = GridDetectionCallback(composite.oav.parameters, 0.004, False) RE.subscribe(oav_cb) RE.subscribe(grid_param_cb) RE( @@ -225,7 +225,7 @@ def test_when_grid_detection_plan_run_then_grid_detection_callback_gets_correct_ params = OAVParameters("loopCentring", test_config_files["oav_config_json"]) composite, _ = fake_devices box_size_microns = 20 - cb = GridDetectionCallback(composite.oav.parameters, 0.5, True, 0.15) + cb = GridDetectionCallback(composite.oav.parameters, 0.5, True) RE.subscribe(cb) RE(