devices.picotech:PicoVNA

Driver for PicoVNA Vector Network Analyzer instruments.

Usage

Source

devices.picotech:PicoVNA(
    interface,
    reset=False,
    **kwargs,
)

Provides control and data acquisition capabilities for PicoVNA instruments using the VISA communication protocol.

Methods

Name Description
__init__() Initialize the PicoVNA instrument.
configureSweep() Change the sweep settings in the given channel.
getComplexData() Transfer mesurement data from the VNA.
getSourcePower() Read the VNA output power.
readSweepParams() Read the sweep parameters from the VNA.
reset() Reset the VNA using the SYST:FPRESET command.
setSourcePower() Configure the VNA output power (setpoint between +5 and -30dbm).
startSweep() Activate the VNA output and enable manual triggering.

__init__()

Initialize the PicoVNA instrument.

Usage

Source

__init__(
    interface,
    reset=False,
    **kwargs,
)

Parameters

interface: str

VISA resource name or interface identifier.

reset: bool = False

If True, reset the instrument during initialization. Default is False.

**kwargs
Additional arguments to pass to the VisaDevice constructor. If not provided, default values are set for write_termination, read_termination, and timeout.

configureSweep()

Change the sweep settings in the given channel.

Usage

Source

configureSweep(
    fStart,
    fEnd,
    fPoints,
    if_bw,
    average=None,
)

Frequency units are in Hz. ‘MIN’/‘MAX’ arguments can be used insted of actual numbers, and use the highest/lowest setting the VNA is cappable of.

Parameters

fStart: int

The frequency on which the sweep starts.

fEnd: int

The frequency on which the sweep end.

fPoints: int or MIN / MAX

The number of points per sweep.

if_bw: int

The bandwidth of the digital IF filter. A lower value usually means a slower, but more accurate mesurement.

average: int = None
The number of averages which make up the final values. Default is None.

getComplexData()

Transfer mesurement data from the VNA.

Usage

Source

getComplexData(
    param,
    precision="double",
)

Parameters

param: str

The parameter to retrieve from the VNA.

precision: (single, double, ascii) = "single"
Precision of the data transfer. ‘single’ and ‘double’ precisions are transferd as binary data, and achive much faster transfer speeds. ‘ascii’ is only implemented as a fallback method, as it is much easier to debug. Default is ‘double’.

Returns

numpy.ndarray
The measured data from the specified channel.

getSourcePower()

Read the VNA output power.

Usage

Source

getSourcePower()

Returns

float
Power in dbm.

readSweepParams()

Read the sweep parameters from the VNA.

Usage

Source

readSweepParams()

Frequencies are returned in Hz.

Returns

fStart: int

The frequency at which the sweep starts.

fStop: int

The frequency at which the sweep stops.

fPoints: int
The number of points in the sweep.

reset()

Reset the VNA using the SYST:FPRESET command.

Usage

Source

reset()

Note that this does not reset the data transfer format! Use *RST for this


setSourcePower()

Configure the VNA output power (setpoint between +5 and -30dbm).

Usage

Source

setSourcePower(
    power,
    channel=1,
)

Parameters

power: int

Power in dbm.

channel: int = 1
Channel number. Default is 1.

startSweep()

Activate the VNA output and enable manual triggering.

Usage

Source

startSweep()

The VNA activates the output, disables the continuous trigger and therefore enables manual triggering. Any currently running sweeps are aborted.