Box-Aligned Sightlines

postprocessing/los_zdir/rays_zdir_NNN.hdf5

We provide 300 lines of sight of this type for each THESAN-1 snapshot from 054 onward. They start on the z = 0 plane and run along the positive z direction for one box length (95.5 cMpc). The transverse positions are fixed, so the same ray index follows the same path from one snapshot to the next. The public files cover snapshots 054–080. The release paper gives the filenames and extraction geometry.

Root Attributes
Attribute Dimensions Units Description
BoxSize 1 ckpc/h\text{ckpc} / h Spatial extent of the periodic box (in comoving units).
HubbleParam 1 - Little hh, defined as h=H0/(100km/s/Mpc)h = H_0 / (100 \text{km}/\text{s}/\text{Mpc})
MultipleOrigins 1 - Flag indicating that the LOS have different origins within the simulation box.
NumRays 1 - Number of LOS stored in the file.
Omega0 1 - The cosmological density parameter for matter.
OmegaBaryon 1 - The cosmological density parameter for baryons.
RayImpact 1 - Meaningless for the current configuration.
RayLength 1 ckpc/h\text{ckpc}/h Length of the LOS.
RayLength_cMpc 1 cMpc Length of the LOS in cMpc\text{cMpc}.
RaySphere 1 - Meaningless for the current configuration.
Redshift 1 - The redshift corresponding to the current snapshot.
UnitLength_in_cm 1 - Length unit used in the simulation, expressed in comoving cm.
UnitMass_in_g 1 - Mass unit used in the simulation, expressed in g.
UnitVelocity_in_cm_per_s 1 - Velocity unit used in the simulation, expressed in comoving cm / s.
Within each LOS file, the properties extracted along the LOS are saved in a number of groups, each one containing a dataset for each ray (named simply with a progressive number, starting from 0). These values are directly extracted from the simulation cell crossed by the ray, and saved as they are. This means that the units and considerations made for such fields (see Snapshots) apply directly to the ray fields. Additionally, LOS properties are saved in a mix of groups (with the same format just described) and datasets. Both are described in the table below. We distinguish groups from dataset in the dimensions column.
Datasets and Groups
Dataset Dim. Units Description
Density group 1010M⊙h2/ckpc310^{10} \text{M}_\odot h^2 / \text{ckpc}^3 Gas density in the Voronoi cell. Internal units.
ElectronAbundance group - Electron abundance, defined as ne/nHn_e / n_H, in each Voronoi cell.
GFM_DustMetallicity group - Dust-to-metal ratio in each Voronoi cell.
GFM_Metallicity group - Gas-phase metallicity in each Voronoi cell.
GFM_Metals group - For each ray, contains the mass fraction of nine species: H, He, C, N, O, Ne, Mg, Si, Fe (in this order). Each one is the dimensionless ratio of mass in that species to the total gas cell mass.
HI_Fraction group - HI fraction (i.e. nHI/nHn_{HI} / n_H ) in the cell.
HeI_Fraction group - HeI fraction (i.e. nHeI/nHn_{HeI} / n_H ) in the cell. Note: the denominator is nHn_H, rather than nHen_{He}.
HeII_Fraction group - HeII fraction (i.e. nHeII/nHn_{HeII} / n_H ) in the cell. Note: the denominator is nHn_H, rather than nHen_{He}.
InternalEnergy group (km/s)2(\text{km}/\text{s})^2 Internal energy of the gas in the Voronoi cell.
MagneticField group (h/a²) √UnitPressureThree-dimensional magnetic field.
PhotonDensity group 1063 photons / (ckpc/h)³ Density of photons in the cells in the three spectral bands tracked in Thesan.
RayOrigins (Nlos,3) ckpc/h\text{ckpc}/h Starting point of the LOS.
RayEndings (Nlos,3) ckpc/h\text{ckpc}/h End point of the LOS. Note that this does not include the box wrapping due to PBC, so this value can nominally lie outside of the simulation box, although the rays include PBC..
RaySegments group ckpc/h\text{ckpc}/h Length of each segment composing the LOS. These segments are the intersection of the LOS with the Voronoi tesselation.
StarFormationRate group M⊙/yr\text{M}_\odot / \text{yr} Star Fromation Rate of the gas.
Velocity group kma/s\text{km} \sqrt{a} /\text{s} Spatial velocity. Multiply this value by a\sqrt{a} to obtain peculiar velocity.

Using the sightlines

Use RayOrigins[j] at each snapshot to check the transverse position before comparing HI_Fraction/j. Use the individual segment lengths to place values on a distance axis. The cell boundaries can change between snapshots.

Compare the same ray at two redshifts

Run from the downloaded Thesan-1/postprocessing directory. The release filenames and geometry are given in Appendix A of Garaldi et al..

import h5py
import numpy as np

with h5py.File("los_zdir/rays_zdir_054.hdf5") as first, \
     h5py.File("los_zdir/rays_zdir_080.hdf5") as last:
    np.testing.assert_allclose(first["RayOrigins"][0], last["RayOrigins"][0])
    for snapshot, f in ((54, first), (80, last)):
        length = f["RaySegments/0"][:]
        neutral = f["HI_Fraction/0"][:]
        print(snapshot, np.average(neutral, weights=length))