aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2022-06-14 22:55:36 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2022-06-14 22:55:36 -0400
commit8f105c24e5b42bb321daf2b66d5c3fedcebfb246 (patch)
tree9bb3fd2df50b5d92b5c95751af34999d8b73ba1d /qolab/hardware
parente3a75169865ad47148586ad99b75ceffdd6345be (diff)
downloadqolab-8f105c24e5b42bb321daf2b66d5c3fedcebfb246.tar.gz
qolab-8f105c24e5b42bb321daf2b66d5c3fedcebfb246.zip
proper inheritance of the parent deviceProperties
Diffstat (limited to 'qolab/hardware')
-rw-r--r--qolab/hardware/daq/__init__.py2
-rw-r--r--qolab/hardware/i_server/i800.py2
-rw-r--r--qolab/hardware/lockin/__init__.py4
-rw-r--r--qolab/hardware/power_supply/__init__.py2
-rw-r--r--qolab/hardware/power_supply/keysight_e3612a.py2
-rw-r--r--qolab/hardware/rf_generator/__init__.py2
-rw-r--r--qolab/hardware/scope/__init__.py2
-rw-r--r--qolab/hardware/scpi.py2
8 files changed, 9 insertions, 9 deletions
diff --git a/qolab/hardware/daq/__init__.py b/qolab/hardware/daq/__init__.py
index d0798c6..89543a6 100644
--- a/qolab/hardware/daq/__init__.py
+++ b/qolab/hardware/daq/__init__.py
@@ -7,7 +7,7 @@ class DAQ(BasicInstrument):
self.config['Device type']='DAQ'
self.config['Device model'] = 'Generic DAQ Without Hardware interface'
self.config['FnamePrefix'] = 'daq'
- self.deviceProperties = {'AnalogInputsNum', 'AnalogOutputsNum' }
+ self.deviceProperties.update({'AnalogInputsNum', 'AnalogOutputsNum'})
# this is device dependent
self.AnalogInputsNum=0
diff --git a/qolab/hardware/i_server/i800.py b/qolab/hardware/i_server/i800.py
index 264316a..89042d5 100644
--- a/qolab/hardware/i_server/i800.py
+++ b/qolab/hardware/i_server/i800.py
@@ -31,7 +31,7 @@ class I800(BasicInstrument):
self.config['Device type']='TemperatureController'
self.config['Device model'] = 'i800'
self.config['FnamePrefix'] = 'temperature'
- self.deviceProperties = {'Temperature', 'SetPoint1', 'SetPoint2'}
+ self.deviceProperties.update({'Temperature', 'SetPoint1', 'SetPoint2'})
def query(self, cmnd, trials=10):
modbus_cmnd = f'{self.modbus_address}{cmnd}'
diff --git a/qolab/hardware/lockin/__init__.py b/qolab/hardware/lockin/__init__.py
index e6dc75b..ab862cb 100644
--- a/qolab/hardware/lockin/__init__.py
+++ b/qolab/hardware/lockin/__init__.py
@@ -8,9 +8,9 @@ class Lockin(BasicInstrument):
self.config['FnamePrefix'] = 'lockin'
self.config['Device model'] = 'Generic Lockin Without Hardware interface'
self.config['FnamePrefix'] = 'lockin'
- self.deviceProperties = {'FreqInt', 'FreqExt', 'Harm', 'SinAmpl', 'SinOffset',
+ self.deviceProperties.update({'FreqInt', 'FreqExt', 'Harm', 'SinAmpl', 'SinOffset',
'RefPhase',
- 'Sensitivity', 'TimeConstan', 'FilterSlope', 'EquivalentNoiseBW'};
+ 'Sensitivity', 'TimeConstan', 'FilterSlope', 'EquivalentNoiseBW'})
# Minimal set of methods to be implemented.
pass
diff --git a/qolab/hardware/power_supply/__init__.py b/qolab/hardware/power_supply/__init__.py
index b1083cf..5ec4ab9 100644
--- a/qolab/hardware/power_supply/__init__.py
+++ b/qolab/hardware/power_supply/__init__.py
@@ -8,7 +8,7 @@ class PowerSupply(BasicInstrument):
self.config['Device type']='PowerSupply'
self.config['Device model'] = 'Generic Power Supply generator Without Hardware interface'
self.config['FnamePrefix'] = 'power_supply'
- self.deviceProperties = { }
+ self.deviceProperties.update({})
class PowerSupplySCPI(SCPIinstr, PowerSupply):
"""
diff --git a/qolab/hardware/power_supply/keysight_e3612a.py b/qolab/hardware/power_supply/keysight_e3612a.py
index e106279..b241b30 100644
--- a/qolab/hardware/power_supply/keysight_e3612a.py
+++ b/qolab/hardware/power_supply/keysight_e3612a.py
@@ -9,7 +9,7 @@ class KeysightE3612A(PowerSupplySCPI):
self.resource.read_termination='\n'
self.config['Device model'] = 'Keysight E3612A'
self.numberOfChannels = 3
- self.deviceProperties = {'OpMode', };
+ self.deviceProperties.update({'OpMode'})
self.channelProperties = {'IsOn', 'Regulation', 'Vout', 'Vlimit', 'Iout', 'Ilimit', 'dV', 'dI', }
self.deffaultChannelR = 47; # used if no empirical way to calculate it via Vout/Iout
diff --git a/qolab/hardware/rf_generator/__init__.py b/qolab/hardware/rf_generator/__init__.py
index efa1af4..9c99eca 100644
--- a/qolab/hardware/rf_generator/__init__.py
+++ b/qolab/hardware/rf_generator/__init__.py
@@ -8,7 +8,7 @@ class RFGenerator(BasicInstrument):
self.config['Device type']='RFGenerator'
self.config['Device model'] = 'Generic RF generator Without Hardware interface'
self.config['FnamePrefix'] = 'rfgen'
- self.deviceProperties = {'FreqFixed', }
+ self.deviceProperties.update({'FreqFixed'})
class RFGeneratorSCPI(SCPIinstr, RFGenerator):
"""
diff --git a/qolab/hardware/scope/__init__.py b/qolab/hardware/scope/__init__.py
index debe668..3bca8f0 100644
--- a/qolab/hardware/scope/__init__.py
+++ b/qolab/hardware/scope/__init__.py
@@ -19,7 +19,7 @@ class Scope(BasicInstrument):
# deviceProperties must have 'get' and preferably 'set' methods available,
# i.e. 'SampleRate' needs getSampleRate() and love to have setSampleRate(value)
# they will be used to obtain config and set device according to it
- self.deviceProperties = {'SampleRate', 'TimePerDiv', 'TrigDelay', 'TriggerMode', 'Roll', 'Run' };
+ self.deviceProperties.update({'SampleRate', 'TimePerDiv', 'TrigDelay', 'TriggerMode', 'Roll', 'Run' })
# same is applied to channelProperties but we need setter/getter with channel number
# i.e. VoltsPerDiv -> getChanVoltsPerDiv(chNum) and setSampleRate(chNum, value)
self.channelProperties = {'VoltsPerDiv', 'VoltageOffset', }
diff --git a/qolab/hardware/scpi.py b/qolab/hardware/scpi.py
index 4eab5aa..328e261 100644
--- a/qolab/hardware/scpi.py
+++ b/qolab/hardware/scpi.py
@@ -199,7 +199,7 @@ if __name__ == '__main__':
z = SCPI_PROPERTY(scpi_prfx='SETY', ptype=int, no_getter=True, doc='property Z')
c1= DummyInstrument()
- c1.deviceProperties={'x', 'y'}
+ c1.deviceProperties.update({'x', 'y'})
c1.getConfig()
c2= DummyInstrument()