rminstr.instruments.RS_ZVA67

Classes

VNA

Implementation the ZVA67 as a VNA.

Package Contents

class rminstr.instruments.RS_ZVA67.VNA(VNA_GPIB: str, timeout=5000, resetParams=True, resource_manager: pyvisa.ResourceManager = None, log_path: str = None)

Bases: rminstr.instruments.communications.Instrument, rminstr.instruments.measurement_functionalities.ABC_VNA

Implementation the ZVA67 as a VNA.

Attributes

IDstr

ID string from the VNA.

Initialize a VNA object

Parameters:
VNA_GPIBstr

Visa address of instrument.

timeoutint

When to time out the resource. The default is 5000.

resetParamsbool

Whether or not to reset the parameters. The default is True.

resource_managervisa.ResourceManager, optional

Pyvisa resource manager for opening visa resources. The default is None.

log_pathstr, optional

If provided, will log at the specified path. The default is None.

Returns:
None.
ID
default_setup_settings
initial_setup(**kwargs)

Put instrument into safe and known initial state.

Parameters:
**kwargs

Optional keyword arguments. These will be sent to the setup function.

Returns:
None.
arm()

Arm the VNA so that it will measure a trace when triggered.

Returns:
None.
trigger()

Start a measurement.

Only works if the trigger source is set to MAN (manual). Otherwise, this method does nothing.

Returns:
None.
fetch_data() tuple

Fetch measurement data.

Returns:
dict

keys ‘Frequency (GHz)’, <param1>, <param2>, etc. Frequency is a 1-d array of floats. Each param is a 1d array of complex data. Params keys are the parameters passed in setup (e.g. a11, b11, etc…).

setup(flist_GHz: numpy.ndarray[float] = None, fstart_GHz: float = None, fstop_GHz: float = None, npoints: float = None, sweep_type: str = None, params: list[str] = None, power_dBm: float = None, IFBW: bool = None, average: int = None)

Change the settings of the VNA.

Parameters:
flist_GHznp.ndarray[float], optional

List of frequencies to sweep over. The default is None.

fstart_GHzfloat, optional

Start frequency for a sweep. fstart, fstop, npoints, and sweep type must be provided all at once. The default is None.

fstop_GHzfloat, optional

Stop frequency. fstart, fstop, npoints, and sweep type must be provided all at onceThe default is None.

npointsfloat, optional

Number of points. fstart, fstop, npoints, and sweep type must be provided all at once. The default is None.

sweep_typestr, {lin, log}

Linear or logarithmic sweep. fstart, fstop, npoints, and sweep type must be provided all at once. The default is None.

paramslist[str], optional

Parameters to measure (a11, b12, S11, etc). The default is None. Firs number is source port, second number is recieving port.

power_dBmfloat, optional

Power to source. The default is None.

IFBWbool, optional

Intermediate frequency bandwidth in Hz. The default is None.

average: int, optional

If provided, the VNA will average multiple passes. The default is 0. Adjusting this setting will clear the average state on the VNA.

Raises
——
ValueError

DESCRIPTION.

Returns:
None.
query_state() str

Checks the state of the machine according to state model.

Returns:
statestr

Current state of the instrument.

do_after_group_trigger()

Run post-trigger commands after an external trigger event.

Returns:
None.
raise_errors()

Query the status of the instrument.

If there are errors, raise them as Python errors.

Returns:
None.
Raises:
InstrumentError

Raises an instrument error when the instrument claims it has errors or is in an error state.

get_errors()

Query the status of the instrument.

Returns:
str

Error message