Skip to content

Arbitrary Waveform Generator (AWG)¤

This category ships in the instro-unstable package (instro[unstable]); its API is not settled and may change without notice.

Errors raised by these methods are documented in Exceptions.

Interface¤

Bases: Instrument

AWG instrument. Methods return Measurement/Command for publishing.

name instance-attribute ¤

name = name

legacy_naming instance-attribute ¤

legacy_naming = legacy_naming

publishers instance-attribute ¤

publishers = publishers or []

default_tags instance-attribute ¤

default_tags: dict[str, str] = {}

background_interval property writable ¤

background_interval

Seconds between background daemon iterations (0 = no wait).

channel_names property ¤

channel_names: tuple[str, ...]

Return an insertion-ordered snapshot of all published channel names.

Names are complete after one full daemon iteration: {name}.loop_time publishes every iteration, so call get_channel("loop_time", wait_for_new_samples=True) then read channel_names to ensure the complete set has arrived.

Raises:

  • RuntimeError

    No background buffer; start() was not called.

add_publisher ¤

add_publisher(publisher: Publisher)

Register a publisher to receive this instrument's Measurement/Command data.

publish ¤

publish(data: Measurement | Command, **kwargs)

Fan data out to every configured publisher; kwargs pass through.

add_background_daemon_function ¤

add_background_daemon_function(method: Callable, *args, **kwargs)

Append method to the daemon's call list. Use define_background_daemon to replace instead.

stop ¤

stop()

Signal the background daemon to stop and join it. No-op if not running.

get_channel ¤

get_channel(
    channel_name: str,
    length: int = 1,
    wait_for_new_samples: bool = False,
    timeout: float = 10.0,
) -> Measurement

Return the most recent length samples for channel_name from the in-memory buffer.

If the channel does not exist yet, or no sample is available, the code will always block until timeout expires.

Parameters:

  • channel_name ¤

    (str) –

    Name of the channel to retrieve.

  • length ¤

    (int, default: 1 ) –

    Number of trailing samples to return.

  • wait_for_new_samples ¤

    (bool, default: False ) –

    Block until at least length new values arrive.

  • timeout ¤

    (float, default: 10.0 ) –

    Seconds to wait when insufficient data exists or wait_for_new_samples=True.

Raises:

  • RuntimeError

    No background buffer; start() was not called.

  • ChannelNotFoundError

    channel had no values and no data appeared before timeout. wait_for_new_samples=True and channel did not appear within timeout.

  • ChannelValueTimeoutError

    wait_for_new_samples=True and values did not arrive within timeout.

get_single_channel_value ¤

get_single_channel_value(channel_name: str) -> float | None

Return the most recent sample for channel_name from the in-memory buffer.

This will not wait, if data is not available then None is returned.

Parameters:

  • channel_name ¤

    (str) –

    Name of the channel to retrieve.

Raises:

  • RuntimeError

    No background buffer; start() was not called.

define_background_daemon ¤

define_background_daemon(method: Callable, *args, **kwargs)

Replace all daemon functions with a single method (called with the given args).

start ¤

start() -> None

Start the background daemon.

open ¤

open() -> None

Open the underlying driver.

close ¤

close() -> None

Close the underlying driver.

set_waveform ¤

set_waveform(channel: int, waveform: Waveform, **kwargs) -> Command

Program channel with a waveform.

get_waveform ¤

get_waveform(channel: int) -> Waveform

Read back the current waveform definition on channel.

set_amplitude ¤

set_amplitude(
    channel: int,
    amplitude: float,
    unit: AmplitudeMeasurementUnit,
    **kwargs,
) -> Command

Set the output amplitude on channel.

get_amplitude ¤

get_amplitude(channel: int) -> tuple[float, AmplitudeMeasurementUnit]

Read back the current amplitude and its measurement unit on channel.

convert_amplitude ¤

convert_amplitude(
    channel: int,
    amplitude: float,
    from_unit: AmplitudeMeasurementUnit,
    to_unit: AmplitudeMeasurementUnit,
    impedance_ohms: float | None = None,
) -> float

Convert an amplitude value between units using channel's configured waveform.

