Skip to content

Expose more i04 plans#1599

Merged
jacob720 merged 13 commits intomainfrom
1593_expose_more_i04_plans
Feb 5, 2026
Merged

Expose more i04 plans#1599
jacob720 merged 13 commits intomainfrom
1593_expose_more_i04_plans

Conversation

@jacob720
Copy link
Contributor

@jacob720 jacob720 commented Feb 2, 2026

Fixes #1593

Instructions to reviewer on how to test:

  1. Do thing x
  2. Confirm thing y happens

Checks for reviewer

  • Would the PR title make sense to a user on a set of release notes

@jacob720 jacob720 requested a review from a team as a code owner February 2, 2026 12:02
@jacob720 jacob720 changed the title 1593 expose more i04 plans Expose more i04 plans Feb 2, 2026
@jacob720 jacob720 force-pushed the 1593_expose_more_i04_plans branch from d1e2514 to d74a928 Compare February 2, 2026 12:57
@jacob720 jacob720 added the i04 Changes relating to I04 label Feb 2, 2026
@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.81%. Comparing base (697759c) to head (df6a61d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1599      +/-   ##
==========================================
+ Coverage   92.80%   92.81%   +0.01%     
==========================================
  Files         152      152              
  Lines        8587     8604      +17     
==========================================
+ Hits         7969     7986      +17     
  Misses        618      618              
Components Coverage Δ
i24 SSX 78.56% <ø> (ø)
hyperion 98.21% <ø> (ø)
other 98.32% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Sorry, I didn't notice that those dodal wrapped plans already do what we want

Comment on lines 333 to 342
robot: BartRobot = inject("robot"),
beamstop: Beamstop = inject("beamstop"),
backlight: Backlight = inject("backlight"),
scintillator: Scintillator = inject("scintillator"),
xbpm_feedback: XBPMFeedback = inject("xbpm_feedback"),
max_pixel: MaxPixel = inject("max_pixel"),
centre_ellipse: CentreEllipseMethod = inject("beam_centre"),
attenuator: BinaryFilterAttenuator = inject("attenuator"),
zoom_controller: ZoomControllerWithBeamCentres = inject("zoom_controller"),
shutter: ZebraShutter = inject("sample_shutter"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Could: Make a device composite here that just lives in this file, then inject that. It'll make the code neater but isn't that important

zoom_controller: ZoomControllerWithBeamCentres = inject("zoom_controller"),
shutter: ZebraShutter = inject("sample_shutter"),
):
"""Finds the beam centre at the current zoom level. This"""
Copy link
Contributor

Choose a reason for hiding this comment

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

Random word on docstring!

LOGGER.info("Find beam centre plan completed!")


def find_beam_centre_at_current_zoom_and_transmission(
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe rename to find_and_set_beam_centre_at_current_zoom_and_transmission, it's a bit more specific

from mx_bluesky.common.utils.log import LOGGER


def move(device_or_signal: Movable, location: Any):
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I don't think we really need this file actually. We can just expose dodal/plan_stubs/wrapped to i04.py's blueapi, and add any plans to that file that we need that are missing.

@jacob720 jacob720 force-pushed the 1593_expose_more_i04_plans branch from 5468ef5 to 0080f17 Compare February 4, 2026 11:25
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.

Great, thanks! I feel like we should test out the composite injecting on the beamline, it looks magic to me. We should sit down with David to do #1609 next and see if he's happy to call these new plans that way

@olliesilvester
Copy link
Contributor

Please can you fix linting before merging

@jacob720 jacob720 enabled auto-merge (squash) February 5, 2026 09:17
@jacob720 jacob720 merged commit f94d406 into main Feb 5, 2026
26 of 27 checks passed
@jacob720 jacob720 deleted the 1593_expose_more_i04_plans branch February 5, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i04 Changes relating to I04

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose more plans to i04 BlueAPI

2 participants