pyNSID.io.hdf_utilsΒΆ

Lower-level and simpler NSID-specific HDF5 utilities that facilitate higher-level data operations

Created on Tue Aug 3 21:14:25 2020

@author: Gerd Duscher, and Suhas Somnath

Functions

ase_from_dictionary

converts structure dictionary to ase.Atoms object

check_if_main

Checks the input dataset to see if it has all the necessary features to be considered a Main dataset.

find_dataset

Uses visit() to find all datasets with the desired name :param h5_group: Group to search within for the Dataset :type h5_group: h5py.Group :param dset_name: Name of the dataset to search for :type dset_name: str

get_all_main

Simple function to recursively print the contents of an hdf5 group :param parent: HDF5 Group to search within :type parent: h5py.Group :param verbose: If true, extra print statements (usually for debugging) are enabled :type verbose: bool, optional.

link_as_main

Attaches datasets as h5 Dimensional Scales to h5_main

make_nexus_compatible

Makes a pyNSID file compatible with the NeXus file format by adding the approbriate attributes and by writing one group.

read_h5py_dataset

validate_h5_dimension

Validates a dimension already present in an HDF5 file.

validate_main_and_dims

Validates the shape of the main dataset against the dictionary of dimensions and the parent HDF5 group into which the data would be written.

write_pynsid_book_keeping_attrs

Writes book-keeping information to the HDF5 object