The SPARTA HDF5 output format¶
The main output format for SPARTA is a single HDF5 file, which is placed in the output directory. The top level of the HDF5 hierarchy always contains three groups, as well as one further group for each tracer type. The content of these structures is explained below.
The config group¶
The purpose of the config group is to provide a central storage location for all configuration parameter as well as derived outputs that are not datasets. All config parameters are stored as HDF5 attributes.
The main group /config
contains all user-defined parameters, including their default values if
they were not specified by the user. The sub-groups contain the config parameters of specific
Results or Analyses. Those groups exist only if the respective parts of the code
were turned on, otherwise the corresponding config parameters are ignored.
The simulation group¶
The simulation group contains information derived by SPARTA that is specific to the simulation the code was run on, including cosmology, snapshots, and the characteristics of the simulation box.
Field |
Type |
Dimensions |
Exists if |
Explanation |
---|---|---|---|---|
|
int |
1 |
Always |
The number of snapshots processed |
|
int |
1 |
Always |
The number of files into which snapshot data are split |
|
int |
1 |
Always |
The total number of particles in the simulation |
|
float |
1 |
Always |
The box size in comoving Mpc/h |
|
float |
1 |
Always |
The particle mass in Msun/h |
|
float |
1 |
Always |
Omega_m,0 |
|
float |
1 |
Always |
Omega_Lambda,0 |
|
float |
1 |
Always |
The Hubble constant in units of 100 km/s/Mpc |
|
float |
|
Always |
The scale factor of each snap |
|
float |
|
Always |
The redshift of each snap |
|
float |
|
Always |
The time of each snap in Gyr |
|
float |
|
Always |
The dynamical (crossing) time at the snapshot time in Gyr |
The halos group¶
The halos group contains the following datasets for all halos that were output (generally because they reached a certain minimum number of particles at some point):
Field |
Type |
Dimensions |
Exists if |
Explanation |
---|---|---|---|---|
|
int16 |
|
Always |
The snapshot index where the halo was created |
|
int16 |
|
Always |
The snapshot index where the halo ended |
|
int8 |
|
Always |
The halo’s status at each snap (see below) |
|
int8 |
|
Always |
The halo’s final status (see below) |
|
int64 |
|
Always |
The halo ID at each snap |
|
int64 |
|
|
The halo’s host ID at each snap, or -1 if it was a host itself |
|
float |
|
Always |
The halo radius R200m (in physical kpc/h) at each snap |
|
float |
|
|
The position in the box (in comoving Mpc/h) |
|
float |
|
|
The halo’s perculiar velocity in physical km/s |
Please see the Halos & Subhalos page for the meaning of the status and status_final numerical codes.
The tracer, result, and analysis groups¶
Each tracer group contains one subgroup per result type. This subgroup will be present if the result type was activated in the compile-time settings, even if it was turned off for tracers of this type and thus contains zero results. Each result subgroup contains at least the following fields, plus other fields listed below:
Field |
Type |
Dimensions |
Exists if |
Explanation |
---|---|---|---|---|
|
int64 |
|
In result groups |
The unique ID of the tracer from which this result was derived |
|
int64 |
|
In analysis groups |
The unique ID of the halo which this analysis refers to |
|
int64 |
|
Always |
The index of the first result or analysis of this type for this halo |
|
int32 |
|
Always |
The number of results or analyses of this type for this halo |
The halo_first
and halo_n
fields, combined with the IDs, represent an indexing system that
allows us to connect halos, results, and analyses to each other. In practice, this process can get
complicated. For this reason, it is recommended to use the Python analysis package to load data from
SPARTA files. This module can perform the most common types of matching automatically.
See the documentation of the individual Results and Analyses for details about the datasets that they write to the output file.