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

Cache lower gonio positions before robot load and restore them afterwards #1467

Merged
merged 9 commits into from
Jul 24, 2024

Conversation

DominicOram
Copy link
Collaborator

@DominicOram DominicOram commented Jun 28, 2024

Fixes #1439

Link to dodal PR (if required): DiamondLightSource/dodal#653

To test:

  1. Confirm unit tests pass

@DominicOram DominicOram marked this pull request as ready for review July 18, 2024 13:53
Copy link
Contributor

@d-perl d-perl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice, one optional comment

)

if demand_energy_ev:
yield from set_energy_plan(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bit tangential, but does the set energy plan always have to block during robot load or could we wait on it later?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we want https://github.com/DiamondLightSource/hyperion/issues/1495 really but needs the RE changes


yield from bps.wait("robot_load")
# The lower gonio must be in the correct position for the robot load and we
# want to put it back afterwards. Note we don't wait as we assume the lower
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good to add explanation of why this is safe here

yield from bps.wait("robot_load")


def raise_exception_if_moved_out_of_cryojet(exception):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is nice

@DominicOram DominicOram merged commit 51d02ba into main Jul 24, 2024
4 checks passed
@DominicOram DominicOram deleted the 1439_save_restore_lower_gonio_pos branch July 24, 2024 10:42
olliesilvester pushed a commit to olliesilvester/mx-bluesky that referenced this pull request Aug 23, 2024
…ards (DiamondLightSource/hyperion#1467)

* First draft of caching lower gonios before robot load

* Add test for returning lower_gonio to correct position

* Specify argument for readability
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Save and restore lower gonio poisitions before/after robot load
2 participants