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

Correctly read pin tip location using ophyd #1143

Merged
merged 3 commits into from
Feb 14, 2024

Conversation

DominicOram
Copy link
Collaborator

Fixes #1125

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

Note, will be tidied up in #1069

To test:

  1. Confirm new tests pass

tip_x_y_px = yield from bps.rd(pin_tip)
if isinstance(pin_tip, PinTipDetection):
tip_x_y_px = yield from bps.rd(pin_tip)
LOGGER.info("Pin tip not found, waiting a second and trying again")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should: This logging message should be in the below if statement

@@ -266,6 +266,13 @@ def flux():
return i03.flux(fake_with_ophyd_sim=True)


@pytest.fixture
def ophyd_pin_tip_detection():
RunEngine() # A RE is needed to start the bluesky loop
Copy link
Contributor

@olliesilvester olliesilvester Feb 14, 2024

Choose a reason for hiding this comment

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

Should: Use the RE from this conftest

Copy link
Contributor

@olliesilvester olliesilvester left a comment

Choose a reason for hiding this comment

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

Looks good thanks. I'll just move that logging statement

Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (9cfa614) 93.09% compared to head (8d279bf) 92.83%.

❗ Current head 8d279bf differs from pull request most recent head 36310b8. Consider uploading reports for the commit 36310b8 to get more accurate results

Files Patch % Lines
...hyperion/experiment_plans/pin_tip_centring_plan.py 66.66% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1143      +/-   ##
==========================================
- Coverage   93.09%   92.83%   -0.26%     
==========================================
  Files          69       65       -4     
  Lines        3419     3351      -68     
==========================================
- Hits         3183     3111      -72     
- Misses        236      240       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@olliesilvester olliesilvester merged commit ae4ff71 into main Feb 14, 2024
4 checks passed
@olliesilvester olliesilvester deleted the 1125_ophyd_pin_tip_hotfixes branch February 14, 2024 11:01
olliesilvester added a commit to olliesilvester/mx-bluesky that referenced this pull request Aug 23, 2024
…Source/1125_ophyd_pin_tip_hotfixes

Correctly read pin tip location using ophyd
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.

Ophyd pin tip detect beamline testing 05/02
2 participants