BCDA-APS / apstools

various tools for use with Bluesky at the APS
https://bcda-aps.github.io/apstools/latest/
Other
16 stars 9 forks source link

Candidate devices for ophyd-async support #1012

Open canismarko opened 3 weeks ago

canismarko commented 3 weeks ago

Ophyd-async is expected to hit release 1.0 in the next six months or so.

APStools does not have support for ophyd-async yet.

This issue is meant to hold candidate devices that could be submitted as PRs to apstools once the requisite support is available. For now, it's just a list for keeping track of options.

canismarko commented 3 weeks ago

A Struck SIS3820 scaler

This one is specifically configured for the spectroscopy group:

https://github.com/spc-group/haven/blob/e5cee2db97f32f9063166310b5269eb4684f5a0d/src/haven/instrument/scaler.py#L142

Before submitting the PR, I would need to factor out the bits that are not shared across APS.

canismarko commented 3 weeks ago

synApps Transform Record

This is a direct translation from the vanilla Ophyd transform record in apstools.

https://github.com/spc-group/haven/blob/async_ion_chamber/src/haven/instrument/transform.py

canismarko commented 2 weeks ago

SRS-570 PreAmplifier

More or less the same as the vanilla ophyd version in apstools except that the gain signal is properly gain (output/input) instead of its inverse, and there's also a gain_db signal that reports the gain in decibels.

https://github.com/spc-group/haven/blob/async_ion_chamber/src/haven/instrument/srs570.py

This one depends on the DerivedSignalBackend that I also added: https://github.com/spc-group/haven/blob/2489f4d0b59233bb38b9dd07551137bbb59d76de/src/haven/instrument/signal.py#L16

canismarko commented 2 weeks ago

LabJack DAQ

Very similar to the current apstools support. Since ophyd-async is more flexible about device definitions, in this version one can initalize a labjack device directly:

device = LabJackBase("255idc:LT_T7_1:", name="labjack", analog_inputs=range(12), digital_ios=range(24))

The previous subclasses (e.g. LabJackT4) still exist and are just wrappers around the base class with default values for the analog_inputs and digital_ios parameters.

Code: https://github.com/spc-group/haven/blob/async_ion_chamber/src/haven/instrument/labjack.py Tests: https://github.com/spc-group/haven/blob/async_ion_chamber/src/haven/tests/test_labjack.py

canismarko commented 3 hours ago

SRS DG-645 Delay Generator

https://github.com/spc-group/haven/blob/async-mirrors/src/haven/instrument/delay.py