Previously, the function pcdsdevices.util.set_many() worked with Signal objects, but failed with Positioner objects. This is because Positioner.set() does not accept a settle_time argument. This change inspects each object's set() method to determine which keyword arguments it should provide.
Motivation and Context
I like the MultiDerivedSignal that depends on set_many, but it is limited to being derived from signals. With this change it can alse derive from positioners.
How Has This Been Tested?
I added a test for the set_many function. The set_many() call used in this test includes both a positioner and a regular Ophyd Signal.
I still need to test this in my client library, so for now it's a draft PR for feedback and discussion.
Where Has This Been Documented?
The interface has not changed, so some comments are included in the code and the test. Client code should not notice a difference.
Pre-merge checklist
[ ] Code works interactively
[x] Code contains descriptive docstrings, including context and API
[ ] New/changed functions and methods are covered in the test suite where possible
[x] Test suite passes locally
[x] Test suite passes on GitHub Actions
[ ] Ran docs/pre-release-notes.sh and created a pre-release documentation page
[ ] Pre-release docs include context, functional descriptions, and contributors as appropriate
… signals.
Description
Previously, the function
pcdsdevices.util.set_many()
worked with Signal objects, but failed with Positioner objects. This is because Positioner.set() does not accept asettle_time
argument. This change inspects each object'sset()
method to determine which keyword arguments it should provide.Motivation and Context
I like the MultiDerivedSignal that depends on set_many, but it is limited to being derived from signals. With this change it can alse derive from positioners.
How Has This Been Tested?
I added a test for the
set_many
function. Theset_many()
call used in this test includes both a positioner and a regular Ophyd Signal.I still need to test this in my client library, so for now it's a draft PR for feedback and discussion.
Where Has This Been Documented?
The interface has not changed, so some comments are included in the code and the test. Client code should not notice a difference.
Pre-merge checklist