gcfit.util.hdf_view#
- gcfit.util.hdf_view(cluster, attrs=False, spacing='normal', *, outfile='stdout')#
Write out a clean listing of a clusters contents.
For a given cluster, crawl the corresponding hdf data file and write (or return) a pretty-printed string listing of the files contents. In the least, the file’s groups and datasets, but optionally attributes and dataset metadata.
- Parameters:
- clusterstr
Cluster common name, as used in cluster’s hdf data file.
- attrsbool, optional
If False (default) write only base dataset names, else include cluster and dataset attributes, as well as dataset shape and datatypes, and the ‘initials’ root dataset.
- spacing{‘normal’, ‘tight’, ‘loose’}
Adjust amount of spacing between each data grouping. Defaults to ‘normal’.
- outfile{‘stdout’, ‘return’, file-like}
Output location of listing. Either written directly to stdout (default), returned as string (return) or written to supplied IO object.
- Returns:
- None or string
If outfile is ‘return’, the full output as string, else None.