DBM conversions need a load impedance; if impedance_ohms isn't given, channel's output load is used instead. Raises ValueError if neither is available.

set_offset ¤

set_offset(channel: int, offset_v: float, **kwargs) -> Command

Set the DC offset (volts) on channel.

output_enable ¤

output_enable(channel: int, enable: bool, **kwargs) -> Command

Enable or disable the output on channel.

set_output_load ¤

set_output_load(channel: int, load: float | None, **kwargs) -> Command

Set the output load impedance; None means high-Z.

align_phase ¤

align_phase(**kwargs) -> Command

Sync the phase of all channels.

get_offset ¤

get_offset(channel: int, **kwargs) -> Measurement | None

Read back the DC offset (volts) on channel.

get_output_state ¤

get_output_state(channel: int, **kwargs) -> Measurement | None

Read back whether the output is enabled on channel.

get_output_load ¤

get_output_load(channel: int, **kwargs) -> Measurement | None

Read back the output load impedance on channel.

set_modulation ¤

set_modulation(
    channel: int,
    mod_type: ModulationType,
    shape: Waveform,
    magnitude: float,
    **kwargs,
) -> Command

Configure channel's carrier modulation with modulator shape.

NOTE: magnitude varies by mod_type: AM: depth, FM: frequency deviation, PM: phase deviation, ASK: 2nd amplitude, FSK: hop frequency.

modulation_enable ¤

modulation_enable(channel: int, enable: bool, **kwargs) -> Command

Enable or disable modulation on the given channel.

get_modulation_type ¤

get_modulation_type(channel: int) -> ModulationType

Read back the modulation type currently active on channel.

get_modulation_state ¤

get_modulation_state(channel: int, **kwargs) -> Measurement | None

Read back whether modulation is enabled on channel.

set_burst ¤

set_burst(channel: int, burst_type: BurstType, **kwargs) -> Command

Configure channel's burst type.

burst_enable ¤

burst_enable(channel: int, enable: bool, **kwargs) -> Command

Enable or disable burst mode on the given channel.

get_burst_type ¤

get_burst_type(channel: int) -> BurstType

Read back the burst type currently active on channel.

get_burst_state ¤

get_burst_state(channel: int, **kwargs) -> Measurement | None

Read back whether burst mode is enabled on channel.

set_burst_trigger ¤

set_burst_trigger(
    channel: int, source: BurstTriggerSource, **kwargs
) -> Command

Set the burst trigger source on channel.

get_burst_trigger ¤

get_burst_trigger(channel: int) -> BurstTriggerSource

Read back the burst trigger source on channel.

fire_burst_trigger ¤

fire_burst_trigger(channel: int, **kwargs) -> Command

Fire a burst trigger on channel now; the trigger source must already be MANUAL.

set_burst_delay ¤

set_burst_delay(channel: int, delay_s: float, **kwargs) -> Command

Set the burst trigger delay (seconds) on channel.

get_burst_delay ¤

get_burst_delay(channel: int, **kwargs) -> Measurement | None

Read back the burst trigger delay (seconds) on channel.

set_burst_gate_polarity ¤

set_burst_gate_polarity(
    channel: int, gate_polarity: GatePolarity, **kwargs
) -> Command

Set the gate polarity for GATED bursts on channel.

get_burst_gate_polarity ¤

get_burst_gate_polarity(channel: int) -> GatePolarity

Read back the gate polarity for GATED bursts on channel.

set_burst_ncycles ¤

set_burst_ncycles(channel: int, n_cycles: int, **kwargs) -> Command

Set the number of cycles per trigger for NCYCLE bursts on channel.

get_burst_ncycles ¤

get_burst_ncycles(channel: int, **kwargs) -> Measurement | None

Read back the number of cycles per trigger for NCYCLE bursts on channel.

set_burst_period ¤

set_burst_period(channel: int, period: float, **kwargs) -> Command

Set the internal burst period (seconds) on channel.

get_burst_period ¤

get_burst_period(channel: int, **kwargs) -> Measurement | None

Read back the internal burst period (seconds) on channel.

set_sweep ¤

set_sweep(channel: int, sweep_type: SweepType, **kwargs) -> Command

Configure the sweep type on channel.

