++ed by:
AMBA

1 PAUSE user
1 non-PAUSE user.

Andreas K. Hüttel
and 4 contributors

NAME

Lab::Moose::Instrument::VNASweep - Role for network analyzer sweeps.

METHODS

sparam_sweep

 my $data = $vna->sparam_sweep(timeout => 10, average => 10, precision => 'double');

Perform a single sweep, and return the resulting data as a 2D PDL. The first dimension runs over the sweep points. E.g. if only the S11 parameter is measured, the resulting PDL has dimensions N x 3:

 [
  [freq1, freq2, freq3, ..., freqN],
  [Re(S11)_1, Re(S11)_2, ..., Re(S11)_N],
  [Im(S11)_1, Im(S11)_2, ..., Im(S11)_N],
 ]
 

This method accepts a hash with the following options:

timeout

timeout for the sweep operation. If this is not given, use the connection's default timeout.

average

Setting this to $N, the method will perform $N sweeps and the returned data will consist of the average values.

precision

floating point type. Has to be 'single' or 'double'. Defaults to 'single'.

REQUIRED METHODS

The following methods are required for role consumption.

sparam_catalog

 my $array_ref = $vna->sparam_catalog();

Return an arrayref of available S-parameter names. Example result: ['Re(s11)', 'Im(s11)', 'Re(s21)', 'Im(s21)'].

sparam_sweep_data

 my $binary_string = $vna->sparam_sweep_data(timeout => $timeout)

Return binary SCPI data block of S-parameter values. This string contains the sparam_catalog values of each frequency point. The floats must be in native byte order.

CONSUMED ROLES

Lab::Moose::Instrument::Common
Lab::Moose::Instrument::SCPI::Format
Lab::Moose::Instrument::SCPI::Instrument
Lab::Moose::Instrument::SCPI::Sense::Average
Lab::Moose::Instrument::SCPI::Sense::Frequency
Lab::Moose::Instrument::SCPI::Sense::Sweep
Lab::Moose::Instrument::SCPI::Initiate
Lab::Moose::Instrument::SCPIBlock