PDSim.misc.hdf5 module

class PDSim.misc.hdf5.HDF5Writer[source]

Bases: object

This class contains the logic for writing a nested structure to a file. The structure to be written could include dictionaries, lists, numpy arrays, classes, and combinations thereof. The recursive writer function will walk through the tree, writing all the elements into the HDF5 file in the same general structure as was laid out in the object passed.

Some small modifications are needed - for instance, lists are written in a slighltly different manner. Otherwise, the structure should be pretty much exactly the same.

prune(fName, keys)[source]

Prune datasets and groups that are nested below the keys requested

write_to_file(struct, fName)[source]

Write the structure to the file given by fName

class PDSim.misc.hdf5.StubClass(d)[source]