DiamondLightSource / DiamondLightSource/dodal

Remove UndulatorDCM composite device

Open
#1,092 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5
Forks
13
Avg merge
3d 2h
Merged PRs (30d)
10

Description

The `UndulatorDCM` composite device was created so you can change beamline energy in Bluesky by acting on a single device, with the logic abstracted away. However, this is causing some issues

- Setting energy sometimes requires more devices than just these two, eg `MirrorVoltages`
- Typing gets messy if a function which expects there to an `Undulator` instead sees an `UndulatorDCM`
- Logic acting over multiple devices should (arguably) belong in a Bluesky plan

I propose we remove this composite device, and its the logic can be moved into Hyperion's `set_energy_plan`. As far as I'm aware, it isn't being used anywhere else. @DiamondLightSource/bluesky-reviewers @stan-dot please let me know if this device is being used anywhere else!

At a later date, a generic `change_energy` plan can be made in dodal

## Acceptance Criteria
- UndulatorDCM removed
- The logic in the above is moved to [Hyperion's set_energy_plan](https://github.com/DiamondLightSource/mx-bluesky/blob/main/src/mx_bluesky/hyperion/experiment_plans/set_energy_plan.py)
- Document that we shouldn't create composite devices in this way (if people agree with me on that)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.