steelelab-delft/stlab

RBW on SAs

Closed this issue · 1 comments

Since the resolution bandwidth is an essential value, it should by default be recorded when taking a trace

stlab/devices/RS_FSV.py

Lines 95 to 114 in ac73000

def MeasureScreen(self, ch=1):
measmode = self.GetMode()
yunit = self.GetUnit()
if measmode == 'SAN':
self.SetContinuous(False)
self.write('INIT')
# sleep for averaging time, otherwise timeout
navg = self.GetAverages()
tt = self.GetSweepTime()
time.sleep(navg * tt)
xvals = self.query('TRAC:DATA:X? TRACE{}'.format(ch))
yvals = self.query('TRAC? TRACE{}'.format(ch))
xvals = np.array([float(x) for x in xvals.split(',')])
yvals = np.array([float(x) for x in yvals.split(',')])
output = pd.DataFrame()
output['Frequency (Hz)'] = xvals
output['Spectrum (' + yunit + ')'] = yvals
return output
else:
return KeyError('Instrument mode unknown!')

Fixed in 4471fd2