pyUSID.io.hdf_utils.simple.check_and_link_ancillary¶
- pyUSID.io.hdf_utils.simple.check_and_link_ancillary(h5_dset, anc_names, h5_main=None, anc_refs=None)[source]¶
This function will add references to auxilliary datasets as attributes of an input dataset. If the entries in anc_refs are valid references, they will be added as attributes with the name taken from the corresponding entry in anc_names. If an entry in anc_refs is not a valid reference, the function will attempt to get the attribute with the same name from the h5_main dataset
- Parameters:
h5_dset (HDF5 Dataset) – dataset to which the attributes will be written
h5_main (HDF5 Dataset, optional) – dataset from which attributes will be copied if anc_refs is None
anc_refs (list of HDF5 Object References, optional) – references that correspond to the strings in anc_names
- Return type:
None
Notes
Either h5_main or anc_refs MUST be provided and anc_refs has the higher priority if both are present.