labscript.core.TriggerableDevice
- class TriggerableDevice(name, parent_device, connection, parentless=False, **kwargs)[source]
Bases:
DeviceA triggerable version of
Device.This class is for devices that do not require a pseudoclock, but do require a trigger. This enables them to have a Trigger device as a parent.
- __init__(name, parent_device, connection, parentless=False, **kwargs)[source]
Instantiate a Triggerable Device.
- Parameters:
- Raises:
LabscriptError – If trigger type of this device does not match the trigger type of the parent Trigger.
Methods
__init__(name, parent_device, connection[, ...])Instantiate a Triggerable Device.
add_device(device)Adds a child device to this device.
Check that all devices sharing a trigger device have triggers when this device has a trigger.
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.
quantise_to_pseudoclock(times)Quantises
timesto 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.
trigger(t, duration)Request parent trigger device to produce a trigger.
Attributes
allowed_childrenDefines types of devices that are allowed to be children of this device.
descriptionBrief description of the device.
Minimum time required before another trigger can occur.
parent_clock_lineStores the clocking clockline, which may be itself.
pseudoclock_deviceStores the clocking pseudoclock, which may be itself.
t0The earliest time output can be commanded from this device at the start of the experiment.
Type of trigger.
- do_checks()[source]
Check that all devices sharing a trigger device have triggers when this device has a trigger.
- Raises:
LabscriptError – If correct triggers do not exist for all devices.
- generate_code(hdf5_file)[source]
Generate hardware instructions for device and children, then save to h5 file.
Will recursively call
generate_codefor all children devices.- Parameters:
hdf5_file (
h5py.File) – Handle to shot file.