diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-13 22:59:30 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-13 22:59:40 -0400 |
commit | e82c76388d458e430a4dd3cde9a1311ec8f68886 (patch) | |
tree | 2938ca87ef436e16e52358bc81bca87b31f832ea /qolab/hardware/rf_generator | |
parent | c70135ab4a2d8d75579d953a9e72a17e22712641 (diff) | |
download | qolab-e82c76388d458e430a4dd3cde9a1311ec8f68886.tar.gz qolab-e82c76388d458e430a4dd3cde9a1311ec8f68886.zip |
black formatter
Diffstat (limited to 'qolab/hardware/rf_generator')
-rw-r--r-- | qolab/hardware/rf_generator/__init__.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/qolab/hardware/rf_generator/__init__.py b/qolab/hardware/rf_generator/__init__.py index d104fe8..1518c1a 100644 --- a/qolab/hardware/rf_generator/__init__.py +++ b/qolab/hardware/rf_generator/__init__.py @@ -1,33 +1,36 @@ from qolab.hardware.scpi import SCPIinstr from qolab.hardware.basic import BasicInstrument + class RFGenerator(BasicInstrument): """Minimal set of methods to be implemented by a RF Generator. Intended to be used as a parent for hardware aware classes. """ + def __init__(self, *args, **kwds): BasicInstrument.__init__(self, *args, **kwds) - self.config['Device type']='RFGenerator' - self.config['Device model'] = 'Generic RF generator Without Hardware interface' - self.config['FnamePrefix'] = 'rfgen' - self.deviceProperties.update({'FreqFixed'}) + self.config["Device type"] = "RFGenerator" + self.config["Device model"] = "Generic RF generator Without Hardware interface" + self.config["FnamePrefix"] = "rfgen" + self.deviceProperties.update({"FreqFixed"}) + class RFGeneratorSCPI(SCPIinstr, RFGenerator): """SCPI aware RF generator. - + Example ------- >>> rm = pyvisa.ResourceManager() >>> RFGeneratorSCPI(rm.open_resource('TCPIP::192.168.0.2::INSTR')) """ + def __init__(self, resource, *args, **kwds): SCPIinstr.__init__(self, resource) RFGenerator.__init__(self, *args, **kwds) - self.config['DeviceId'] = str.strip(self.idn) - -from .agilent_e8257d import AgilentE8257D -from .qol_lmx2487 import QOL_LMX2487 + self.config["DeviceId"] = str.strip(self.idn) +from .agilent_e8257d import AgilentE8257D +from .qol_lmx2487 import QOL_LMX2487 |