get_sweep_type ¤

get_sweep_type(channel: int) -> SweepType

Read back the sweep type currently configured on channel.

sweep_enable ¤

sweep_enable(channel: int, enable: bool, **kwargs) -> Command

Enable or disable sweep mode on channel.

get_sweep_state ¤

get_sweep_state(channel: int, **kwargs) -> Measurement | None

Read back whether sweep mode is enabled on channel.

set_sweep_trigger ¤

set_sweep_trigger(
    channel: int, source: SweepTriggerSource, **kwargs
) -> Command

Set the sweep trigger source on channel.

get_sweep_trigger ¤

get_sweep_trigger(channel: int) -> SweepTriggerSource

Read back the sweep trigger source on channel.

set_sweep_start_freq ¤

set_sweep_start_freq(
    channel: int, frequency_hz: float, **kwargs
) -> Command

Set the sweep start frequency (Hz) on channel.

get_sweep_start_freq ¤

get_sweep_start_freq(channel: int, **kwargs) -> Measurement | None

Read back the sweep start frequency (Hz) on channel.

set_sweep_end_freq ¤

set_sweep_end_freq(
    channel: int, frequency_hz: float, **kwargs
) -> Command

Set the sweep end frequency (Hz) on channel.

get_sweep_end_freq ¤

get_sweep_end_freq(channel: int, **kwargs) -> Measurement | None

Read back the sweep end frequency (Hz) on channel.

set_sweep_time ¤

set_sweep_time(channel: int, sweep_time: float, **kwargs) -> Command

Set the sweep time (seconds) on channel.

get_sweep_time ¤

get_sweep_time(channel: int, **kwargs) -> Measurement | None

Read back the sweep time (seconds) on channel.

set_sweep_start_hold_time ¤

set_sweep_start_hold_time(
    channel: int, hold_time: float, **kwargs
) -> Command

Set the sweep start hold time (seconds) on channel.

get_sweep_start_hold_time ¤

get_sweep_start_hold_time(channel: int, **kwargs) -> Measurement | None

Read back the sweep start hold time (seconds) on channel.

set_sweep_stop_hold_time ¤

set_sweep_stop_hold_time(
    channel: int, hold_time: float, **kwargs
) -> Command

Set the sweep stop hold time (seconds) on channel.

get_sweep_stop_hold_time ¤

get_sweep_stop_hold_time(channel: int, **kwargs) -> Measurement | None

Read back the sweep stop hold time (seconds) on channel.

set_sweep_return_time ¤

set_sweep_return_time(
    channel: int, return_time: float, **kwargs
) -> Command

Set the sweep return time (seconds) on channel.

get_sweep_return_time ¤

get_sweep_return_time(channel: int, **kwargs) -> Measurement | None

Read back the sweep return time (seconds) on channel.

fire_sweep_trigger ¤

fire_sweep_trigger(channel: int, **kwargs) -> Command

Fire a sweep trigger on channel now; the trigger source must already be MANUAL.

Types & Configuration¤

AWG shared types and waveform definitions.

Waveform module-attribute ¤

Waveform = (
    Sine
    | Square
    | Sawtooth
    | Triangle
    | Pulse
    | Arbitrary
    | StaticValue
)

AmplitudeMeasurementUnit ¤

Bases: Enum

VPP class-attribute instance-attribute ¤

VPP = 'VPP'

VP class-attribute instance-attribute ¤

VP = 'VP'

VRMS class-attribute instance-attribute ¤

VRMS = 'VRMS'

DBM class-attribute instance-attribute ¤

DBM = 'DBM'

ModulationType ¤

Bases: Enum

AM class-attribute instance-attribute ¤

AM = 'AM'

FM class-attribute instance-attribute ¤

FM = 'FM'

PM class-attribute instance-attribute ¤

PM = 'PM'

FSK class-attribute instance-attribute ¤

FSK = 'FSK'

ASK class-attribute instance-attribute ¤

ASK = 'ASK'

PSK class-attribute instance-attribute ¤

PSK = 'PSK'

PWM class-attribute instance-attribute ¤

PWM = 'PWM'

BurstType ¤

Bases: Enum

NCYCLE class-attribute instance-attribute ¤

