stoner_measurement.plugins.trace.dummy.DummyPlugin

class stoner_measurement.plugins.trace.dummy.DummyPlugin(parent=None)[source]

Bases: TracePlugin

Generate simulated I-V data without using real hardware.

Use this plugin for demonstrations, testing, and learning how trace measurements work in the application. It produces synthetic current-voltage data based on a simple Josephson-junction RSJ model, so you can build and run sequences without connecting any instruments.

In the configuration panel, set the scan generator to choose the current values, then adjust the model parameters for critical current, normal resistance, and noise level. The result is a trace keyed by the plugin name (normally Dummy), with current on x and voltage on y.

The configuration tabs include the standard trace scan-generator controls plus settings for the RSJ model, noise, and trace-wide voltage offset. The Help/About tab uses this docstring to explain both the physical meaning of those parameters and the fact that the plugin is entirely hardware-free.

More technically, scan points are interpreted as applied current values I (in A). The corresponding voltage is computed from the DC RSJ model:

  • V = 0 when |I| < I_c

  • V = sign(I) × R_n × √(I² − I_c²) when |I| ≥ I_c

  • V += N(0, V_n) — independent Gaussian noise added to every sample

  • V += N(0, V_offset) — one constant random offset added to the trace

where I_c is the critical current, R_n is the normal-state resistance, and V_n is the noise standard deviation.

Variables:
  • _critical_current (str) – Python expression string for the critical current parameter.

  • _normal_resistance (str) – Python expression string for the normal-state resistance.

  • _noise_level (str) – Python expression string for the additive Gaussian noise level.

  • _voltage_offset_scale (str) – Python expression string for the trace-wide voltage-offset scale.

  • _rounding_level (str) – Python expression string controlling current rounding behaviour used by the implementation.

  • 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.

  • scan_generator (BaseScanGenerator) – Inherited generator defining acquisition source values.

  • 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 dummy in the sequence, use the QtConsole to inspect or edit it before running. Substitute your instance name if different; result data reflects completed steps:

dummy._critical_current = "1e-6"
dummy._normal_resistance = "100.0"
dummy.data
connect() → None[source]

Initialise the dummy plugin.

No real hardware is required; this simply marks the plugin as ready.

Examples

>>> from qtpy.QtWidgets import QApplication
>>> _ = QApplication.instance() or QApplication([])
>>> plugin = DummyPlugin()
>>> plugin.connect()
>>> plugin.status is TraceStatus.IDLE
True
property name: str

Unique identifier for the dummy plugin.

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

Serialise this plugin’s configuration, including RSJ model parameters.

Extends the base to_json() dict with the RSJ, noise, and "voltage_offset_scale" expressions configured on the Settings tab.

Returns:

A JSON-serialisable dictionary with at least the keys produced by to_json() plus "critical_current", "normal_resistance", "noise_level", and "voltage_offset_scale".

Return type:

(dict[str, Any])

Examples

>>> from qtpy.QtWidgets import QApplication
>>> _ = QApplication.instance() or QApplication([])
>>> plugin = DummyPlugin()
>>> d = plugin.to_json()
>>> d["critical_current"]
'1.0'
>>> d["normal_resistance"]
'1.0'
>>> d["noise_level"]
'0.0'
property x_label: str

Axis label for the applied current.

Returns:

"I".

Return type:

(str)

Examples

>>> from qtpy.QtWidgets import QApplication
>>> _ = QApplication.instance() or QApplication([])
>>> DummyPlugin().x_label
'I'
property x_units: str

Physical units for the applied-current axis.

Returns:

"A".

Return type:

(str)

Examples

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

Axis label for the measured voltage.

Returns:

"V".

Return type:

(str)

Examples

>>> from qtpy.QtWidgets import QApplication
>>> _ = QApplication.instance() or QApplication([])
>>> DummyPlugin().y_label
'V'
property y_units: str

Physical units for the voltage axis.

Returns:

"V".

Return type:

(str)

Examples

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