Skip to content

Add dodal device for i03 beamstop#970

Merged
rtuck99 merged 5 commits intomainfrom
mx-bluesky_698_check_the_beamstop_is_in_position
Jan 8, 2025
Merged

Add dodal device for i03 beamstop#970
rtuck99 merged 5 commits intomainfrom
mx-bluesky_698_check_the_beamstop_is_in_position

Conversation

@rtuck99
Copy link
Contributor

@rtuck99 rtuck99 commented Dec 19, 2024

Part of fix for DiamondLightSource/mx-bluesky#698

This adds a beamstop device to the i03 beamline.

See also mx-bluesky PR 698

Instructions to reviewer on how to test:

  1. dodal connect i03 connects the beamstop
  2. tests pass

Checks for reviewer

  • Would the PR title make sense to a scientist on a set of release notes
  • If a new device has been added does it follow the standards
  • If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly
  • Have the connection tests for the relevant beamline(s) been run via dodal connect ${BEAMLINE}

@rtuck99 rtuck99 requested a review from a team as a code owner December 19, 2024 16:27
@codecov
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.48%. Comparing base (6e13d85) to head (e6ad77e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #970      +/-   ##
==========================================
+ Coverage   97.47%   97.48%   +0.01%     
==========================================
  Files         147      148       +1     
  Lines        6208     6235      +27     
==========================================
+ Hits         6051     6078      +27     
  Misses        157      157              

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

@rtuck99 rtuck99 force-pushed the mx-bluesky_698_check_the_beamstop_is_in_position branch from 23586f5 to 24da0be Compare December 20, 2024 10:52
@olliesilvester olliesilvester self-assigned this Jan 6, 2025
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, more optional comments but feel free to ignore

Comment on lines +50 to +52
self.x = Motor(prefix + "X")
self.y = Motor(prefix + "Y")
self.z = Motor(prefix + "Z")
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe better to call these, eg, x_mm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I originally modelled this after the I24 beamstop which has identically named PVs but maybe we should change them here and also look at whether we should update that one as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, personally I always prefer to include the units in names, so in I24's too

Copy link
Contributor

Choose a reason for hiding this comment

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

[When emitting bluesky documents] the units will come through as part of the descriptor document Configuration, straight from the EPICS motor record if they're configured there- is there a reason you want the units in the names here?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's just much easier to write plans when you can immediately see the units in code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We've found quite a few cases where unit conversions have been the cause of a lot of confusion, areas of the code where we thought things were in one unit but actually in another. It's much easier to spot when a conversion up or down the unit scale is missing if signals and attributes are named clearly, and it's not a big overhead - if the unit changes, you have to change the code everywhere anyway so it's not a big deal.
It's a general preference across the team.

robot load however all 3 resolution positions are the same. We also
do not use the robot load position in Hyperion.

Until we support moving the beamstop it is only necessary to check whether the
Copy link
Contributor

Choose a reason for hiding this comment

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

We could reference DiamondLightSource/mx-bluesky#484 in this comment too

@rtuck99 rtuck99 force-pushed the mx-bluesky_698_check_the_beamstop_is_in_position branch from a875604 to e6ad77e Compare January 8, 2025 10:19
@olliesilvester olliesilvester changed the title Mx bluesky 698 dodal device for i03 beamstop Add dodal device for i03 beamstop Jan 8, 2025
@rtuck99 rtuck99 merged commit b3f7688 into main Jan 8, 2025
@rtuck99 rtuck99 deleted the mx-bluesky_698_check_the_beamstop_is_in_position branch January 8, 2025 11:37
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.

3 participants