Skip to content

Support for mod-360 omega#1640

Open
rtuck99 wants to merge 21 commits intomainfrom
1598_mod_360
Open

Support for mod-360 omega#1640
rtuck99 wants to merge 21 commits intomainfrom
1598_mod_360

Conversation

@rtuck99
Copy link
Copy Markdown
Contributor

@rtuck99 rtuck99 commented Feb 24, 2026

Fixes

Requires

Implements robot load at mod-360 values of omega and subsequent operations using the phase-angle of the omega axis rather than absolute values.

(remember to update pyproject.toml with the dodal commit tag if you need it for tests to pass!)

Instructions to reviewer on how to test:

  1. Robot loads can occur at 0, 360 or other multiples of 360 degrees
  2. All subsequent omega moves to specific phase angles are made using shortest-path rotations.
  3. Snapshot filenames, omega start and end angles in ISPyB and nexus files are unchanged and report values which report reduced, sign-corrected angles (i.e. respect the omega flip so 0-360 becomes 360-0)
  4. XRC resolves correct centres.
  5. Probably best to test with multipin in order to test generated snapshots and alternating rotations

Checks for reviewer

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

Copy link
Copy Markdown
Contributor

@DominicOram DominicOram left a comment

Choose a reason for hiding this comment

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

Thanks, some comments

if (omega_start := doc.get("gonio-omega")) is not None:
omega_in_gda_space = -omega_start
if (
omega_offset_and_phase := doc.get("gonio-omega_axis-offset_and_phase")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should: Why can't we just read gonio-omega_axis-phase here?

else direction.NEGATIVE
)

start_scan_deg = reference_angle.nearest_to_phase(start_scan_deg).unwrap()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should: The reference angle is presumably needed because the zebra is still in the old co-ordinate system? Did you think about setting the position on the zebra so that it is in the new co-ordinate system, see attached:

Image

I think this will get us more on the way to the underlying motor behaviour being invisible at the plan level.

Copy link
Copy Markdown
Contributor Author

@rtuck99 rtuck99 Apr 7, 2026

Choose a reason for hiding this comment

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

We could do this, however I don't think we should be making plans agnostic to phase vs absolute angle because they are distinct concepts with different properties. If we made this change, and then subsequently decided to change omega to be wrapped, we would still have to read the unwrapped omega from somewhere and apply it to POS4_SET PV so I don't think it really gains us anything.

@rtuck99 rtuck99 added the hyperion Issues for Hyperion, the Bluesky UDC stack label Mar 30, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.88%. Comparing base (62c0c9a) to head (164d253).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1640      +/-   ##
==========================================
+ Coverage   92.87%   92.88%   +0.01%     
==========================================
  Files         155      155              
  Lines        8494     8506      +12     
==========================================
+ Hits         7889     7901      +12     
  Misses        605      605              
Components Coverage Δ
i24 SSX 77.35% <ø> (ø)
hyperion 98.59% <100.00%> (+<0.01%) ⬆️
other 98.31% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rtuck99 rtuck99 marked this pull request as ready for review April 7, 2026 15:49
@rtuck99 rtuck99 requested a review from a team as a code owner April 7, 2026 15:49
@rtuck99 rtuck99 requested a review from DominicOram April 7, 2026 15:49
@rtuck99 rtuck99 mentioned this pull request Apr 9, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hyperion Issues for Hyperion, the Bluesky UDC stack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants