For each run, simulation.hdf5 uses HDF5 virtual datasets (available from version 1.10 onward) to read data across file chunks.
The virtual file presents each snapshot, group and subhalo catalog, offset file, and Cartesian output as a single group. Download the original chunks and keep the same relative paths as in the public THESAN data release.
The virtual file contains the following HDF5 groups.
| HDF5 group | Description |
|---|---|
| Cartesians |
Contains the virtual datasets of the Cartesian outputs. Each output is stored as a subgroup with name equal to its number (e.g. 0, 1, ..., 400, no zero-padding). Within each subgroup there is a Header group and virtual dataset replicating those found in the original files.
|
| Config | Empty group that stores, as attributes, the configuration flags used to run the simulation. |
| Groups |
Contains the virtual datasets of the halo and subhalo catalogs. Each (unchunked) catalog is stored as a subgroup with name equal to its number (e.g. 0, 1, ..., 80, no zero-padding). Within each subgroup, the structure of the corresponding halo and subhalo catalog (including the division in a Group and a Subhalo sub-groups) is replicated.
|
| Header | Empty group that stores, as attributes, information about the simulation common to all other files (e.g. BoxSize, etc.) |
| Offsets | Contains the virtual datasets of the offset files. Each offset file is stored as a subgroup with name equal to its number (e.g. 0, 1, ..., 80, no zero-padding). Within each subgroup, the structure of the corresponding offset file is replicated. |
| Parameters | Empty group that stores, as attributes, the parameters used to run the simulation. |
| Snapshots | Contains the virtual datasets of the Snapshots. Each (unchunked) snapshot is stored as a subgroup with name equal to its number (e.g. 0, 1, ..., 80, no zero-padding). Within each subgroup, the structure of the corresponding snapshot is reproduced. |
To read a small sample from Cartesian output 230, select the density field inside the virtual file.
import h5py
with h5py.File("simulation.hdf5") as simulation:
density = simulation["Cartesians/230/Density"]
print("Full density field:", density.shape)
# Read up to four cells along each dimension of the virtual dataset.
selection = tuple(slice(0, 4) for _ in density.shape)
sample = density[selection]