NCYCLE = 'NCYCLE'

GATED class-attribute instance-attribute ¤

GATED = 'GATED'

INFINITE class-attribute instance-attribute ¤

INFINITE = 'INFINITE'

BurstTriggerSource ¤

Bases: Enum

INTERNAL class-attribute instance-attribute ¤

INTERNAL = 'INT'

EXTERNAL class-attribute instance-attribute ¤

EXTERNAL = 'EXT'

MANUAL class-attribute instance-attribute ¤

MANUAL = 'MAN'

GatePolarity ¤

Bases: Enum

NORM class-attribute instance-attribute ¤

NORM = 'NORM'

INV class-attribute instance-attribute ¤

INV = 'INV'

SweepType ¤

Bases: Enum

LINEAR class-attribute instance-attribute ¤

LINEAR = 'LINEAR'

LOG class-attribute instance-attribute ¤

LOG = 'LOG'

STEP class-attribute instance-attribute ¤

STEP = 'STEP'

SweepTriggerSource ¤

Bases: Enum

INTERNAL class-attribute instance-attribute ¤

INTERNAL = 'INT'

EXTERNAL class-attribute instance-attribute ¤

EXTERNAL = 'EXT'

MANUAL class-attribute instance-attribute ¤

MANUAL = 'MAN'

Sine dataclass ¤

Sine(frequency_hz: float, phase_deg: float = 0.0)

Sine waveform definition.

frequency_hz instance-attribute ¤

frequency_hz: float

phase_deg class-attribute instance-attribute ¤

phase_deg: float = 0.0

StaticValue dataclass ¤

StaticValue(value: float = 0.0)

Static valued waveform definition.

value class-attribute instance-attribute ¤

value: float = 0.0

Square dataclass ¤

Square(
    frequency_hz: float,
    duty_cycle_pct: float = 50.0,
    phase_deg: float = 0.0,
)

Continuous rectangular wave; high for duty_cycle_pct percent of each period.

frequency_hz instance-attribute ¤

frequency_hz: float

duty_cycle_pct class-attribute instance-attribute ¤

duty_cycle_pct: float = 50.0

phase_deg class-attribute instance-attribute ¤

phase_deg: float = 0.0

Sawtooth dataclass ¤

Sawtooth(frequency_hz: float, phase_deg: float = 0.0)

Sawtooth waveform definition.

frequency_hz instance-attribute ¤

frequency_hz: float

phase_deg class-attribute instance-attribute ¤

phase_deg: float = 0.0

Triangle dataclass ¤

Triangle(frequency_hz: float, phase_deg: float = 0.0)

Triangle waveform definition.

frequency_hz instance-attribute ¤

frequency_hz: float

phase_deg class-attribute instance-attribute ¤

phase_deg: float = 0.0

Pulse dataclass ¤

Pulse(frequency_hz: float, width_s: float, delay_s: float = 0.0)

Continuous rectangular wave (not single-shot); each period goes high for width_s seconds after delay_s.

frequency_hz instance-attribute ¤

frequency_hz: float

width_s instance-attribute ¤

width_s: float

delay_s class-attribute instance-attribute ¤

delay_s: float = 0.0

Arbitrary dataclass ¤

Arbitrary(samples: tuple[float, ...], sample_rate_hz: float)

Arbitrary waveform definition; samples are normalized to [-1, 1] and scaled by amplitude/offset.

samples instance-attribute ¤

samples: tuple[float, ...]

sample_rate_hz instance-attribute ¤

sample_rate_hz: float

convert_amplitude ¤

convert_amplitude(
    value: float,
    from_unit: AmplitudeMeasurementUnit,
    to_unit: AmplitudeMeasurementUnit,
    waveform: Waveform,
    impedance_ohms: float | None = None,
) -> float

Convert an amplitude value between measurement units for a waveform shape.

VPP/VP/VRMS conversions depend on the waveform's crest factor, which is universal math shared across every driver. DBM additionally requires impedance_ohms (the load the instrument drives), since power depends on it.

Driver Interface¤

Bases: ABC

Vendor AWG driver contract. Concrete drivers own their transport and lifecycle.

open abstractmethod ¤

