Function write_file_format_attributes(hid_t)

Function Documentation

void write_file_format_attributes(hid_t file_id)

Marks an HDF5 file as DIALS processed data.

Writes file_type and file_version on the file root, with the types h5py gives a Python str and int: a scalar variable-length UTF-8 string and a scalar 64-bit integer. DIALS compares both as Python objects, so a fixed-length string (read back as bytes) or a one-element array would fail its check. The format is defined in dials/util/table_as_hdf5_file.py (dials/dials@02bb48d).

Parameters:

file_id – An open, writable HDF5 file without these attributes.

Throws:

std::runtime_error – If either attribute cannot be written.