runmanager

Functions

add_expansion_groups(filename)

backward compatability, for globals files which don't have expansion groups.

compile_labscript(labscript_file, run_file)

Compiles labscript_file with the run file, returning the processes return code, stdout and stderr.

compile_labscript_async(labscript_file, ...)

Compiles labscript_file with run_file.

compile_labscript_with_globals_files(...)

Creates a run file output_path, using all the globals from globals_files.

compile_labscript_with_globals_files_async(...)

Same as compile_labscript_with_globals_files, except it launches a thread to do

compile_multishot_async(labscript_file, ...)

Compiles labscript_file with run_files.

copy_group(source_globals_file, ...[, ...])

This function copies the group source_groupname from source_globals_file to dest_globals_file and renames the new group so that there is no name collision.

delete_global(filename, groupname, globalname)

delete_group(filename, groupname)

dict_diff(dict1, dict2)

Return the difference between two dictionaries as a dictionary of key: [val1, val2] pairs.

evaluate_globals(sequence_globals[, ...])

Takes a dictionary of globals as returned by get_globals.

expand_globals(sequence_globals, evaled_globals)

Expands iterable globals according to their expansion settings.

find_comments(src)

Return a list of start and end indices for where comments are in given Python source.

flatten_globals(sequence_globals[, evaluated])

Flattens the data structure of the globals.

get_all_groups(h5_files)

returns a dictionary of group_name: h5_path pairs from a list of h5_files.

get_expansion(filename, groupname, globalname)

get_globals(groups)

Takes a dictionary of group_name: h5_file pairs and pulls the globals out of the groups in their files.

get_globalslist(filename, groupname)

get_grouplist(filename)

get_shot_globals(filepath)

Returns the evaluated globals for a shot, for use by labscript or lyse.

get_units(filename, groupname, globalname)

get_value(filename, groupname, globalname)

globals_diff_groups(active_groups, other_groups)

Given two sets of globals groups, perform a diff of the raw and evaluated globals.

globals_diff_shots(file1, file2[, max_cols])

guess_expansion_type(value)

is_valid_hdf5_group_name(name)

Ensure that a string is a valid name for an hdf5 group.

is_valid_python_identifier(name)

iterator_to_tuple(iterator[, max_length])

make_run_file_from_globals_files(...[, config])

Creates a run file output_path, using all the globals from globals_files.

make_run_files(output_folder, ...[, shuffle])

Does what it says.

make_single_run_file(filename, ...)

Does what it says.

new_global(filename, groupname, globalname)

new_globals_file(filename)

new_group(filename, groupname)

new_sequence_details(script_path[, config, ...])

Generate the details for a new sequence: the toplevel attrs sequence_date, sequence_index, sequence_id; and the the output directory and filename prefix for the shot files, according to labconfig settings.

next_sequence_index(shot_basedir, dt[, ...])

Return the next sequence index for sequences in the given base directory (i.e. <experiment_shot_storage>/<script_basename>) and the date of the given datetime object, and increment the sequence index atomically on disk if increment=True.

remove_comments_and_tokenify(src)

Removes comments from source code, leaving it otherwise intact, and returns it.

rename_global(filename, groupname, ...)

rename_group(filename, oldgroupname, ...)

set_expansion(filename, groupname, ...)

set_units(filename, groupname, globalname, units)

set_value(filename, groupname, globalname, value)

Classes

TraceDictionary(*args, **kwargs)

Exceptions

ExpansionError

An exception class so that error handling code can tell when a parsing exception was caused by a mismatch with the expansion mode