find_dataset#
- gwpy.io.hdf5.find_dataset( ) Dataset[source]#
Find and return the relevant dataset inside the given H5 object.
If
path=Noneis given, andh5ocontains a single dataset, that will be returned- Parameters:
- h5o
h5py.File,h5py.Group the HDF5 object in which to search
- path
str, optional the path (relative to
h5o) of the desired data set
- h5o
- Returns:
- dset
h5py.Dataset the recovered dataset object
- dset
- Raises:
ValueErrorif
path=Noneand the HDF5 object contains multiple datasetsKeyErrorif
pathis given but is not found within the HDF5 object