Skip to content

Commit

Permalink
Merge branch 'main' into zocalo_results_mutliple_sources
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicOram committed Sep 23, 2024
2 parents a840e28 + 7e3eac5 commit 49d103f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ repos:
exclude: ^helmchart/
- id: check-merge-conflict
- id: end-of-file-fixer
- id: no-commit-to-branch
name: "Don't commit to 'main'"

- repo: local
hooks:
Expand Down
10 changes: 5 additions & 5 deletions src/mx_bluesky/hyperion/experiment_plans/rotation_scan_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,6 @@ def rotation_scan_plan(
"scan_points": [params.scan_points],
}
)
@transmission_and_xbpm_feedback_for_collection_decorator(
composite.xbpm_feedback,
composite.attenuator,
params.transmission_frac,
)
def _rotation_scan_plan(
motion_values: RotationMotionProfile,
composite: RotationScanComposite,
Expand Down Expand Up @@ -361,6 +356,11 @@ def rotation_scan(
],
}
)
@transmission_and_xbpm_feedback_for_collection_decorator(
composite.xbpm_feedback,
composite.attenuator,
parameters.transmission_frac,
)
def rotation_scan_plan_with_stage_and_cleanup(
params: RotationScan,
):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from dodal.devices.oav.oav_parameters import OAVParameters
from dodal.devices.smargon import Smargon
from dodal.devices.synchrotron import SynchrotronMode
from dodal.devices.xbpm_feedback import Pause
from dodal.devices.zebra import PC_GATE, Zebra
from dodal.devices.zebra_controlled_shutter import ZebraShutterControl
from ophyd_async.core import get_mock_put
Expand Down Expand Up @@ -391,7 +392,7 @@ def test_rotation_scan_triggers_xbpm_then_pauses_xbpm_and_sets_transmission(
msgs,
lambda msg: msg.command == "set"
and msg.obj.name == "xbpm_feedback-pause_feedback"
and msg.args[0] == "Paused",
and msg.args[0] == Pause.PAUSE.value,
)
msgs = assert_message_and_return_remaining(
msgs,
Expand All @@ -401,6 +402,28 @@ def test_rotation_scan_triggers_xbpm_then_pauses_xbpm_and_sets_transmission(
)


def test_rotation_scan_does_not_change_transmission_back_until_after_data_collected(
rotation_scan_simulated_messages,
test_rotation_params: RotationScan,
):
msgs = assert_message_and_return_remaining(
rotation_scan_simulated_messages,
lambda msg: msg.command == "unstage" and msg.obj.name == "eiger",
)
msgs = assert_message_and_return_remaining(
msgs,
lambda msg: msg.command == "set"
and msg.obj.name == "xbpm_feedback-pause_feedback"
and msg.args[0] == Pause.RUN.value,
)
msgs = assert_message_and_return_remaining(
msgs,
lambda msg: msg.command == "set"
and msg.obj.name == "attenuator"
and msg.args[0] == 1.0,
)


def test_rotation_scan_moves_gonio_to_start_before_snapshots(
rotation_scan_simulated_messages,
):
Expand Down

0 comments on commit 49d103f

Please sign in to comment.