Usage as a Context ManagerΒΆ

The ASDFDataSet class can also be used as a context manager which guarantees that the file is always closed after it is used.

import pyasdf

with pyasdf.ASDFDataSet("example.h5") as ds:
    ds.add_waveforms(...)