# QCoDeS Example with Signal Hound USB-SA124B

Please also note the extensions to this driver in Qcodes example with Signal Hound USB-SA124B ParameterWithSetpoints

[1]:

%matplotlib notebook

[2]:

from qcodes.dataset.measurements import Measurement
from qcodes.dataset.plotting import plot_by_id

[3]:

from qcodes.instrument_drivers.signal_hound.USB_SA124B import SignalHound_USB_SA124B

[4]:

sh = SignalHound_USB_SA124B('mysignalhound')

Connected to: Signal Hound sa124B (serial:17172185, firmware:Version 3.13) in 6.21s


## Frequency trace

The primary functionality of the Signal Hound driver is to capture a frequency trace. The frequency trace is defined by the center frequency and span. After changing any parameter on the Signal Hound is is important to sync the parameters to the device or you will get a runtime error.

[5]:

sh.frequency(1e9)
sh.span(10e6)
sh.configure()


We can now capture a trace.

[6]:

meas = Measurement()
meas.register_parameter(sh.trace)

with meas.run() as datasaver:
runid = datasaver.run_id

Starting experimental run with id: 357

[7]:

plot_by_id(runid)

[7]:

([<matplotlib.axes._subplots.AxesSubplot at 0x158d5573d68>], [None])


In this case we are not measuring any signal so as expected we see noise

## Averaging

The driver supports averaging over multiple traces simply by setting the number of averages

[8]:

sh.avg(10)

[9]:

meas = Measurement()
meas.register_parameter(sh.trace)

with meas.run() as datasaver:
runid = datasaver.run_id

Starting experimental run with id: 358

[10]:

plot_by_id(runid)

[10]:

([<matplotlib.axes._subplots.AxesSubplot at 0x158d68410b8>], [None])


We note that the spread of the noise level has gone down compared to a single measurement

## Power

The Spectrum Analyzer also supports measuring the power at a specific frequency. This works by capturing a trace with a span of 250 KHz (The minimum supported)around the center frequency and returning the maximum value in that range.

[11]:

sh.power()

[11]:

-98.23629913330078

[12]:

sh.close()