stoner_measurement.plugins.state_scan.magnet_controller.MagnetControllerScanPlugin¶
- class stoner_measurement.plugins.state_scan.magnet_controller.MagnetControllerScanPlugin(parent=None)[source]¶
Bases:
MagnetControllerPluginMixin,StateScanPluginStep the magnet field through a list of set-points.
Use this plugin when you want the sequence to move the magnet controller to a series of discrete field values generated by the scan settings. It is the usual choice for field-dependent measurements where data are taken at specific target fields rather than continuously during a ramp.
In the configuration tabs, you choose the magnet-controller settings and the scan generator that defines the field points. During execution, the plugin ramps to each set-point and waits until the controller reports that the target has been reached according to the underlying magnet-controller state logic.
Settings selects the ramp rate in tesla per minute (a number or expression) and reported controller outputs. Scan defines targets in tesla; Data selects collected values and column roles. Target and stability status comes from the shared magnet engine. A reported quench stops execution.
- Variables:
ramp_rate (float | str) – Ramp rate in tesla per minute or runtime expression.
use_plugin_ramp_rate (bool) – Use the plugin rate for applicable moves.
report_outputs (list[str] | None) – Selected controller readbacks; None selects all.
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 successive sequence points.
value (float) – Inherited current sequence control value.
ix (int) – Inherited zero-based iteration index.
meas_flag (bool) – Inherited flag indicating a measurement point.
collect_data (bool) – Inherited switch enabling collection of selected sequence outputs.
data (TraceData) – Inherited accumulated table; inspect data.df after collection.
- Keyword Parameters:
parent (QObject | None) – Optional Qt parent object.
Examples
With a sequence instance named
magnet_controller_scan, use the QtConsole to inspect or edit it before running. Substitute your instance name if different; result data reflects completed steps:magnet_controller_scan.ramp_rate = 0.1 magnet_controller_scan.collect_data = True magnet_controller_scan.data.df.head()
- property state_name: str¶
Human-readable name of the controlled or swept physical quantity.
- Returns:
E.g.
"Magnetic Field","Temperature","Time".- Return type:
(str)
- to_json() dict[str, object][source]¶
Serialise this plugin’s configuration, including the scan generator.
Extends
to_json()with a"scan_generator"key.Examples
>>> from qtpy.QtWidgets import QApplication >>> _ = QApplication.instance() or QApplication([]) >>> from stoner_measurement.plugins.state_scan import CounterPlugin >>> plugin = CounterPlugin() >>> d = plugin.to_json() >>> d["type"] 'state_scan' >>> "scan_generator" in d True >>> d["collect_data"] False >>> d["clear_on_start"] True