diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-09 21:20:52 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-09 21:20:52 -0500 |
commit | 13892e556d475cf34ae4e2424d45ff93580dca26 (patch) | |
tree | fee53fd6663c326994bc8817da7a88caa9b9eccb /qolab/hardware/rf_generator/agilent_e8257d.py | |
parent | 5cda6142ddd092f8d7ea9da25ab4794108eb30cb (diff) | |
download | qolab-13892e556d475cf34ae4e2424d45ff93580dca26.tar.gz qolab-13892e556d475cf34ae4e2424d45ff93580dca26.zip |
simplified rf generator
Diffstat (limited to 'qolab/hardware/rf_generator/agilent_e8257d.py')
-rw-r--r-- | qolab/hardware/rf_generator/agilent_e8257d.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/qolab/hardware/rf_generator/agilent_e8257d.py b/qolab/hardware/rf_generator/agilent_e8257d.py index eef3c7a..c98f0f1 100644 --- a/qolab/hardware/rf_generator/agilent_e8257d.py +++ b/qolab/hardware/rf_generator/agilent_e8257d.py @@ -8,15 +8,17 @@ class AgilentE8257D(RFGeneratorSCPI): def __init__(self, resource): super().__init__(resource) self.resource.read_termination='\n' + self.config['Device model'] = 'Agilent E8257D' + self.deviceProperties.extend(['SweepCentralFreq', 'SweepSpan', ]) """ Note: Fixed frequency and Center frequency (of sweep) are different in this model """ - def getFreq(self): + def getFreqFixed(self): qstr = f':FREQuency:Fixed?' rstr = self.query(qstr) return( float(rstr) ) - def setFreq(self, freq): + def setFreqFixed(self, freq): cstr = f':FREQuency:FIXED {freq}Hz' self.write(cstr) @@ -51,7 +53,7 @@ if __name__ == '__main__': print(rm.list_resources()) instr=rm.open_resource('TCPIP::192.168.0.114::INSTR') rfgen = AgilentE8257D(instr) - print(f'Fixed frequency: {rfgen.getFreq()}') - print(f'Sweep Central frequency: {rfgen.getSweepCentralFreq()}') - print(f'Sweep Span: {rfgen.getSweepSpan()}') + print('------ Header start -------------') + print(str.join('\n', rfgen.getHeader())) + print('------ Header ends -------------') |