gwexpy.interop.hdf5_

Functions

from_hdf5(cls, group, path, *[, unit, ...])

Read TimeSeries from HDF5 group.

to_hdf5(ts, group, path[, overwrite, ...])

Write TimeSeries to HDF5 group.

gwexpy.interop.hdf5_.to_hdf5(ts: TimeSeries, group: h5py.Group, path: str, overwrite: bool = False, compression: str | None = None, compression_opts: Any = None) None[source]

Write TimeSeries to HDF5 group.

wrapper for ts.write(…, format=’hdf5’) usually, but here we implement direct low-level if strict control is needed, OR delegate.

gwexpy.interop.hdf5_.from_hdf5(cls: type[T], group: h5py.Group, path: str, *, unit: str | None = None, channel: str | None = None, name: str | None = None, t0: float | None = None, dt: float | None = None) T[source]

Read TimeSeries from HDF5 group.

The channel attribute written by to_hdf5() is restored (closing a write-but-not-read round-trip gap). Metadata absent from the dataset can be supplied explicitly; an explicit argument takes priority over the stored attribute. Missing t0/dt fall back to 0/1 with a UserWarning rather than silently.