qtics.instruments.keysight package#

Keysight instrument drivers.

Submodules#

qtics.instruments.keysight.n9916a module#

Controller of the N9916A FieldFox Handheld Microwave Analyzer by Keysight.

class qtics.instruments.keysight.n9916a.N9916A(transport: Transport | str, name: str = '', max_points: int = 10001, **transport_kwargs)[source]#

Bases: SweptInstrument, SCPIInstrument

N9916A FieldFox Handheld Microwave Analyzer by Keysight.

Common part of the operational modes of the instrument. The modes are implemented by VNAN9916A and SAN9916A.

abstract autoscale()[source]#

Autoscale selected trace.

property averages: int#

The number of sweep averages.

clear()[source]#

Clear the error queue and all status registers.

abstract clear_average()[source]#

Reset averaging.

property continuous: bool#

Whether the instrument sweeps continuously.

property data_format: str#

Get data format.

property f_center: float#

Central frequency [Hz].

property f_span: float#

Frequency span [Hz].

property f_start: float#

Start frequency [Hz].

property f_stop: float#

Stop frequency [Hz].

hold()[source]#

Wait until all commands have been processed.

property points: int#

Number of points in sweep.

abstract read_freqs()[source]#

Read trace frequencies from the instrument.

abstract read_trace_data(yformat=None)[source]#

Read trace data from the instrument.

snapshot(yformat=None, **kwargs) → Tuple[ndarray, ndarray][source]#

Set the given parameters, sweep once and return (frequencies, trace).

survey(f_win_start, f_win_end, f_win_size, **kwargs) → Tuple[ndarray, ndarray][source]#

Execute multiple scans with higher resolution.

property sweep_meas_time: float#

Time to complete a measurement sweep [s].

property sweep_time: float#

Time to complete a sweep [s].

write_and_hold(cmd: str)[source]#

Write command and wait until it has been processed.

class qtics.instruments.keysight.n9916a.SAN9916A(transport: Transport | str, name: str = '', max_points: int = 10001, **transport_kwargs)[source]#

Bases: N9916A, SpectrumAnalyzer

Spectrum Analyzer mode of the N9916A.

The same physical instrument is driven in VNA mode by VNAN9916A: connect only one of the two classes at a time, since each one switches the mode of the instrument when connecting.

property attenuation: float#

RF attenuation value.

property auto_attenuation: bool#

Automatic RF attenuation.

property auto_rbw: bool#

Automatic resolution bandwidth.

autoscale()[source]#

Autoscale all traces.

property average_type: str#

The average type (sweeping or point by point).

clear_average()[source]#

Restart averaging from 1.

property gain: bool#

Automatic gain selection.

property rbw: float#

Resolution bandwidth value [Hz].

read_freqs() → ndarray[source]#

Compute the measured frequencies array.

read_trace_data(yformat=None) → ndarray[source]#

Read the trace of the last sweep, call sweep() first.

set_full_span()[source]#

Set the frequency span to the entire span of the FieldFox.

set_zero_span()[source]#

Set the frequency span to 0 Hz around the center frequency.

sweep()[source]#

Perform a sweep considering averaging (continuous mode waits instead).

property trace_type: str#

Displayed trace mode.

property yformat: str#

Measurement unit of the data amplitude.

property yscale: str#

Scale of the amplitude axis.

class qtics.instruments.keysight.n9916a.VNAN9916A(transport: Transport | str, name: str = '', max_points: int = 10001, **transport_kwargs)[source]#

Bases: N9916A, VNA

VNA mode of the N9916A.

The same physical instrument is driven in SA mode by SAN9916A: connect only one of the two classes at a time, since each one switches the mode of the instrument when connecting.

activate_trace()[source]#

Make active the selected trace.

autoscale()[source]#

Autoscale selected trace.

property average_mode: str#

The average mode (sweeping or point by point).

clear_average()[source]#

Reset averaging.

property ifbw: float#

IF bandwidth of the receiver [Hz].

property power: float#

Output signal power [dBm].

read_freqs() → ndarray[source]#

Read frequencies.

read_trace_data(yformat=None) → ndarray[source]#

Read unformatted IQ data (complex) or formatted trace data.

The data of the last sweep is read, call sweep() first.

property s_parameter: str#

The current scattering matrix parameter.

setup(s_parameter='S21')[source]#

Configure standard measurement.

property smoothing: int#

Number of point in smoothing window.

sweep()[source]#

Perform a sweep measurement considering averaging and average mode.

property yformat: str#

Scale and format of data.