stoner_measurement.plugins.trace.network_analyser.NetworkAnalyserTracePlugin

class stoner_measurement.plugins.trace.network_analyser.NetworkAnalyserTracePlugin(parent=None)[source]

Bases: TracePlugin

Acquire an instrument-controlled frequency or source-power sweep.

Use this trace plugin when the network analyser should perform a complete sweep internally and return all selected S-parameters together. This is the fastest of the network-analyser workflows and is intended for ordinary frequency-response or power-response traces. Use NetworkAnalyserPointScanPlugin instead when other sequence steps must run at every analyser point.

The Scan tab defines the start, stop, and number of points. Frequency sweeps may use linear or exponential (log-spaced) points; power sweeps are linear. Arbitrary lists and general waveform generators are unavailable because this plugin maps the requested points onto the analyser’s native sweep modes. The Settings tab selects the Agilent E5062A or N5222A, GPIB resource, channel, sweep variable, complementary fixed frequency or power, IF bandwidth, averaging, correction state, timeout, S-parameters, and output representation.

Each measurement returns one trace named S parameters. Its x column is frequency in hertz or source power in dBm, followed by one floating-point column for each selected S-parameter. S-parameters may be reported as log magnitude in dB, linear magnitude, phase in degrees, real part, or imaginary part. Apply error correction uses the calibration currently active in the selected analyser channel; it does not create or replace a calibration.

Frequency, power, bandwidth, and timeout controls accept sequence expressions. They are evaluated when the plugin is configured, before the analyser’s native sweep runs. They are therefore suitable for values fixed for the whole trace, but not for changing a setting between sweep points.

Variables:
  • scan_generator (NetworkAnalyserScanGenerator) – Restricted linear/logarithmic generator used to define the native analyser sweep.

  • _sweep_variable (NetworkAnalyserSweepVariable) – Whether frequency or source power supplies the trace x axis.

  • _selected_parameters (tuple[str, ...]) – S-parameters returned as trace columns.

  • instance_name (str) – Inherited Python identifier for this instance in the Script tab and QtConsole.

  • comment (str) – Inherited optional note displayed beside this step.

  • sequence_engine (SequenceEngine | None) – Inherited owning engine and its live namespace; None while detached.

  • data (dict[str, TraceData]) – Inherited latest trace tables, keyed by trace name; inspect each table through its df attribute.

  • status (TraceStatus) – Inherited acquisition status, including data availability and errors.

Keyword Parameters:

parent (QObject | None) – Optional Qt parent object.

Examples

With an instance named network_analyser in the sequence, use the QtConsole to inspect or edit it before running. Substitute your instance name if different; result data reflects completed steps:

network_analyser.scan_generator
network_analyser.data
configure() → None[source]

Configure sweep grid, fixed stimulus, averaging, and trace slots.

connect() → None[source]

Open the selected GPIB analyser and verify its exact model.

declared_outputs() → PluginOutputs[source]

Declare the shared S-parameter trace.

disconnect() → None[source]

Close the analyser transport without changing its RF output state.

property name: str

Unique human-readable name for this plugin.

to_json() → dict[str, Any][source]

Serialise this plugin’s configuration, including the scan generator.

Extends the base to_json() dict with a "scan_generator" key containing the serialised scan_generator state.

Returns:

A JSON-serialisable dictionary with at least the keys produced by to_json() plus "scan_generator".

Return type:

(dict)

Examples

>>> from qtpy.QtWidgets import QApplication
>>> _ = QApplication.instance() or QApplication([])
>>> from stoner_measurement.plugins.trace import DummyPlugin
>>> plugin = DummyPlugin()
>>> d = plugin.to_json()
>>> d["type"]
'trace'
>>> "scan_generator" in d
True
>>> d["scan_generator"]["type"]
'SteppedScanGenerator'
property x_label: str

Axis label for the independent variable.

Returns:

Human-readable label string; default "x".

Return type:

(str)

property x_units: str

Physical units for the x (independent) axis.

The default implementation returns an empty string (dimensionless). Override to specify units such as "V", "Hz", or "s".

Returns:

Unit string; empty string if dimensionless.

Return type:

(str)

Examples

>>> from qtpy.QtWidgets import QApplication
>>> _ = QApplication.instance() or QApplication([])
>>> from stoner_measurement.plugins.trace import DummyPlugin
>>> DummyPlugin().x_units
''
property y_label: str

Axis label for the dependent variable.

Returns:

Human-readable label string; default "y".

Return type:

(str)

property y_units: str

Physical units for the y (dependent) axis.

The default implementation returns an empty string (dimensionless). Override to specify units such as "A", "Ω", or "dB".

Returns:

Unit string; empty string if dimensionless.

Return type:

(str)

Examples

>>> from qtpy.QtWidgets import QApplication
>>> _ = QApplication.instance() or QApplication([])
>>> from stoner_measurement.plugins.trace import DummyPlugin
>>> DummyPlugin().y_units
''