labscript.outputs.DDSQuantity
- class DDSQuantity(name, parent_device, connection, digital_gate=None, freq_limits=None, freq_conv_class=None, freq_conv_params=None, amp_limits=None, amp_conv_class=None, amp_conv_params=None, phase_limits=None, phase_conv_class=None, phase_conv_params=None, call_parents_add_device=True, **kwargs)[source]
Bases:
Device
Used to define a DDS output.
It is a container class, with properties that allow access to a frequency, amplitude, and phase of the output as
AnalogQuantity
. It can also have a gate, which provides enable/disable control of the output asDigitalOut
.This class instantiates channels for frequency/amplitude/phase (and optionally the gate) itself.
- __init__(name, parent_device, connection, digital_gate=None, freq_limits=None, freq_conv_class=None, freq_conv_params=None, amp_limits=None, amp_conv_class=None, amp_conv_params=None, phase_limits=None, phase_conv_class=None, phase_conv_params=None, call_parents_add_device=True, **kwargs)[source]
Instantiates a DDS quantity.
- Parameters:
name (str) – python variable for the object created.
parent_device (
IntermediateDevice
) – Device this output is connected to.connection (str) – Output of parent device this DDS is connected to.
digital_gate (dict, optional) – Configures a digital output to use as an enable/disable gate for the output. Should contain keys
'device'
and'connection'
with arguments for theparent_device
andconnection
for instantiating theDigitalOut
. All other (optional) keys are passed as kwargs.freq_limits (tuple, optional) –
(lower, upper)
limits for the frequency of the outputfreq_conv_class (
labscript_utils:labscript_utils.unitconversions
, optional) – Unit conversion class for the frequency of the output.freq_conv_params (dict, optional) – Keyword arguments passed to the unit conversion class for the frequency of the output.
amp_limits (tuple, optional) –
(lower, upper)
limits for the amplitude of the outputamp_conv_class (
labscript_utils:labscript_utils.unitconversions
, optional) – Unit conversion class for the amplitude of the output.amp_conv_params (dict, optional) – Keyword arguments passed to the unit conversion class for the amplitude of the output.
phase_limits (tuple, optional) –
(lower, upper)
limits for the phase of the outputphase_conv_class (
labscript_utils:labscript_utils.unitconversions
, optional) – Unit conversion class for the phase of the output.phase_conv_params (dict, optional) – Keyword arguments passed to the unit conversion class for the phase of the output.
call_parents_add_device (bool, optional) – Have the parent device run its
add_device
method.**kwargs – Keyword arguments passed to
Device.__init__()
.
Methods
__init__
(name, parent_device, connection[, ...])Instantiates a DDS quantity.
add_device
(device)Adds a child device to this device.
disable
(t)Disable the Output.
enable
(t)Enable the Output.
generate_code
(hdf5_file)Generate hardware instructions for device and children, then save to h5 file.
get_all_children
()Get all children devices for this device.
get_all_outputs
()Get all children devices that are outputs.
get_properties
([location])Get all properties in location.
get_property
(name[, location])Method to get a property of this device already set using
Device.set_property()
.init_device_group
(hdf5_file)Creates the device group in the shot file.
pulse
(t, duration, amplitude, frequency[, ...])Pulse the output.
quantise_to_pseudoclock
(times)Quantises
times
to the resolution of the controlling pseudoclock.set_properties
(properties_dict, property_names)Add one or a bunch of properties packed into properties_dict
set_property
(name, value[, location, overwrite])Method to set a property for this device.
setamp
(t, value[, units])Set the amplitude of the output.
setfreq
(t, value[, units])Set the frequency of the output.
setphase
(t, value[, units])Set the phase of the output.
Attributes
Defines types of devices that are allowed to be children of this device.
Brief description of the device.
parent_clock_line
Stores the clocking clockline, which may be itself.
pseudoclock_device
Stores the clocking pseudoclock, which may be itself.
t0
The earliest time output can be commanded from this device at the start of the experiment.
- allowed_children = [<class 'labscript.outputs.AnalogQuantity'>, <class 'labscript.outputs.DigitalOut'>, <class 'labscript.outputs.DigitalQuantity'>]
Defines types of devices that are allowed to be children of this device.
- Type:
- description = 'DDS'
Brief description of the device.
- disable(t)[source]
Disable the Output.
- Parameters:
t (float) – Time, in seconds, to disable the output at.
- Raises:
LabscriptError – If the DDS is not instantiated with a digital gate.
- enable(t)[source]
Enable the Output.
- Parameters:
t (float) – Time, in seconds, to enable the output at.
- Raises:
LabscriptError – If the DDS is not instantiated with a digital gate.
- pulse(t, duration, amplitude, frequency, phase=None, amplitude_units=None, frequency_units=None, phase_units=None, print_summary=False)[source]
Pulse the output.
- Parameters:
t (float) – Time, in seconds, to start the pulse at.
duration (float) – Length of the pulse, in seconds.
amplitude (float) – Amplitude to set the output to during the pulse.
frequency (float) – Frequency to set the output to during the pulse.
phase (float, optional) – Phase to set the output to during the pulse.
amplitude_units – Units of
amplitude
.frequency_units – Units of
frequency
.phase_units – Units of
phase
.print_summary (bool, optional) – Print a summary of the pulse during compilation time.
- Returns:
Duration of the pulse, in seconds.
- Return type: