diffhalos
Diffhalos is a generative model of cosmological lightcones of dark matter halos, subhalos, and their merger trees. This library is written in JAX, and makes differentiable predictions for halo populations in a lightcone, or at a single redshift.
Documentation
Online documentation is available at diffhalos.readthedocs.io
Installation
To install diffhalos into your environment from the source code:
$ cd /path/to/root/diffhalos $ pip install .
Testing
To run the suite of unit tests:
$ cd /path/to/root/diffhalos $ pytest
To build html of test coverage:
$ pytest -v --cov --cov-report html $ open htmlcov/index.html
Demo notebooks
The diffhalos_quickstart.ipynb notebook illustrates how to use some of the core functions of diffhalos. In particular, it demonstrates
how to generate halo and subhalo lightcones using the Monte-Carlo and quasi-Monte Carlo versions of the generator. In addition,
it shows that the lightcone outputs agree well with the exact theory predictions from the halo and subhalo mass functions in Diffhalos.
In the notebook diffhalos_mah.ipynb we go over the basics of using the DiffmahNet model in Diffhalos to generate mass assembly
histories (MAHs) of populations of dark matter halos. It also demonstrates how the MAH of synthetic halos is part of the standard output
in the lightcones.
We demonstrate and explain in more detail the fundamentals of using the Monte Carlo and quasi-Monte Carlo generators, and discuss their differences,
in the notebook diffhalos_mc_vs_qmc.ipynb. In there, we cover the basics of how to use each version for host halos,
and we talk about how they differ in their approch to lightcone generation.
Metadata
Release files for diffhalos 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| diffhalos-0.2.0.tar.gz | 9.6 MB | Without provenance | Details for diffhalos-0.2.0.tar.gz |
Release files / diffhalos-0.2.0.tar.gz
| Download URL | diffhalos-0.2.0.tar.gz |
|---|---|
| Size | 9.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79ce52010df19032e60b16df9cd479cf71e8745303fc1735fceeb722b0e6d614
|
|
BLAKE2b-256 checksum How to use checksums |
96395e09f46b2cc24ce3ad1528f4bb8f5fff385fb823f53d87095c690fb06545
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Security for diffhalos 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.