labscript_utils.connections

class labscript_utils.connections.Connection(raw_row)[source]

A class to represent a row in the connection table, present the contents as instance attributes after deserialising their contents, and providing default values for backward compatibility with older HDF5 files. Contains links to Connection objects for child devices of each device

_defaults = {'BLACS_connection': '', 'properties': {}, 'unit conversion class': None, 'unit conversion params': {}}
_deserialise(name, value)[source]

deserialise one item of the row depending on what it is

_populate_relatives(table)[source]

Populate child devices based on a list of other connection objects, and set self.parent to our parent device.

compare_to(other_connection)[source]
diff(other)[source]
find_by_name(name)[source]
find_child(parent_name, parent_port)[source]
print_details(indent)[source]
property properties
property unit_conversion_params
class labscript_utils.connections.ConnectionTable(h5file, logging_prefix=None, exceptions_in_thread=False)[source]
assert_superset(other)[source]
compare_to(other)[source]
find_by_name(name)[source]
find_child(parent_name, parent_port)[source]
get_attached_devices()[source]

Finds out which devices in the connection table are connected to BLACS, based on whether their ‘BLACS_connection’ attribute is non-empty. Returns a dictionary of them in the form {device_instance_name: labscript_class_name}

print_details()[source]
remove_device(device_name)[source]

Removes a device from the ConnectionTable, but keeps it in the raw_table. This can help make comparissons of connection tables fail for tables with broken devices.

labscript_utils.connections._ensure_str(s)[source]

convert bytestrings and numpy strings to python strings