stoner_measurement.instruments.lakeshore.current_sources.LakeshoreM81CurrentSource

class stoner_measurement.instruments.lakeshore.current_sources.LakeshoreM81CurrentSource(transport: BaseTransport, protocol: BaseProtocol | None = None)[source]

Bases: CurrentSource

Driver for the Lakeshore M81 balanced current-source outputs.

Models the M81 as a differential current-source backed by two matched output channels. The public source-level API uses channel 1 amplitude and mirrors channel 2 with opposite polarity for balanced drive. Built-in sweeps (linear, logarithmic, custom list) are also supported; the sweep is mirrored across both channels so the differential current follows the programmed profile.

configure_sweep(config: CurrentSweepConfiguration) → None[source]

Configure a built-in balanced current sweep.

Channel 1 is programmed with the positive sense of the sweep; channel 2 is programmed with the mirrored (negated) profile so that the differential output follows the intended sweep.

Parameters:

config (CurrentSweepConfiguration) – Sweep configuration. For LIST spacing, config.values must be non-empty.

Raises:

ValueError – If config.spacing is LIST and config.values is empty or None.

enable_output(state: bool) → None[source]

Enable or disable both balanced outputs.

get_capabilities() → CurrentSourceCapabilities[source]

Return static capabilities for Lakeshore M81 current source.

get_channel_level(channel: int) → float[source]

Return programmed current for a specific channel in amps.

get_compliance_voltage() → float[source]

Return compliance voltage in volts.

get_frequency() → float[source]

Return waveform frequency in Hz.

get_offset_current() → float[source]

Return waveform offset current in amps.

get_source_level() → float[source]

Return differential source current amplitude in amps.

get_waveform() → CurrentWaveform[source]

Return waveform mode.

output_enabled() → bool[source]

Return True if both balanced outputs are enabled.

set_channel_level(channel: int, value: float) → None[source]

Set programmed current for a specific channel in amps.

set_compliance_voltage(value: float) → None[source]

Set compliance voltage in volts for both channels.

set_frequency(value: float) → None[source]

Set waveform frequency in Hz for both channels.

set_offset_current(value: float) → None[source]

Set waveform offset current in amps for both channels.

set_source_level(value: float) → None[source]

Set differential source current amplitude in amps.

set_waveform(waveform: CurrentWaveform) → None[source]

Set waveform mode for both channels.

sweep_abort() → None[source]

Abort a running or armed balanced sweep.

sweep_start() → None[source]

Arm the configured balanced sweep, making it ready for triggering.