open() -> None

Open the underlying transport.

close abstractmethod ¤

close() -> None

Close the underlying transport.

set_waveform abstractmethod ¤

set_waveform(channel: int, waveform: Waveform) -> None

Program channel with the waveform definition.

get_waveform abstractmethod ¤

get_waveform(channel: int) -> Waveform

Get the current waveform on channel.

set_amplitude abstractmethod ¤

set_amplitude(
    channel: int, amplitude: float, unit: AmplitudeMeasurementUnit
) -> None

Set the output amplitude on channel.

get_amplitude abstractmethod ¤

get_amplitude(channel: int) -> tuple[float, AmplitudeMeasurementUnit]

Get the current output amplitude and voltage unit on channel.

set_offset abstractmethod ¤

set_offset(channel: int, offset: float) -> None

Set the DC offset (volts) on channel.

get_offset abstractmethod ¤

get_offset(channel: int) -> float

Get the DC offset (volts) on channel.

output_enable abstractmethod ¤

output_enable(channel: int, enable: bool) -> None

Enable or disable the output on channel.

get_output_state abstractmethod ¤

get_output_state(channel: int) -> bool

Return True if the output on channel is enabled.

set_output_load ¤

set_output_load(channel: int, load: float | None) -> None

Set the output load impedance; None means high-Z.

get_output_load ¤

get_output_load(channel: int) -> float | None

Get the output load impedance; None means high-Z.

align_phase ¤

align_phase() -> None

Sync the phase of all channels.

set_modulation ¤

set_modulation(
    channel: int,
    mod_type: ModulationType,
    shape: Waveform,
    magnitude: float,
) -> None

Configure channel's carrier modulation with modulator shape.

modulation_enable ¤

modulation_enable(channel: int, enable: bool) -> None

Enable or disable modulation on the given channel.

get_modulation_type ¤

get_modulation_type(channel: int) -> ModulationType

Get the modulation type currently active on channel.

get_modulation_state ¤

get_modulation_state(channel: int) -> bool

Get the modulation enabled state currently active on channel.

set_burst ¤

set_burst(channel: int, burst_type: BurstType) -> None

Configure channel's burst type.

burst_enable ¤

burst_enable(channel: int, enable: bool) -> None

Enable or disable burst mode on the given channel.

get_burst_type ¤

get_burst_type(channel: int) -> BurstType

Get the burst type currently active on channel.

get_burst_state ¤

get_burst_state(channel: int) -> bool

Return True if burst mode is enabled on channel.

set_burst_trigger ¤

set_burst_trigger(channel: int, source: BurstTriggerSource) -> None

Set the burst trigger source on channel.

get_burst_trigger ¤

get_burst_trigger(channel: int) -> BurstTriggerSource

Get the burst trigger source on channel.

fire_burst_trigger ¤

fire_burst_trigger(channel: int) -> None

Fire a burst trigger on channel now; the trigger source must already be MANUAL.

set_burst_delay ¤

set_burst_delay(channel: int, delay_s: float) -> None

Set the burst trigger delay (seconds) on channel.

get_burst_delay ¤

get_burst_delay(channel: int) -> float

Get the burst trigger delay (seconds) on channel.

set_burst_gate_polarity ¤

set_burst_gate_polarity(
    channel: int, gate_polarity: GatePolarity
) -> None

Set the gate polarity for GATED bursts on channel.

get_burst_gate_polarity ¤

get_burst_gate_polarity(channel: int) -> GatePolarity

Get the gate polarity for GATED bursts on channel.

set_burst_ncycles ¤

set_burst_ncycles(channel: int, n_cycles: int) -> None

Set the number of cycles per trigger for NCYCLE bursts on channel.

get_burst_ncycles ¤

get_burst_ncycles(channel: int) -> int

Get the number of cycles per trigger for NCYCLE bursts on channel.

set_burst_period ¤

set_burst_period(channel: int, period: float) -> None

Set the internal burst period (seconds) on channel.

get_burst_period ¤

get_burst_period(channel: int) -> float

Get the internal burst period (seconds) on channel.

set_sweep ¤

set_sweep(channel: int, sweep_type: SweepType) -> None

Configure the sweep type on channel.

