aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2022-01-03 23:23:47 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2022-01-03 23:23:47 -0500
commit82ae4d4c87b2a3692f2f9927028326d251da1da5 (patch)
treeb592f546a05f6fd2ce9f59e53eabfff4dd5e619f
parent56e341a9812840c4c511de110fb405ba596df1a9 (diff)
downloadqolab-82ae4d4c87b2a3692f2f9927028326d251da1da5.tar.gz
qolab-82ae4d4c87b2a3692f2f9927028326d251da1da5.zip
using set
-rw-r--r--examples/lock_eit.py4
-rw-r--r--qolab/hardware/lockin/__init__.py4
-rw-r--r--qolab/hardware/lockin/srs_sr865a.py2
-rw-r--r--qolab/hardware/rf_generator/__init__.py2
-rw-r--r--qolab/hardware/rf_generator/agilent_e8257d.py4
-rw-r--r--qolab/hardware/scpi.py2
6 files changed, 9 insertions, 9 deletions
diff --git a/examples/lock_eit.py b/examples/lock_eit.py
index e0d8cc2..a20d984 100644
--- a/examples/lock_eit.py
+++ b/examples/lock_eit.py
@@ -304,13 +304,13 @@ async def main():
apparatus.runStatus = False
error_signal_response_to_eit_detuning = BasicInstrument(device_nickname='.'.join([app_nickname, 'error_signal_response_to_eit_detuning']), tsdb_ingester=tsdb_ingester)
- error_signal_response_to_eit_detuning.deviceProperties = ['conversion_factor', 'unit']
+ error_signal_response_to_eit_detuning.deviceProperties = {'conversion_factor', 'unit'}
error_signal_response_to_eit_detuning.conversion_factor = None
error_signal_response_to_eit_detuning.unit = 'V_per_Hz'
ai['error_signal_response_to_eit_detuning']=error_signal_response_to_eit_detuning
B_control_voltage_to_eit_detuning = BasicInstrument(device_nickname='.'.join([app_nickname, 'B_control_voltage_to_eit_detuning']), tsdb_ingester=tsdb_ingester)
- B_control_voltage_to_eit_detuning.deviceProperties = ['conversion_factor', 'unit']
+ B_control_voltage_to_eit_detuning.deviceProperties = {'conversion_factor', 'unit'}
B_control_voltage_to_eit_detuning.conversion_factor = None
B_control_voltage_to_eit_detuning.unit = 'Hz_per_V'
ai['B_control_voltage_to_eit_detuning'] = B_control_voltage_to_eit_detuning
diff --git a/qolab/hardware/lockin/__init__.py b/qolab/hardware/lockin/__init__.py
index 125e307..e6dc75b 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 = {'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/lockin/srs_sr865a.py b/qolab/hardware/lockin/srs_sr865a.py
index 968a301..a85d47f 100644
--- a/qolab/hardware/lockin/srs_sr865a.py
+++ b/qolab/hardware/lockin/srs_sr865a.py
@@ -8,7 +8,7 @@ class SRS_SR865A(LockinSCPI):
super().__init__(resource, *args, **kwds)
self.config['Device model']='SRS SR865A'
self.resource.read_termination='\n'
- self.deviceProperties.extend(['TimeBaseMode', 'AuxOut1', 'AuxOut2', 'AuxOut3', 'AuxOut4'])
+ self.deviceProperties.update({'TimeBaseMode', 'AuxOut1', 'AuxOut2', 'AuxOut3', 'AuxOut4'})
FreqInt = SCPI_PROPERTY(scpi_prfx='FreqInt', ptype=float, doc='Internal LO frequency')
FreqExt = SCPI_PROPERTY(scpi_prfx='FreqExt', ptype=float, doc='External LO frequency', no_setter=True)
diff --git a/qolab/hardware/rf_generator/__init__.py b/qolab/hardware/rf_generator/__init__.py
index 3064c54..6de404a 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 = {'FreqFixed', }
class RFGeneratorSCPI(SCPIinstr, RFGenerator):
"""
diff --git a/qolab/hardware/rf_generator/agilent_e8257d.py b/qolab/hardware/rf_generator/agilent_e8257d.py
index 7d05c0b..f13ff72 100644
--- a/qolab/hardware/rf_generator/agilent_e8257d.py
+++ b/qolab/hardware/rf_generator/agilent_e8257d.py
@@ -10,7 +10,7 @@ class AgilentE8257D(RFGeneratorSCPI):
super().__init__(resource, *args, **kwds)
self.resource.read_termination='\n'
self.config['Device model'] = 'Agilent E8257D'
- self.deviceProperties.extend([
+ self.deviceProperties.update({
'RFPowerState',
'RFAmplitude',
'ModulationState',
@@ -22,7 +22,7 @@ class AgilentE8257D(RFGeneratorSCPI):
'FM2ModulationDepth',
'FrequencyMode', # sweep or continious
'SweepCentralFreq', 'SweepSpan',
- ])
+ })
""" Note: Fixed frequency and Center frequency (of sweep) are different in this model """
diff --git a/qolab/hardware/scpi.py b/qolab/hardware/scpi.py
index 3617d05..4eab5aa 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={'x', 'y'}
c1.getConfig()
c2= DummyInstrument()