-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add device support for SRS570 from synApps #543
Conversation
prjemian
commented
Oct 1, 2021
•
edited
Loading
edited
- FIX SRS570 amplifier #541
- FIX generalize preamplifier Devices #544
Compare with other preamplifiers and generalize: Keithley 428 and Femto (USAXS has both). Might be suitable as |
@prjemian: I double checked all the "value" PVs in the SRS570, and you either get the state number or a string with the value. |
I'm seeing the same, thinking that is a legacy misdirection. Numerical values should be numbers, not strings. Can they be forced into numbers? Not directly, as shown: (bluesky_2021_2) prjemian@zap:~/.../BCDA-APS/apstools$ ipython
Python 3.8.10 (default, May 19 2021, 18:05:58)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.22.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import ophyd
In [2]: !caput gp:gp:text1 "1.0"
Old : gp:gp:text1
New : gp:gp:text1 1.0
In [3]: sens = ophyd.EpicsSignal("gp:gp:text1", name="sens", string=False)
In [4]: type(sens.get())
Out[4]: str |
Can we subclass to force these to numbers? thinking: |
On closer examination, The mapping between mbbo index of |
ConclusionTo make this a subclass of |
Since other synApps hardware device support is located under |
Also, let pint handle the units conversions. Example: In [57]: for units in amp.sensitivity_unit.enum_strs:
...: print(units, pint.Quantity(200, units).to("A/V").magnitude)
...:
pA/V 2e-10
nA/V 2.0000000000000002e-07
uA/V 0.00019999999999999998 Note: this will make pint a new requirement for apstools |
Example: In [59]: amp = SRS570_PreAmplifier("8idi:A1", name="amp")
In [60]: amp.gain
Out[60]: 0.00019999999999999998 |
If the gain was an |
Setting a precedent for current amplifiers (pre-amps) here that |