get_sweep_type ¤

get_sweep_type(channel: int) -> SweepType

Get the sweep type currently configured on channel.

sweep_enable ¤

sweep_enable(channel: int, enable: bool) -> None

Enable or disable sweep mode on channel.

get_sweep_state ¤

get_sweep_state(channel: int) -> bool

Return True if sweep mode is enabled on channel.

set_sweep_trigger ¤

set_sweep_trigger(channel: int, source: SweepTriggerSource) -> None

Set the sweep trigger source on channel.

get_sweep_trigger ¤

get_sweep_trigger(channel: int) -> SweepTriggerSource

Get the sweep trigger source on channel.

set_sweep_start_freq ¤

set_sweep_start_freq(channel: int, frequency_hz: float) -> None

Set the sweep start frequency (Hz) on channel.

get_sweep_start_freq ¤

get_sweep_start_freq(channel: int) -> float

Get the sweep start frequency (Hz) on channel.

set_sweep_end_freq ¤

set_sweep_end_freq(channel: int, frequency_hz: float) -> None

Set the sweep end frequency (Hz) on channel.

get_sweep_end_freq ¤

get_sweep_end_freq(channel: int) -> float

Get the sweep end frequency (Hz) on channel.

set_sweep_time ¤

set_sweep_time(channel: int, sweep_time: float) -> None

Set the sweep time (seconds) on channel.

get_sweep_time ¤

get_sweep_time(channel: int) -> float

Get the sweep time (seconds) on channel.

set_sweep_start_hold_time ¤

set_sweep_start_hold_time(channel: int, hold_time: float) -> None

Set the sweep start hold time (seconds) on channel.

set_sweep_stop_hold_time ¤

set_sweep_stop_hold_time(channel: int, hold_time: float) -> None

Set the sweep stop hold time (seconds) on channel.

get_sweep_start_hold_time ¤

get_sweep_start_hold_time(channel: int) -> float

Get the sweep start hold time (seconds) on channel.

get_sweep_stop_hold_time ¤

get_sweep_stop_hold_time(channel: int) -> float

Get the sweep stop hold time (seconds) on channel.

set_sweep_return_time ¤

set_sweep_return_time(channel: int, return_time: float) -> None

Set the sweep return time (seconds) on channel.

get_sweep_return_time ¤

get_sweep_return_time(channel: int) -> float

Get the sweep return time (seconds) on channel.

fire_sweep_trigger ¤

fire_sweep_trigger(channel: int) -> None

Fire a sweep trigger on channel now; the trigger source must already be MANUAL.

Vendor Drivers¤

Keysight 33521B¤

Keysight 33521B arbitrary waveform generator driver (33500 series).

logger module-attribute ¤

logger = getLogger(__name__)

Keysight33521B ¤

Keysight33521B(visa_resource: str | VisaConfig)

Bases: AWGDriverBase

SCPI driver for the Keysight 33521B arbitrary waveform generator.

open ¤
open() -> None
close ¤
close() -> None
set_waveform ¤
set_waveform(channel: int, waveform: Waveform) -> None
get_waveform ¤
get_waveform(channel: int) -> Waveform
set_amplitude ¤
set_amplitude(
    channel: int, amplitude: float, unit: AmplitudeMeasurementUnit
) -> None
get_amplitude ¤
get_amplitude(channel: int) -> tuple[float, AmplitudeMeasurementUnit]
set_offset ¤
set_offset(channel: int, offset: float) -> None
get_offset ¤
get_offset(channel: int) -> float
output_enable ¤
output_enable(channel: int, enable: bool) -> None
get_output_state ¤
get_output_state(channel: int) -> bool
set_output_load ¤
set_output_load(channel: int, load: float | None) -> None
get_output_load ¤
get_output_load(channel: int) -> float | None
set_modulation ¤
set_modulation(
    channel: int,
    mod_type: ModulationType,
    shape: Waveform,
    magnitude: float,
) -> None

Configures modulation. Enabled state is persistent across set_modulation calls.

modulation_enable ¤
modulation_enable(channel: int, enable: bool) -> None

Enables the most recently configured modulation type, or disables modulation.

