Skip to content

AnritsuVectorStarMs4640B#

Controls an Anritsu VectorStar MS4640B series vector network analyzer from Python. This class inherits from MeasmaticDevice.


property model#

The model of the connected VectorStar VNA.

Returns#

Type Description
Any The model as Atv.Framework.Devices.VectorNetworkAnalyzer.AnritsuVectorStarMs4640B.AnritsuVectorStarModel (Ms4642B, Ms4644B, Ms4645B or Ms4647B).

Example#

vna = measmatic.get_device('device-vectorstar')
print(vna.model)

method perform_sweep(filePath: str, outputFormat: str = 'OS2P')#

Performs a sweep and saves the measured data to a file. Requires a TCP/IP connection to the VNA.

Parameters#

Name Description
filePath The path of the file the data is written to. If empty, nothing is written.
outputFormat The data output format command, for example 'OS2P' or 'OS4P'. Defaults to 'OS2P'. Default: 'OS2P'

Example#

vna = measmatic.get_device('device-vectorstar')
vna.perform_sweep('C:/data/sweep.s2p')
vna.perform_sweep('C:/data/sweep.s4p', 'OS4P')

method reset()#

Resets the VNA to its default state.

Example#

vna = measmatic.get_device('device-vectorstar')
vna.reset()

method set_frequency_unit(unit: Any)#

Sets the frequency unit used in SNP data files.

Parameters#

Name Description
unit The frequency unit, of type Atv.Framework.Devices.VectorNetworkAnalyzer.AnritsuVectorStarMs4640B.FrequencyUnits (Hz, KHz, MHz or GHz).

Example#

vna = measmatic.get_device('device-vectorstar')
from Atv.Framework.Devices.VectorNetworkAnalyzer.AnritsuVectorStarMs4640B import FrequencyUnits
vna.set_frequency_unit(FrequencyUnits.GHz)

method set_maximum_point_count(pointMode: Any)#

Sets the maximum number of points the VNA can measure in a sweep (25000 or 100000). After changing this setting the instrument reboots automatically and returns to its preset state.

Parameters#

Name Description
pointMode The maximum point count mode, of type Atv.Framework.Devices.VectorNetworkAnalyzer.AnritsuVectorStarMs4640B.PointMode (PointMode25K or PointMode100K).

Example#

vna = measmatic.get_device('device-vectorstar')
from Atv.Framework.Devices.VectorNetworkAnalyzer.AnritsuVectorStarMs4640B import PointMode
vna.set_maximum_point_count(PointMode.PointMode25K)

method set_parameter_format(parameterFormat: Any)#

Sets the parameter format used in SNP data files.

Parameters#

Name Description
parameterFormat The parameter format, of type Atv.Framework.Devices.VectorNetworkAnalyzer.AnritsuVectorStarMs4640B.ParameterFormat (LinearAndPhase, LogAndPhase or RealAndImaginary).

Example#

vna = measmatic.get_device('device-vectorstar')
from Atv.Framework.Devices.VectorNetworkAnalyzer.AnritsuVectorStarMs4640B import ParameterFormat
vna.set_parameter_format(ParameterFormat.RealAndImaginary)

method set_start_frequency(frequency: float, channel: int | None = None)#

Sets the start frequency of the sweep of the given channel. The value must be valid for the connected model.

Parameters#

Name Description
frequency The start frequency in Hz.
channel The channel number. If None, the command is sent without a channel number. Default: None

Example#

vna = measmatic.get_device('device-vectorstar')
vna.set_start_frequency(1e9)
vna.set_start_frequency(1e9, 2)

method set_stop_frequency(frequency: float, channel: int | None = None)#

Sets the stop frequency of the sweep of the given channel. The value must be valid for the connected model.

Parameters#

Name Description
frequency The stop frequency in Hz.
channel The channel number. If None, the command is sent without a channel number. Default: None

Example#

vna = measmatic.get_device('device-vectorstar')
vna.set_stop_frequency(40e9)
vna.set_stop_frequency(40e9, 2)

method set_sweep_point_count(sweepPoints: float, channel: int | None = None)#

Sets the number of measurement points of the given channel. At least 2 points are required.

Parameters#

Name Description
sweepPoints The number of measurement points.
channel The channel number. If None, the command is sent without a channel number. Default: None

Example#

vna = measmatic.get_device('device-vectorstar')
vna.set_sweep_point_count(401)
vna.set_sweep_point_count(401, 2)

method wait_operation_completed()#

Waits until the VNA has completed all pending operations.

Example#

vna = measmatic.get_device('device-vectorstar')
vna.set_start_frequency(1e9)
vna.wait_operation_completed()