SHF Sweeper Module

class zhinst.toolkit.control.drivers.base.SHFSweeper(parent: zhinst.toolkit.control.drivers.base.shf_qachannel.SHFQAChannel)

Implements a Sweeper representation for SHF devices.

The SHFSweeper class implements basic sweeper functionality of the SHF instrument.

For example, the sweeper can be configured to run a spectroscopy measurement like this:

>>> qachannel = shf.qachannels[0]
>>> sweeper = qachannel.sweeper
>>> # Set the mode to `spectroscopy`
>>> qachannel.mode("spectroscopy")
>>> # Set center frequency
>>> qachannel.center_freq(8e9)
>>> # Configure input
>>> qachannel.input_range(0)
>>> qachannel.input("on")
>>> # Configure output
>>> qachannel.output_range(0)
>>> qachannel.output("on")
>>> # Trigger settings
>>> sweeper.trigger_source("channel0_trigger_input0")
>>> sweeper.trigger_level(0)
>>> sweeper.trigger_imp50(1)
>>> # Sweep settings
>>> sweeper.oscillator_gain(0.8)
>>> sweeper.start_frequency(0)
>>> sweeper.stop_frequency(200e6)
>>> sweeper.num_points(51)
>>> sweeper.mapping("linear")
>>> # Averaging settings
>>> sweeper.integration_time(100e-6)
>>> sweeper.num_averages(2)
>>> sweeper.averaging_mode("sequential")

To run the measurement:

>>> sweeper.run()
Run a sweep with 51 frequency points in the range of [0.0, 200.0] MHz + 8.0 GHz.
Mapping is linear.
Dwell time = 0.0001 sec.
Measures 2 times per frequency point.
Averaging mode is sequential.
Sweep at 200.00MHz.

Obtain and plot the results:

>>> result=sweeper.get_result()
>>> sweeper.plot()
parent

The parent qachannel that this SHFSweeper is associated to.

Type

SHFQAChannel

device

The instrument that this SHFSweeper is associated to.

Type

BaseInstrument

index

An integer specifying the index in the instrument.

Type

int

name

The name of the SHFSweeper.

Type

str

plot()

Plot power over frequency for last sweep.

This method eventually wraps around the plot method of zhinst.utils.shf_sweeper

read()

Get the measurement data of the last sweep.

This method eventually wraps around the get_result method of zhinst.utils.shf_sweeper

Returns

A dictionary with measurement data of the last sweep

run()

Perform a sweep with the specified settings.

This method eventually wraps around the run method of zhinst.utils.shf_sweeper