get_modulation_type ¤
get_modulation_type(channel: int) -> ModulationType

Returns modulation type currently enabled, or the last type set by the user when modulation is not enabled.

get_modulation_state ¤
get_modulation_state(channel: int) -> bool
set_burst ¤
set_burst(channel: int, burst_type: BurstType) -> None
get_burst_type ¤
get_burst_type(channel: int) -> BurstType

NCYCLE reads back as INFINITE when BURS:NCYC is the hardware's high-water sentinel for INF.

burst_enable ¤
burst_enable(channel: int, enable: bool) -> None
get_burst_state ¤
get_burst_state(channel: int) -> bool
set_burst_trigger ¤
set_burst_trigger(channel: int, source: BurstTriggerSource) -> None
get_burst_trigger ¤
get_burst_trigger(channel: int) -> BurstTriggerSource
fire_burst_trigger ¤
fire_burst_trigger(channel: int) -> None
set_burst_delay ¤
set_burst_delay(channel: int, delay_s: float) -> None
get_burst_delay ¤
get_burst_delay(channel: int) -> float
set_burst_gate_polarity ¤
set_burst_gate_polarity(
    channel: int, gate_polarity: GatePolarity
) -> None
get_burst_gate_polarity ¤
get_burst_gate_polarity(channel: int) -> GatePolarity
set_burst_ncycles ¤
set_burst_ncycles(channel: int, n_cycles: int) -> None
get_burst_ncycles ¤
get_burst_ncycles(channel: int) -> int
set_burst_period ¤
set_burst_period(channel: int, period: float) -> None
get_burst_period ¤
get_burst_period(channel: int) -> float
set_sweep ¤
set_sweep(channel: int, sweep_type: SweepType) -> None
get_sweep_type ¤
get_sweep_type(channel: int) -> SweepType
sweep_enable ¤
sweep_enable(channel: int, enable: bool) -> None
get_sweep_state ¤
get_sweep_state(channel: int) -> bool
set_sweep_trigger ¤
set_sweep_trigger(channel: int, source: SweepTriggerSource) -> None
get_sweep_trigger ¤
get_sweep_trigger(channel: int) -> SweepTriggerSource
set_sweep_start_freq ¤
set_sweep_start_freq(channel: int, frequency_hz: float) -> None
get_sweep_start_freq ¤
get_sweep_start_freq(channel: int) -> float
set_sweep_end_freq ¤
set_sweep_end_freq(channel: int, frequency_hz: float) -> None
get_sweep_end_freq ¤
get_sweep_end_freq(channel: int) -> float
set_sweep_time ¤
set_sweep_time(channel: int, sweep_time: float) -> None
get_sweep_time ¤
get_sweep_time(channel: int) -> float
set_sweep_stop_hold_time ¤
set_sweep_stop_hold_time(channel: int, hold_time: float) -> None

The 33521B has no SWEep:HTIMe:STARt; HTIMe only holds at the stop frequency.

get_sweep_stop_hold_time ¤
get_sweep_stop_hold_time(channel: int) -> float
set_sweep_return_time ¤
set_sweep_return_time(channel: int, return_time: float) -> None
get_sweep_return_time ¤
get_sweep_return_time(channel: int) -> float
fire_sweep_trigger ¤
fire_sweep_trigger(channel: int) -> None
align_phase ¤
align_phase() -> None

Sync the phase of all channels.

set_sweep_start_hold_time ¤
set_sweep_start_hold_time(channel: int, hold_time: float) -> None

Set the sweep start hold time (seconds) on channel.

get_sweep_start_hold_time ¤
get_sweep_start_hold_time(channel: int) -> float

Get the sweep start hold time (seconds) on channel.

Rigol DG1022Z¤

Rigol DG1022Z arbitrary waveform generator driver (DG1000Z series).

RigolDG1022Z ¤

RigolDG1022Z(visa_resource: str | VisaConfig)

Bases: AWGDriverBase

SCPI driver for the Rigol DG1022Z two-channel arbitrary waveform generator.

