diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-09 22:18:54 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-09 22:18:54 -0500 |
commit | b0d8504e354f1c7eace1bb1049dbb28acbd50138 (patch) | |
tree | bb5457485ff6aa57f1f46e48333d7486032c0eab /qolab/hardware/lockin | |
parent | 9e5768d7377ce84ad3cdcd9e221357c5e6719cb0 (diff) | |
download | pyExpControl-b0d8504e354f1c7eace1bb1049dbb28acbd50138.tar.gz pyExpControl-b0d8504e354f1c7eace1bb1049dbb28acbd50138.zip |
more functions for lockin
Diffstat (limited to 'qolab/hardware/lockin')
-rw-r--r-- | qolab/hardware/lockin/__init__.py | 2 | ||||
-rw-r--r-- | qolab/hardware/lockin/srs_sr865a.py | 28 |
2 files changed, 25 insertions, 5 deletions
diff --git a/qolab/hardware/lockin/__init__.py b/qolab/hardware/lockin/__init__.py index 1385fcb..799da22 100644 --- a/qolab/hardware/lockin/__init__.py +++ b/qolab/hardware/lockin/__init__.py @@ -8,7 +8,7 @@ class Lockin(BasicInstrument): self.config['FnamePrefix'] = 'lockin' self.config['Device model'] = 'Generic Lockin Without Hardware interface' self.config['FnamePrefix'] = 'lockin' - self.deviceProperties = ['FreqInt']; + self.deviceProperties = ['FreqInt', 'FreqExt', 'Harm', 'SinAmpl']; # Minimal set of methods to be implemented. pass diff --git a/qolab/hardware/lockin/srs_sr865a.py b/qolab/hardware/lockin/srs_sr865a.py index 1bddb6d..b20574b 100644 --- a/qolab/hardware/lockin/srs_sr865a.py +++ b/qolab/hardware/lockin/srs_sr865a.py @@ -1,9 +1,5 @@ from qolab.hardware.lockin import LockinSCPI -from qolab.data.trace import Trace -import re -import numpy as np - class SRS_SR865A(LockinSCPI): """ SRS SR865A lockin """ def __init__(self, resource): @@ -20,6 +16,30 @@ class SRS_SR865A(LockinSCPI): cstr = f'FreqInt {freq}' rstr = self.write(cstr) + # this one has no setter + def getFreqExt(self): + qstr = f'FreqExt?' + rstr = self.query(qstr) + return(float(rstr)) + + def getHarm(self): + qstr = f'Harm?' + rstr = self.query(qstr) + return(int(rstr)) + + def setHarm(self, harm): + cstr = f'Harm {harm}' + rstr = self.write(cstr) + + def getSinAmpl(self): + qstr = f'SLVL?' + rstr = self.query(qstr) + return(float(rstr)) + + def setSinAmpl(self, ampl): + cstr = f'SLVL {ampl}' + rstr = self.write(cstr) + if __name__ == '__main__': import pyvisa |