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

Refactor ApertureScatterguard to return individual signals #769

Merged
merged 7 commits into from
Sep 3, 2024

Conversation

DiamondJoseph
Copy link
Contributor

Fixes an issue discovered as part of #679, bluesky/ophyd-async#550 (comment) : SoftConverter is no longer exported from ophyd_async as of 0.5.0, and @coretl @danielballan think that bluesky/ophyd-async#310 should not include being able to pass arbitrary objects, only those that are tableable [tabulable? tabulatable?]. This change therefore adjusts how the ApertureScatterguard returns its signals to be nested under its child devices but as invidual signals.

Instructions to reviewer on how to test:

  1. Ensure that the ApertureScatterguard can still connect and be read
  2. The documents for the signals contained inside the device should only use primitive float types.

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}

@DiamondJoseph
Copy link
Contributor Author

This then becomes a requirement for #679

@DiamondJoseph DiamondJoseph force-pushed the refactor-aperture branch 3 times, most recently from 9b61f5d to c471427 Compare September 2, 2024 14:20
@DiamondJoseph
Copy link
Contributor Author

Making a Hyperion patchset now

@DiamondJoseph DiamondJoseph marked this pull request as ready for review September 2, 2024 14:21
Copy link

codecov bot commented Sep 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.52%. Comparing base (8702cc8) to head (a2f1e77).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #769      +/-   ##
==========================================
- Coverage   94.52%   94.52%   -0.01%     
==========================================
  Files         115      115              
  Lines        4621     4599      -22     
==========================================
- Hits         4368     4347      -21     
+ Misses        253      252       -1     

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

Copy link
Collaborator

@dperl-dls dperl-dls left a comment

Choose a reason for hiding this comment

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

This is great, thanks

aperture_z: float
scatterguard_x: float
scatterguard_y: float
radius: float | None = Field(json_schema_extra={"units": "µm"}, default=None)
Copy link
Collaborator

Choose a reason for hiding this comment

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

❤️

@DiamondJoseph DiamondJoseph merged commit 148e24d into main Sep 3, 2024
17 of 18 checks passed
@DiamondJoseph DiamondJoseph deleted the refactor-aperture branch September 3, 2024 13:56
@DominicOram
Copy link
Contributor

DominicOram commented Sep 12, 2024

A side effect of this is that we're no longer reading the state of the hardware whenever we read selected_aperture. This means that the device itself is holding on to the state of the beamline based on what state it last moved to. This means that the state could be wrong if:

  • The device has just been initialised
  • The hardware has been moved via EPICS/manually
  • There was a failure in moving the device

Was this a deliberate design decision @DiamondJoseph?

I think this is a definite issue, made #782. Feel free to comment on there if you disagree.

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