Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1243 from DiamondLightSource/1242_wait_for_apertu…
Browse files Browse the repository at this point in the history
…re_to_finish

Wait for aperture to finish
  • Loading branch information
DominicOram committed Mar 11, 2024
2 parents 5cc4de0 + 7ad7b8f commit 8c03ca8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/hyperion/experiment_plans/flyscan_xray_centre_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ def run_gridscan_and_move(
fgs_composite.sample_motors.stub_offsets, StubPosition.CURRENT_AS_CENTER
)

# Wait on everything before returning to GDA (particularly apertures), can be removed
# when we do not return to GDA here
yield from bps.wait()


def flyscan_xray_centre(
composite: FlyScanXRayCentreComposite,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ def run_gridscan_and_move(
fgs_composite.sample_motors.stub_offsets, StubPosition.CURRENT_AS_CENTER
)

# Wait on everything before returning to GDA (particularly apertures), can be removed
# when we do not return to GDA here
yield from bps.wait()


def panda_flyscan_xray_centre(
composite: FlyScanXRayCentreComposite,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ def test_read_hardware_for_ispyb_updates_from_ophyd_devices(
assert hyperion_params.ispyb_params.sample_barcode == "BARCODE"

@patch(
"dodal.devices.aperturescatterguard.ApertureScatterguard._safe_move_within_datacollection_range"
"dodal.devices.aperturescatterguard.ApertureScatterguard._safe_move_within_datacollection_range",
return_value=Status(done=True, success=True),
)
@patch(
"hyperion.experiment_plans.flyscan_xray_centre_plan.run_gridscan", autospec=True
Expand Down Expand Up @@ -348,6 +349,7 @@ def test_results_passed_to_move_motors(

@patch(
"dodal.devices.aperturescatterguard.ApertureScatterguard._safe_move_within_datacollection_range",
return_value=Status(done=True, success=True),
)
@patch(
"hyperion.experiment_plans.flyscan_xray_centre_plan.run_gridscan", autospec=True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ def test_read_hardware_for_ispyb_updates_from_ophyd_devices(
assert params.hyperion_params.ispyb_params.sample_barcode == "BARCODE"

@patch(
"dodal.devices.aperturescatterguard.ApertureScatterguard._safe_move_within_datacollection_range"
"dodal.devices.aperturescatterguard.ApertureScatterguard._safe_move_within_datacollection_range",
return_value=Status(done=True, success=True),
)
@patch(
"hyperion.experiment_plans.panda_flyscan_xray_centre_plan.run_gridscan",
Expand Down Expand Up @@ -318,6 +319,7 @@ def test_results_passed_to_move_motors(

@patch(
"dodal.devices.aperturescatterguard.ApertureScatterguard._safe_move_within_datacollection_range",
return_value=Status(done=True, success=True),
)
@patch(
"hyperion.experiment_plans.panda_flyscan_xray_centre_plan.run_gridscan",
Expand Down

0 comments on commit 8c03ca8

Please sign in to comment.