- class Waveforms#
The key specifies the slot of the waveform on the device. The value is a the waveform itself, represented by a tuple (wave1, wave2, marker).
- The value tuple(wave1, wave2=None, marker=None) consists of the following parts:
wave1 (array): Array with data of waveform 1.
wave2 (array): Array with data of waveform 2.
markers (array): Array with marker data.
A helper function exist called assign_waveform which provides an easy way of assigning waveforms to slots. But one can also use the direct dictionary access:
>>> wave = 1.0 * np.ones(1008) >>> markers = np.zeros(1008) >>> waveforms = Waveforms() >>> waveforms.assign_waveform(0, wave) >>> waveforms.assign_waveform(1, wave, -wave) >>> waveforms.assign_waveform(2, wave, -wave, markers) >>> waveforms.assign_waveform(3, wave, markers=markers) >>> waveforms = (wave,) >>> waveforms = (wave, -wave) >>> waveforms = (wave, -wave, markers) >>> waveforms = (wave, None, markers)
The arrays can be provided as arrays of integer, float. The first wave also can be of type complex. In that case the second waveform must be None.
Depending on the target format the function get_raw_vector converts the waves into the following format:
native AWG waveform format (interleaved waves and markers as uint16) that can be uploaded to the AWG waveform nodes. In case the first wave is of type complex the imaginary part is treated as the second wave.
complex waveform format that can be uploaded to the generator waveform nodes (does not support markers). In case two real waveforms have been specified they are combined into a single complex waveform, where the imaginary part defined by the second wave.
Assigns a native AWG waveform to a slot.
assign_waveform(slot, wave1[, wave2, markers])
Assigns a waveform to a slot.
get_raw_vector(slot, *[, complex_output])
Get the raw vector for a slot required by the device.
Return a sequencer code snippet for the defined waveforms.
validate(meta_info, *[, allow_missing])
Validates the waveforms against the ones defined in a sequencer program.