write_table#

ctapipe.io.write_table(table, h5file, path, append=False, overwrite=False, mode='a', filters=Filters(complevel=5, complib='blosc:zstd', shuffle=True, bitshuffle=False, fletcher32=True, least_significant_digit=None))[source]#

Write a table to an HDF5 file

This writes a table in the ctapipe format into h5file.

attrs.update(transform.get_meta(name))

Parameters:
table: astropy.table.Table

The table to be written.

h5file: Union[str, Path, tables.file.File]

input filename or PyTables file handle. If a PyTables file handle, must be opened writable.

path: str

dataset path inside the h5file

append: bool

Whether to try to append to or replace an existing table

overwrite: bool

If table is already in file and overwrite and append are false, raise an error.

mode: str

If given a path for h5file, it will be opened in this mode. See the docs of tables.open_file.