qtics.instruments.rohde_schwarz package#

Rohde & Schwarz instruments.

Submodules#

qtics.instruments.rohde_schwarz.fsv3030 module#

Controller of the R&S FSV3030 Spectrum Analyzer.

class qtics.instruments.rohde_schwarz.fsv3030.FSV3030(transport: Transport | str, name: str = 'FSV3030', **transport_kwargs)[source]#

Bases: SpectrumAnalyzer, SCPIInstrument

R&S FSV3030 Spectrum Analyzer by Rohde & Schwarz.

autoscale()[source]#

Autoscale display (adjust reference level and range).

clear_max_hold(trace: int = 1)[source]#

Clear the max-hold trace (reset).

property continuous: bool#

Whether the instrument sweeps continuously.

property detector: str#

Detector type.

property f_center: float#

Center frequency in Hz.

property f_span: float#

Frequency span in Hz.

property f_start: float#

Start frequency in Hz.

property f_stop: float#

Stop frequency in Hz.

marker_freq(marker: int = 1) → float[source]#

Query marker frequency.

marker_power(marker: int = 1) → float[source]#

Query marker power in dBm.

marker_to_peak(marker: int = 1)[source]#

Move marker to maximum peak.

property points: int#

Number of sweep points.

property rbw: float#

Resolution bandwidth (Hz).

read_freqs() → ndarray[source]#

Return frequency axis corresponding to current span.

read_max_hold(trace: int = 1) → ndarray[source]#

Read the max-hold trace accumulated since set_max_hold, without resetting.

read_trace_data(trace: int = 1) → ndarray[source]#

Read the trace (in dBm) as a numpy array, without sweeping.

property ref_level: float#

Reference level in dBm.

set_max_hold(trace: int = 1)[source]#

Set a trace to max-hold mode.

snapshot(trace: int = 1) → tuple[numpy.ndarray, numpy.ndarray][source]#

Perform single sweep and return (freqs, trace).

sweep()[source]#

Run a single sweep, switching continuous mode off, and wait for it.

property sweep_time: float#

Sweep time in seconds.

property vbw: float#

Video bandwidth (Hz).

qtics.instruments.rohde_schwarz.sma100b module#

Controller of the R&S SMA100B RF and microwave signal generator.

class qtics.instruments.rohde_schwarz.sma100b.SMA100B(transport: Transport | str, name: str = 'SMA100B', **transport_kwargs)[source]#

Bases: RFSource, SCPIInstrument

R&S SMA100B RF and microwave signal generator by Rohde & Schwarz.

The RF level readback depends on the power unit set with p_unit. To comply with the RFSource interface (power in dBm), the unit is set to dBm right after connecting. p_unit stays available, but changing it makes power read and write in that unit.

Frequencies are the displayed ones, f_rf * f_mult + f_offset: their range follows the multiplier and offset of a downstream instrument. These are read when connecting and tracked by the f_mult/f_offset properties (a change from the front panel is seen after reading them or reconnecting).

cal(opt: str) → str[source]#

Query the device to perform internal adjustments.

Valid options to query: - MEAS: Starts all internal adjustments that do not need external measuring equipment - DATE: Queries the date of the most recently executed full adjustment - INF: Queries the current state of the internal adjustment - TEMP: Queries the temperature deviation compared to the calibration temperature - TIME: Queries the time elapsed since the last full adjustment

default_transport#

alias of SocketTransport

diag(opt: str) → str[source]#

Query the device to perform diagnosis and servicing.

Valid options to query: - OTIM: Queries the operating hours of the instrument so far - POC: Queries how often the instrument has been turned on so far

property f_center: float#

Center frequency of the sweep.

property f_dwell: float#

Dwell time for a frequency sweep step.

property f_mode: str#

Frequency mode for generating the RF output signal.

property f_mult: float#

Multiplication factor of a subsequent downstream instrument.

property f_offset: float#

Frequency offset of a downstream instrument.

property f_span: float#

Span of the frequency sweep range.

property f_start: float#

Start frequency for the RF sweep.

property f_step: float#

Step width for linear sweeps.

property f_stop: float#

Stop frequency for the RF sweep.

property f_sweep_mode: str#

Cycle mode for the frequency sweep.

property frequency: float#

Frequency of the RF output signal in the selected path.

property is_f_sweep_completed: bool#

Status of the frequency sweep that is running.

property is_p_sweep_completed: bool#

