stoner_measurement.plugins.trace.k6221_pulse_delta.Keithley6221PulseDeltaPlugin

class stoner_measurement.plugins.trace.k6221_pulse_delta.Keithley6221PulseDeltaPlugin(parent=None)[source]

Bases: Keithley6221_2182APlugin

Measure a custom current sweep using native 6221/2182A Pulse Delta.

Choose 6221/2182 Pulse Delta Trace for short current pulses with baseline subtraction. The Scan tab defines the high-current list. Settings selects the 6221 GPIB resource, voltage compliance, source ranging, 2182A voltage range, pulse width (50 us to 12 ms), settling delay within each pulse, complete cycle period, and one or two low measurements. A cycle-scale waveform and linked pulse zoom show duty cycle, the delay before the high pulse and the low time after it. The 50/60 Hz preview selector describes the mains supply; it does not change the instrument. These are nominal timings, excluding the initial trigger-to-mains wait. Numeric timing controls also accept expressions, evaluated during configure; expression previews are schematic. Timing limits are shown beside the controls. Invalid numeric combinations display an explanation above the preview; settling delay must be shorter than pulse width. Pulse width is limited by the hardware to 12 ms.

The baseline current is zero. Two low measurements give V = Vhigh - (Vbefore + Vafter)/2; one gives Vhigh - Vbefore. Enable alternating delta-current mode in Settings to offset successive high currents by +dI and -dI. Delta current accepts runtime expressions. At least three scan points are required. The standard trace’s three-point reduction then reports averaged V and differential R = dV/dI or G = dI/dV against nominal current, with P = dI*dV. Endpoint differential values use the nearest interior estimate. The zero-current baseline is unchanged. The IV trace contains current x, corrected V, R = V/I (NaN at zero), and peak P = I*V, rather than cycle-average power. Integration is set by the 6221. The 2182A must be connected by RS-232 and Trigger Link; there is no direct-GPIB meter or auxiliary-meter mode. The dedicated native handshake does not provide the existing plugin’s auxiliary timing contract.

Channel selectors offer the configured IV columns before acquisition. configured_trace_data() returns the empty schema by trace identifier, including the configured differential resistance or conductance choice.

Configure arms the source; measure starts one complete sweep and aborts it afterwards, returning the output to zero/off. Repeated measurements re-arm the same configuration. Disconnect aborts and closes owned resources.

Parameters:

parent (QObject | None) – Optional Qt parent.

Variables:
  • instance_name (str) – Sequence variable name.

  • sequence_engine (SequenceEngine | None) – Owning engine and expression context.

  • scan_generator (BaseScanGenerator) – High pulse currents in amps.

  • data (dict[str, TraceData]) – Most recent completed IV trace.

  • status (TraceStatus) – Current lifecycle phase.

  • _6221_resource (str) – Source GPIB resource.

  • _pulse_width (float | str) – High/low pulse width in seconds; default 110 us.

  • _pulse_source_delay (float | str) – Settling delay in seconds; default 16 us.

  • _pulse_period (float | str) – Requested cycle period in seconds; default 0.1 s.

  • _low_measurements (int) – Baseline measurements, 1 or 2; default 2.

  • _preview_mains_frequency (int) – Preview assumption, 50 or 60 Hz; default 50.

  • _compliance (float | str) – Voltage compliance; default 10 V.

  • _source_range_mode (SourceRangeMode) – BEST, AUTO or FIXED.

  • _source_range (float | str) – Fixed current range in amps.

  • _voltage_range (float) – 2182A range in volts; zero means automatic.

  • _differential_mode (bool) – Alternate high-current offsets; default False.

  • _delta_current (float | str) – Positive high-current offset in amps.

  • _differential_conductance (bool) – Report G instead of R; default False.

Raises:
  • ValueError – If pulse settings, current values or saved modes are invalid.

  • RuntimeError – If instruments are unavailable or acquisition times out.

Examples

With an existing sequence instance named pulse_trace:

pulse_trace._pulse_width = 500e-6
pulse_trace._pulse_source_delay = 20e-6
pulse_trace._pulse_period = "cycle_time"
pulse_trace._differential_mode = True
pulse_trace._delta_current = 1e-6
# Define cycle_time in the engine before configuration.
# After the sequence measures, inspect pulse_trace.data["IV"].
DISPLAY_NAME = '6221/2182 Pulse Delta Trace'
configure() → None[source]

Validate expressions and programme and arm one native pulse sweep.

connect() → None[source]

Open only the source session and check its serial-connected 2182A.

disconnect() → None[source]

Abort and close the owned session, propagating cleanup failures.

property name: str

Return the registered Pulse Delta plugin identifier.

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

Save supported pulse and scan settings without DC-only controls.

validate() → bool[source]

Check pulse literals and expression syntax without touching hardware.