labscript.utils

Utility functions

Functions

bitfield(arrays, dtype)

Converts a list of arrays of ones and zeros into a single array of unsigned ints of the given datatype.

fastflatten(inarray, dtype)

A faster way of flattening our arrays than pylab.flatten.

is_clock_line(device)

Returns whether the connection is an instance of ClockLine

is_pseudoclock_device(device)

Returns whether the connection is an instance of PseudoclockDevice

is_remote_connection(connection)

Returns whether the connection is an instance of _RemoteConnection

max_or_zero(*args, **kwargs)

Returns max of the arguments or zero if sequence is empty.

print_time(t, description)

Print time with a descriptive string.

set_passed_properties([property_names])

Decorator for device __init__ methods that saves the listed arguments/keyword arguments as properties.

suppress_all_warnings([state])

A context manager which modifies compiler.suppress_all_warnings

suppress_mild_warnings([state])

A context manager which modifies compiler.suppress_mild_warnings

Exceptions

LabscriptError

A labscript error.