open ¤
open() -> None
close ¤
close() -> None
set_waveform ¤
set_waveform(channel: int, waveform: Waveform) -> None
get_waveform ¤
get_waveform(channel: int) -> Waveform
set_amplitude ¤
set_amplitude(
    channel: int, amplitude: float, unit: AmplitudeMeasurementUnit
) -> None
get_amplitude ¤
get_amplitude(channel: int) -> tuple[float, AmplitudeMeasurementUnit]
set_offset ¤
set_offset(channel: int, offset: float) -> None
get_offset ¤
get_offset(channel: int) -> float
output_enable ¤
output_enable(channel: int, enable: bool) -> None
get_output_state ¤
get_output_state(channel: int) -> bool
set_output_load ¤
set_output_load(channel: int, load: float | None) -> None
get_output_load ¤
get_output_load(channel: int) -> float | None
align_phase ¤
align_phase() -> None
set_modulation ¤
set_modulation(
    channel: int,
    mod_type: ModulationType,
    shape: Waveform,
    magnitude: float,
) -> None
modulation_enable ¤
modulation_enable(channel: int, enable: bool) -> None
get_modulation_type ¤
get_modulation_type(channel: int) -> ModulationType
get_modulation_state ¤
get_modulation_state(channel: int) -> bool
set_burst ¤
set_burst(channel: int, burst_type: BurstType) -> None
get_burst_type ¤
get_burst_type(channel: int) -> BurstType
burst_enable ¤
burst_enable(channel: int, enable: bool) -> None
get_burst_state ¤
get_burst_state(channel: int) -> bool
set_burst_trigger ¤
set_burst_trigger(channel: int, source: BurstTriggerSource) -> None
get_burst_trigger ¤
get_burst_trigger(channel: int) -> BurstTriggerSource
fire_burst_trigger ¤
fire_burst_trigger(channel: int) -> None
set_burst_delay ¤
set_burst_delay(channel: int, delay_s: float) -> None
get_burst_delay ¤
get_burst_delay(channel: int) -> float
set_burst_gate_polarity ¤
set_burst_gate_polarity(
    channel: int, gate_polarity: GatePolarity
) -> None
get_burst_gate_polarity ¤
get_burst_gate_polarity(channel: int) -> GatePolarity
set_burst_ncycles ¤
set_burst_ncycles(channel: int, n_cycles: int) -> None
get_burst_ncycles ¤
get_burst_ncycles(channel: int) -> int
set_burst_period ¤
set_burst_period(channel: int, period: float) -> None
get_burst_period ¤
get_burst_period(channel: int) -> float
set_sweep ¤
set_sweep(channel: int, sweep_type: SweepType) -> None
get_sweep_type ¤
get_sweep_type(channel: int) -> SweepType
sweep_enable ¤
sweep_enable(channel: int, enable: bool) -> None
get_sweep_state ¤
get_sweep_state(channel: int) -> bool
set_sweep_trigger ¤
set_sweep_trigger(channel: int, source: SweepTriggerSource) -> None
get_sweep_trigger ¤
get_sweep_trigger(channel: int) -> SweepTriggerSource
set_sweep_start_freq ¤
set_sweep_start_freq(channel: int, frequency_hz: float) -> None
get_sweep_start_freq ¤
get_sweep_start_freq(channel: int) -> float
set_sweep_end_freq ¤
set_sweep_end_freq(channel: int, frequency_hz: float) -> None
get_sweep_end_freq ¤
get_sweep_end_freq(channel: int) -> float
set_sweep_time ¤
set_sweep_time(channel: int, sweep_time: float) -> None
get_sweep_time ¤
get_sweep_time(channel: int) -> float
set_sweep_stop_hold_time ¤
set_sweep_stop_hold_time(channel: int, hold_time: float) -> None
get_sweep_stop_hold_time ¤
get_sweep_stop_hold_time(channel: int) -> float
set_sweep_start_hold_time ¤
set_sweep_start_hold_time(channel: int, hold_time: float) -> None
get_sweep_start_hold_time ¤
get_sweep_start_hold_time(channel: int) -> float
set_sweep_return_time ¤
set_sweep_return_time(channel: int, return_time: float) -> None
get_sweep_return_time ¤
get_sweep_return_time(channel: int) -> float
fire_sweep_trigger ¤
fire_sweep_trigger(channel: int) -> None