labscript.labscript

Functions

add_time_marker(t, label[, color, verbose])

Add a marker for the specified time.

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.

generate_code()

Compiles a shot and saves it to the shot file.

generate_connection_table(hdf5_file)

Generates the connection table for the compiled shot.

generate_wait_table(hdf5_file)

Generates the wait table for the shot and saves it to the shot file.

labscript_cleanup()

restores builtins and the labscript module to its state before labscript_init() was called

labscript_init(hdf5_filename[, ...])

Initialises labscript and prepares for compilation.

load_globals(hdf5_filename)

max_or_zero(*args, **kwargs)

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

save_labscripts(hdf5_file)

Writes the script files for the compiled shot to the shot file.

save_time_markers(hdf5_file)

Save shot time markers to the shot file.

set_passed_properties([property_names])

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

start()

Indicates the end of the connection table and the start of the experiment logic.

stop(t[, target_cycle_time, ...])

Indicate the end of an experiment at the given time, and initiate compilation of instructions, saving them to the HDF5 file.

trigger_all_pseudoclocks([t])

wait(label, t[, timeout])

Commands pseudoclocks to pause until resumed by an external trigger, or a timeout is reached.

write_device_properties(hdf5_file)

Writes device_properties for each device in compiled shot to shto file.

Classes

AnalogIn(name, parent_device, connection[, ...])

Analog Input for use with all devices that have an analog input.

AnalogOut(name, parent_device, connection[, ...])

Analog Output class for use with all devices that support timed analog outputs.

AnalogQuantity(name, parent_device, connection)

Base class for AnalogOut.

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

DDS(name, parent_device, connection[, ...])

DDS class for use with all devices that have DDS-like outputs.

DDSQuantity(name, parent_device, connection)

Used to define a DDS output.

Device(name, parent_device, connection[, ...])

Parent class of all device and input/output channels.

DigitalOut(name, parent_device, connection)

Digital output class for use with all devices.

DigitalQuantity(name, parent_device, connection)

Base class for DigitalOut.

IntermediateDevice(name, parent_device, **kwargs)

Base class for all devices that are to be clocked by a pseudoclock.

NoWarnings()

A context manager which sets config.suppress_mild_warnings to True whilst in use.

Output(name, parent_device, connection[, ...])

Base class for all output classes.

Pseudoclock(name, pseudoclock_device, ...)

Parent class of all pseudoclocks.

PseudoclockDevice(name[, trigger_device, ...])

Device that implements a pseudoclock.

RemoteBLACS(name, host[, port, parent])

SecondaryControlSystem(name, host, port[, ...])

Shutter(name, parent_device, connection[, ...])

Customized version of DigitalOut that accounts for the open/close delay of a shutter automatically.

StaticAnalogOut(*args, **kwargs)

Static Analog Output class for use with all devices that have constant outputs.

StaticAnalogQuantity(*args, **kwargs)

Base class for StaticAnalogOut.

StaticDDS(name, parent_device, connection[, ...])

Static DDS class for use with all devices that have static DDS-like outputs.

StaticDigitalOut(*args, **kwargs)

Static Digital Output class for use with all devices that have constant outputs.

StaticDigitalQuantity(*args, **kwargs)

Base class for StaticDigitalOut.

Trigger(name, parent_device, connection[, ...])

Customized version of DigitalOut that tracks edge type.

TriggerableDevice(name, parent_device, ...)

A triggerable version of Device.

WaitMonitor(name, parent_device, connection, ...)

compiler()

Compiler object that saves relevant parameters during compilation of each shot.

config()

Exceptions

LabscriptError

A labscript error.