Status of the RF level sweep that is running.

property output: bool#

Whether the RF output signal is active.

property p_dwell: float#

Dwell time for a level sweep step.

property p_mode: str#

Operating mode of the instrument of the set output level.

property p_start: float#

Start RF level for the RF sweep.

property p_step: float#

Logarithmically determined step size for the RF level sweep.

property p_stop: float#

Stop RF level for the RF sweep.

property p_sweep_mode: str#

Mode of the power sweep.

property p_unit: str#

Default unit for all power parameters.

property phase: float#

Phase variation relative to the current phase.

property power: float#

RF level applied to the DUT [dBm, unless p_unit was changed].

reset(defaults: bool = True)[source]#

Reset the instrument (multiplier 1, offset 0), then restore the defaults.

rf_max = 20000000000.0#

Maximum RF output frequency [Hz], depends on the frequency option.

rf_min = 8000.0#

Minimum RF output frequency [Hz].

screen_saver_mode(state: str = 'OFF')[source]#

Activate the screen saver mode of the display.

property screen_saver_time: int#

Wait time for the screen saver mode of the display.

set_phase_ref()[source]#

Assign the value set as the reference phase.

sweep()[source]#

Perform a one-off RF frequency/level sweep.

transport_defaults: ClassVar[Dict[str, Any]] = {'delay': 0.1, 'no_delay': True, 'port': 5025, 'timeout': 10}#

qtics.instruments.rohde_schwarz.znb module#

Controller of the R&S ZNB Vector Network Analyzer.

class qtics.instruments.rohde_schwarz.znb.ZNB(transport: Transport | str, name: str = 'ZNB', max_points: int = 100001, channel: int = 1, **transport_kwargs)[source]#

Bases: VNA, SCPIInstrument

R&S ZNB Vector Network Analyzer by Rohde & Schwarz.

activate_trace()[source]#

Make active the selected trace.

apply_calibration()[source]#

Apply the calibration.

autoscale(trace: int = 1)[source]#

Autoscale the given trace of window 1.

property averages: int#

The number of sweep averages.

clear()[source]#

Clear the error queue and all status registers.

clear_average()[source]#

Reset averaging.

property continuous: bool#

Acquisition mode.

create_trace(trace_name: str, s_parameter: str)[source]#

Create a new trace with specified S-parameter.

property data_format: str#

Get data format.

delete_trace(trace_name: str)[source]#

Delete a trace.

property f_center: float#

Central frequency.

property f_span: float#

Frequency span.

property f_start: float#

Minimum frequency.

property f_stop: float#

Maximum frequency.

property harmonic_grid: bool#

Status of automatic harmonic grid for step response time domain measurements.

hold()[source]#

Wait until all commands have been processed.

property ifbw: float#

IF bandwidth of the receiver.

list_traces()[source]#

List all traces in the current channel.

property low_pass_extrapolation: float#

Reflection coefficient extrapolation at 0 frequency.

property low_pass_stimulus: str#

Shape of the low pass time domain probe.

measure_standard(standard, port=None)[source]#

Measure a calibration standard.

Parameters:
  • standard – Standard type (“OPEN”, “SHORT”, “LOAD”, “THROUGH”)

  • port – Port number for single-port standards

property points: int#

Number of points in sweep.

property power: float#

Output signal power.

read_freqs() → ndarray[source]#

Read frequencies.

read_times() → ndarray[source]#

Read time domain x axis.

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.

select_trace(trace_name: str)[source]#

Select active trace.

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

Configure standard measurement.

property smoothing: int#

Number of points in smoothing window.

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

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

start_calibration(cal_type='TOSM', ports=None)[source]#

Start a calibration procedure.

Parameters:
  • cal_type – Calibration type (“TOSM”, “SOLT”, “FOPORT”, etc.)

  • ports – List of ports to calibrate (e.g., [1, 2])

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

Execute multiple scans with higher resolution.

sweep()[source]#

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

property sweep_meas_time: float#

Time to complete a measurement sweep (same as sweep_time for R&S ZNB).

property sweep_time: float#

Time to complete a measurement sweep.

property t_start: float#

Minimum measured time.

property t_stop: float#

Maximum measured time.

property time_domain: bool#

Time domain mode status.

property time_domain_window: str#

Window shape used to process frequency into time domain data.

write_and_hold(cmd: str)[source]#

Write command and wait until it has been processed.

property yformat: str#

Scale and format of data.