pynbody.util.hdf_vds.HdfVdsMaker#

class pynbody.util.hdf_vds.HdfVdsMaker(hdf_files: list[File | str])[source]#

Bases: object

Tool for creating a virtual dataset from multiple HDF5 files.

Methods

concatenation_keys()

Returns all keys to concatenate as VDS

copy_keys()

Returns all keys to copy from the first file into the VDS.

get_temporary_hdf_vfile()

Create the HDF file with virtual datasets in a temporary directory, such that it is deleted on closure

make_hdf_vfile(filepath)

Create an HDF file with virtual datasets combining the datasets in the input files.

write_single_vds(key, target_hdf_file[, ...])

Write a single virtual dataset to the target HDF file.

__init__(hdf_files: list[File | str])[source]#
concatenation_keys() Iterable[str][source]#

Returns all keys to concatenate as VDS

copy_keys() Iterable[str][source]#

Returns all keys to copy from the first file into the VDS.

Examples of copy keys are headers or one-off arrays

get_temporary_hdf_vfile() File[source]#

Create the HDF file with virtual datasets in a temporary directory, such that it is deleted on closure

make_hdf_vfile(filepath: str) File[source]#

Create an HDF file with virtual datasets combining the datasets in the input files.

write_single_vds(key: str, target_hdf_file: File, first_only: bool = False)[source]#

Write a single virtual dataset to the target HDF file.