def __init__(self, band=None, #[Hz] ref=None, #(dBm) bw=None, #(Hz) shape=None,#(?) noise=None,#[dBm/Hz,Hz] gain=None, #[dB,Hz] gpib=20): #GPIB address VI.__init__(self, ANALYZER, ['band (Hz)', 'reference (dBm)', 'resolution (Hz)', 'variable shape (F)', 'noise (dBm/Hz,Hz)', 'gain (dB,Hz)', 'VISA session', 'error in (no error)'], ['signal & noise (dB vs Hz)', 'peaks (dB,Hz)', 'significance (dB)', 'resolution out (Hz)', 'VISA session out', 'error out']) self.visa = ('GPIB0::%d::INSTR' % gpib, 0) self.error = (False, 0, "") self.band=self.ref=self.bw=self.shape=None self.noise=self['noise (dBm/Hz,Hz)'] self.gain=self['gain (dB,Hz)'] self (band, ref, bw, noise, gain, shape) # configure the instrument
def __init__(self, frequency=None, power=None, gpib=11): """ Open a session with the device (GPIB address) """ VI.__init__(self, GENERATOR, ['RF on', 'frequency (Hz)', 'power (dBm)', 'VISA session', 'error in (no error)'], ['VISA session out', 'error out']) self.session = (('GPIB0::%d::INSTR' % gpib, 0), None) self.power = None self (frequency, power)
def __init__(self, band = LB + HB, # GHz gpib=20): # GPIB address VI.__init__(self, PATH, [VISA, MODE, F0, F1], [P]) self.visa = ('GPIB0::%d::INSTR' % gpib, 0) self (band)