Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not reload sample if its already been loaded #480

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

DominicOram
Copy link
Contributor

@DominicOram DominicOram commented Sep 12, 2024

Fixes #240

Requires DiamondLightSource/dodal#785

To test:

  • Confirm new test passes

@DominicOram DominicOram changed the title Do not reload sample if it's already been loaded Do not reload sample if its already been loaded Sep 12, 2024
def robot_load_then_centre_plan(
composite: RobotLoadThenCentreComposite,
params: RobotLoadThenCentre,
):
yield from prepare_for_robot_load(composite)
# TODO: get these from one source of truth #1347
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 now mx-bluesky issue 254

@@ -245,8 +257,17 @@ def robot_load_and_snapshots():

yield from bps.wait("reset-lower_gonio")

yield from robot_load_and_snapshots()

if not (
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we should consider moving robot_load_and_snapshots() out of the function similar to prepare_for_robot_load() - it's quite long I think it's affecting readbility.

@@ -185,11 +187,21 @@ def raise_exception_if_moved_out_of_cryojet(exception):
)


def pin_already_loaded(
Copy link
Contributor

Choose a reason for hiding this comment

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

should be private

Copy link
Contributor

@rtuck99 rtuck99 left a comment

Choose a reason for hiding this comment

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

Approved

@DominicOram DominicOram merged commit 429cdb4 into main Sep 13, 2024
16 checks passed
@DominicOram DominicOram deleted the 240_do_not_robot_load_if_pin_already_loaded branch September 13, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Robot load: Running on the same sample twice results in the sample being unloaded and reloaded
2 participants