Convert halo merger trees (Consistent-Trees, LHaloTree, SubLink, AHF) into the Galacticus HDF5 input format.
Project description
astrosylva
Carry merger trees from the forest to Galacticus.
A Python library and CLI that converts halo merger-tree catalogues into the Galacticus HDF5 input format.
Supports:
- Consistent-Trees (Rockstar pipeline;
forests.list+locations.dat+tree_*.dat) - LHaloTree (Millennium-style binary)
- SubLink (IllustrisTNG-style HDF5)
- AHF (Amiga Halo Finder MergerTree output)
This package is a Python port of the original C utility rockstar2galacticus.
The legacy C sources are preserved at
galacticusorg/rockstar2galacticus
for reference; new development happens here in src/astrosylva/.
Install
pip install astrosylva
Or, from a checkout:
pip install -e ".[dev]"
Quickstart
astrosylva convert config.yaml
A minimal config:
reader:
name: consistent_trees
source:
input_path: ./Illustris-3/tree/trees/
forests_path: ./Illustris-3/tree/forests.list
locations_path: ./Illustris-3/tree/locations.dat
options:
host_source: pid # or "upid"
scale_radius_source: rs # or "rs_klypin"
writer:
output_path: galacticus_illustris3.hdf5
metadata:
cosmology:
HubbleParam: 0.704
Omega0: 0.2726
OmegaLambda: 0.7274
OmegaBaryon: 0.0456
sigma_8: 0.809
simulation:
boxSize: 75000.0
simulationCode: AREPO
startRedshift: 127.0
groupFinder:
groupFinderCode: rockstar
minimumParticleNumber: 10
haloTrees:
haloMassesIncludeSubhalos: 1
forestsAreSelfContained: 1
treesHaveSubhalos: 1
velocitiesIncludeHubbleFlow: 0
Values that the reader can introspect from the input data (e.g. cosmological
parameters from a Consistent-Trees header) override the metadata block;
conflicts emit a MetadataConflictWarning showing both values.
CLI
| Command | What it does |
|---|---|
astrosylva convert <config.yaml> |
Run the full conversion. |
astrosylva readers |
List discovered readers (entry-point plugins). |
astrosylva validate <config.yaml> |
Parse and validate the config without writing. |
Implementation status
| Reader | Status | Notes |
|---|---|---|
| Consistent-Trees | Implemented | Full port; column lookup is name-based. |
| AHF | Experimental | .AHF_halos + .AHF_mtree; union-find forests. |
| SubLink | Experimental | HDF5; multi-chunk, FOF host resolution. |
| LHaloTree | Experimental | Millennium binary; multi-chunk; some proxies. |
The Galacticus writer emits formatVersion = 2, matching the legacy C tool's
output layout byte-for-byte (group structure, dataset names, attribute names).
License
MIT — see LICENSE.
Contributing
Bug reports, feature requests, and pull requests welcome. See
CONTRIBUTING.md for the dev-loop guide and
CONTRIBUTORS.md for credits.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file astrosylva-0.1.0a1.tar.gz.
File metadata
- Download URL: astrosylva-0.1.0a1.tar.gz
- Upload date:
- Size: 57.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
854f67d5be14722e06dde718e353f31a70354717d34454eed59e670d8ae52eaf
|
|
| MD5 |
6352169f3caf4ccde43bccfbe6ed4592
|
|
| BLAKE2b-256 |
218c48b7ac2300bc08a41d5f014e694bfbca0ee1124f95693c6e1772bf0b97cc
|
Provenance
The following attestation bundles were made for astrosylva-0.1.0a1.tar.gz:
Publisher:
release.yml on galacticusorg/astrosylva
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
astrosylva-0.1.0a1.tar.gz -
Subject digest:
854f67d5be14722e06dde718e353f31a70354717d34454eed59e670d8ae52eaf - Sigstore transparency entry: 1574216998
- Sigstore integration time:
-
Permalink:
galacticusorg/astrosylva@26a8b7570ddd4d334da91d44966ca1782cf4c8bc -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/galacticusorg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@26a8b7570ddd4d334da91d44966ca1782cf4c8bc -
Trigger Event:
push
-
Statement type:
File details
Details for the file astrosylva-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: astrosylva-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 37.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8694aa70c6d8ced6c5be3e2fa6f0468fb3246dc8acf93a275ac6d9d1b995a35e
|
|
| MD5 |
db4bf95aad348b4e8cd727b1556668d7
|
|
| BLAKE2b-256 |
fae36521ccb41ab6deffd0327081f4d0bc88c0a883a0b2b415eeb1120d8c3683
|
Provenance
The following attestation bundles were made for astrosylva-0.1.0a1-py3-none-any.whl:
Publisher:
release.yml on galacticusorg/astrosylva
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
astrosylva-0.1.0a1-py3-none-any.whl -
Subject digest:
8694aa70c6d8ced6c5be3e2fa6f0468fb3246dc8acf93a275ac6d9d1b995a35e - Sigstore transparency entry: 1574217165
- Sigstore integration time:
-
Permalink:
galacticusorg/astrosylva@26a8b7570ddd4d334da91d44966ca1782cf4c8bc -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/galacticusorg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@26a8b7570ddd4d334da91d44966ca1782cf4c8bc -
Trigger Event:
push
-
Statement type: