labscript.core.ClockLine

class ClockLine(name, pseudoclock, connection, ramping_allowed=True, **kwargs)[source]

Bases: Device

__init__(name, pseudoclock, connection, ramping_allowed=True, **kwargs)[source]

Creates a Device.

Parameters:
  • name (str) – python variable name to assign this device to.

  • parent_device (Device) – Parent of this device.

  • connection (str) – Connection on this device that links to parent.

  • call_parents_add_device (bool, optional) – Flag to command device to call its parent device’s add_device when adding a device.

  • added_properties (dict, optional) –

  • gui

  • worker

  • start_order (int, optional) – Priority when starting, sorted with all devices.

  • stop_order (int, optional) – Priority when stopping, sorted with all devices.

  • **kwargs – Other options to pass to parent.

Methods

__init__(name, pseudoclock, connection[, ...])

Creates a Device.

add_device(device)

Adds a child device to this device.

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 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.

Attributes

allowed_children

Defines types of devices that are allowed to be children of this device.

clock_limit

Clock limit for this line, typically set by speed of child Intermediate Devices.

description

Brief description of the device.

minimum_clock_high_time

The minimum time a clock tick must be in the logical high state

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.

add_device(device)[source]

Adds a child device to this device.

Parameters:

device (Device) – Device to add.

Raises:

LabscriptError – If device is not an allowed child of this device.

allowed_children = [<class 'labscript.core.IntermediateDevice'>]

Defines types of devices that are allowed to be children of this device.

Type:

list

property clock_limit

Clock limit for this line, typically set by speed of child Intermediate Devices.

Type:

float

description = 'Generic ClockLine'

Brief description of the device.

property minimum_clock_high_time

The minimum time a clock tick must be in the logical high state

Type:

float