postprocessing/los_lc/rays_lc.hdf5
We provide 300 lightcone-like lines of sight for THESAN-1. We use a stepwise-constant approximation to build them by combining segments from the same z-aligned line of sight at different snapshots. The portion taken from each snapshot spans the light-travel distance between that snapshot and the next. For the last snapshot (080, z ≈ 5.5), we use the full length of the line of sight, equal to the simulation box size (95.5 cMpc). We use periodic boundary conditions. The gas is held at its snapshot state within each piece, and all 300 lines of sight are stored in one file.
Root Attributes
| Attribute | Dimensions | Units | Description |
|---|---|---|---|
| BoxSize | 1 | Spatial extent of the periodic box (in comoving units). | |
| HubbleParam | 1 | - | Little , defined as |
| 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. |
| 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. |
Datasets and Groups
| Dataset | Dim. | Units | Description |
|---|---|---|---|
| Density | group | Gas density in the Voronoi cell. Internal units. | |
| ElectronAbundance | group | - | Electron abundance, defined as , 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. ) in the cell. |
| HeI_Fraction | group | - | HeI fraction (i.e. ) in the cell. Note: the denominator is , rather than . |
| HeII_Fraction | group | - | HeII fraction (i.e. ) in the cell. Note: the denominator is , rather than . |
| InternalEnergy | group | Internal energy of the gas in the Voronoi cell. | |
| MagneticField | group | (h/a²) √UnitPressure | Three-dimensional magnetic field. |
| PhotonDensity | group | 1063 photons / (ckpc/h)³ | Density of photons in the cells in the three spectral bands tracked in Thesan. |
| Pixel_Position | group | BoxSize | 3D coordinates in the simulation box (in units of BoxSize) of the segment, including periodic boundary conditions. |
| RayDirections | (Nlos,3) | - | Direction of each LOS. |
| RayOrigins | (Nlos,3) | Starting point of the LOS. | |
| RaySegments | group | Length of each segment composing the LOS. These segments are the intersection of the LOS with the Voronoi tesselation. | |
| Redshift | group | Redshift of each segment. Notice that this is the redshift the segment would have if the LOS was extracted from a real lightcone (i.e. without piecewise-constant approximation). To know the actual redshift, see the field 'Snapshot'. | |
| Snapshot | group | Snapshot from which each segment was extracted. | |
| StarFormationRate | group | Star Fromation Rate of the gas. | |
| Velocity | group | Spatial velocity. Multiply this value by to obtain peculiar velocity. |
Using the sightlines
The release paper lists the changes from the fixed-redshift files. In particular, the lightcone has no RayEndings dataset. Use the per-segment snapshot field to identify the simulation output that supplied the gas. The redshift assigned along the lightcone tracks position on the ray and can vary within one snapshot segment.
Select a redshift interval
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_lc/rays_lc.hdf5") as f:
z = f["Redshift/0"][:]
snap = f["Snapshot/0"][:]
length = f["RaySegments/0"][:]
neutral = f["HI_Fraction/0"][:]
assert z.shape == snap.shape == length.shape == neutral.shape
use = (z >= 5.9) & (z < 6.1)
print("contributing snapshots:", np.unique(snap[use]))
print("path-weighted neutral fraction:", np.average(neutral[use], weights=length[use]))