runmanager.make_run_files

runmanager.make_run_files(output_folder, sequence_globals, shots, sequence_attrs, filename_prefix, shuffle=False)[source]

Does what it says. sequence_globals and shots are of the datatypes returned by get_globals and get_shots, one is a nested dictionary with string values, and the other a flat dictionary. sequence_attrs is a dict of the attributes pertaining to this sequence to be initially set at the top-level group of the h5 file, as returned by new_sequence_details. output_folder and filename_prefix determine the directory shot files will be output to, as well as their filenames (this function will generate filenames with the shot number and .h5 extension appended to filename_prefix). Sensible defaults for these are also returned by new_sequence_details(), so preferably these should be used.

Shuffle will randomise the order that the run files are generated in with respect to which element of shots they come from. This function returns a generator. The run files are not actually created until you loop over this generator (which gives you the filepaths). This is useful for not having to clean up as many unused files in the event of failed compilation of labscripts. If you want all the run files to be created at some point, simply convert the returned generator to a list. The filenames the run files are given is simply the sequence_id with increasing integers appended.