postprocessing/filaments/
Select the tracer catalog before selecting the snapshot. The production set contains filaments_snapNNN.hdf5 from snapshots 015 through 080. The example uses this unpartitioned THESAN-1 reference file. On Globus, use the corresponding filename in your chosen tracer directory. The numbers depend on that choice.
File Reference
Filament catalogs are produced using the code DisPerSE. We provide catalogs for the large-volume radiation-hydrodynamic runs at snapshots with enough tracer galaxies. The availability table lists the runs.
Catalog Production
Briefly, DisPerSE employs the Discrete Morse theory to identify cosmic filaments from the topology of the density field. The latter can be either directly provided or computed using the Delaunay Tessellation Field Estimator from a set of tracers. The catalogs provided are built following the second approach.Filaments are defined by segments connecting local maxima to saddle points along ridges in the density field. The choice of tracers sets the smoothing and persistence threshold used to identify these ridges. Additionally, DisPerSE ensures the smoothness of the computed skeleton by shifting the extremities of contiguous segments to their middle point.
As a final step, bifurcating filaments (i.e. those connecting the same critical point to different saddle points) are split by introducing bifurcation points. This procedure avoids double-counting of the shared part of the filament.
For THESAN, we provide two types of catalogs. Each one is stored in a sub-directory with the corresponding name.
FixedMassTracersselects subhaloes above the same stellar mass at every redshift. The release paper gives a threshold of 107.5 M☉. We smooth the reconstructed density over neighboring vertices and retain filaments above 3σ persistence.FixedNumberTracersuses the galaxies above 107 M☉ at z = 5.5 and selects the same number of galaxies by stellar mass at earlier times. The adopted extraction uses an unsmoothed density field and a 2σ persistence threshold. Garaldi et al. (2024) describe the calibration.
For example, the fixed-mass extraction uses the following DisPerSE commands.
delaunay_3D trace_catalog.dat -btype periodic
netconv trace_catalog.dat.NDnet -smoothData field_value 1
mse trace_catalog.dat.NDnet.SD.NDnet -forceLoops -robustness -manifolds -upSkl -nsig 3
skelconv trace_catalog.dat.NDnet.SD.NDnet_s3.up.NDskl -to NDskl_ascii -smooth 1 -breakdown
Catalog Format
The output from DisPerSE is re-arranged in an HDF5 file with a structure similar to other THESAN data products.
Each catalog contains three main groups: a Header, whose attributes contain general information about the simulation and filaments,
a CriticalPoints group, whose datasets contain the properties of the critical points of the density field identified by DisPerSE, and
a Filaments group, whose datasets host the properties of the filaments identified by DisPerSE.
Header group are listed below. Header Attributes
| Attribute | Dimensions | Units | Description |
|---|---|---|---|
| BoundingBox | 6 | Coordinates of two corners of the bounding box (computed by DisPerSE) that encloses all tracer points. The six values correspond to of the tracers. | |
| BoxSize | 1 | Spatial extent of the periodic box (in comoving units). | |
| HubbleParam | 1 | Hubble constant (little in standard units). | |
| NumCriticalPoints | 1 | - | Number of critical points identified by DisPerSE. |
| NumDimensions | 1 | - | Number of dimensions of the space of tracer points. Always equal to 3 for THESAN. |
| NumFilaments | 1 | - | Number of filaments identified by DisPerSE. |
| Omega0 | 1 | - | The cosmological density parameter for matter. |
| OmegaBaryon | 1 | - | The cosmological density parameter for baryonic matter. |
| OmegaLambda | 1 | - | The cosmological density parameter for the cosmological constant. |
| Redshift | 1 | - | The redshift corresponding to the current output. |
| Time | 1 | - | The scale factor corresponding to the current output. |
| UnitLength_in_cm | 1 | - | Code length units in cm. |
| UnitMass_in_g | 1 | - | Code mass units in g. |
| UnitVelocity_in_cm_per_s | 1 | - | Code velocity units in cm/s. |
CriticalPoints and Filaments groups are listed below. Critical Point Fields
| Dataset | Dim. | Units | Description |
|---|---|---|---|
| AssociatedFields | (NumCriticalPoints, NumAssociatedFields) | - | Value of fields associated to each critical point. The number and name of these fields are stored in the NumAssociatedFields and AssociatedFieldsNames attributes of the CriticalPoints dataset |
| BoundaryFlag | NumCriticalPoints | - | |
| Coordinates | (NumCriticalPoints, 3) | Coordinates of each critical point | |
| CriticalIndex | NumCriticalPoints | - | Critical index of each critical point |
| DensityDTFE | NumCriticalPoints | ? | Density estimate for each Critical point |
| IndexFilament | NumFilaments | - | Index of the filament associated to each critical point |
| IndexOtherFilamentExtreme | NumFilaments | - | Index of the critical point at the other extreme of the filament associated to each given critical point |
| NumConnectedFilaments | NumCriticalPoints | - | Number of filaments connected to each critical point |
| OffsetFilamentAndExtreme | NumCriticalPoints | - | Offset of the first filament or critical point associated to each critical point in the IndexFilament and IndexOtherFilamentExtreme arrays |
| PersistencePairIndex | NumCriticalPoints | - | Index of the persistence pair of each critical point |
Filament Fields
| Dataset | Dim. | Units | Description |
|---|---|---|---|
| AssociatedFields | (NumFilaments, NumAssociatedFields) | - | Value of fields associated to each filament. The number and name of these fields are stored in the NumAssociatedFields and AssociatedFieldsNames attributes of the Filament dataset |
| CoordinatesSamplingPoints | (NumSamplingPoints, 3) | Coordinates of the sampling points associated to each filament | |
| IndexExtremalCriticalPoints | (NumSamplingPoints, 2) | - | Index of the critical points at the extremities of each filament |
| NumSamplingPoints | NumFilaments | - | Number of sampling points associated to each filament |
| OffsetSamplingPoints | NumFilaments | - | Offset of the first sampling point or critical points pair associated to each filament in the CoordinatesSamplingPoints and IndexExtremalCriticalPoints arrays |
Read the geometry of one filament
Paths in this example are relative to Thesan-1/postprocessing/.
import h5py
with h5py.File("filaments/filaments_snap080.hdf5") as f:
fil = f["Filaments"]
start = int(fil["OffsetSamplingPoints"][0])
count = int(fil["NumSamplingPoints"][0])
xyz = fil["CoordinatesSamplingPoints"][start:start + count]
print("samples, coordinates:", xyz.shape)
print("endpoints:", fil["IndexExtremalCriticalPoints"][0])
Output from THESAN-1
samples, coordinates: (5, 3) endpoints: [71 72]