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

(#1354) update Hyperion to use the new ApertureScatterguard #1356

Merged
merged 3 commits into from
May 7, 2024

Conversation

d-perl
Copy link
Contributor

@d-perl d-perl commented May 7, 2024

Fixes #1354

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

To test:

  1. Run tests

@d-perl d-perl force-pushed the 1354_update_ap_sg branch from e424056 to 057010d Compare May 7, 2024 11:47
Copy link
Collaborator

@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.

Great, thank you, couple of ways to tidy up. I assume you'd missed set_sim_value, it plays nicely with types :)

Comment on lines 192 to 193
motor.user_setpoint._backend._set_value(val) # type: ignore
motor.user_readback._backend._set_value(val) # type: ignore
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should: I think it's cleaner to do:

Suggested change
motor.user_setpoint._backend._set_value(val) # type: ignore
motor.user_readback._backend._set_value(val) # type: ignore
set_sim_value(motor.user_setpoint, val)
set_sim_value(motor.user_readback, val)

Similarly elsewhere in this file

Comment on lines 493 to 494
ap_sg.aperture.z.user_setpoint._backend._set_value(2) # type: ignore
ap_sg.aperture.z.motor_done_move._backend._set_value(1) # type: ignore
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should: I think you can just set patch_async_motor(ap_sg.aperture.z, 2), below and then remove these 2 lines

@d-perl d-perl requested a review from DominicOram May 7, 2024 12:40
Copy link
Collaborator

@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.

Missed a set_sim_value, otherwise good, thanks.

tests/conftest.py Outdated Show resolved Hide resolved
Co-authored-by: Dominic Oram <[email protected]>
@d-perl d-perl merged commit b70731e into main May 7, 2024
4 checks passed
@d-perl d-perl deleted the 1354_update_ap_sg branch May 7, 2024 13:30
olliesilvester pushed a commit to olliesilvester/mx-bluesky that referenced this pull request Aug 23, 2024
…Source/1354_update_ap_sg

(DiamondLightSource/hyperion#1354) update Hyperion to use the new ApertureScatterguard
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.

Update for new ApertureScatterguard
2 participants