sum_stat
Python wrapper package for measuring cosmological summary statistics from galaxy catalogues and lensing data. Careful, this is an early version, use at own risk !
Estimators
Stable — production-ready, covered by shape, consistency, and analytic-recovery tests:
- Luminosity and stellar mass functions (1/Vmax, SWML, C⁻, STY, Efron–Petrosian τ, Rauzy)
- Angular correlation function w(θ)
- Projected correlation function wp(rp), ξ(r), ξℓ(s)
- Excess surface density ΔΣ (galaxy-galaxy lensing)
In development — APIs may change, not yet validated for science; see development_estimators:
- Thermal SZ: stacked galaxy × Compton-y Σy(rp) and compensated aperture photometry TAP(θd) on ACT DR6 maps
- Power spectra Cℓ, Pℓ(k)
- k-nearest-neighbour CDFs
- Redshift distributions n(z)
All estimators write self-documenting HDF5 with units and cosmology provenance.
Installation
pip install sum-stat
Some estimators need optional extras:
pip install 'sum-stat[sz]' # pixell — thermal SZ on CAR maps
pip install 'sum-stat[lensing]' # dsigma — ΔΣ pipeline
pip install 'sum-stat[knn]' # pyfnntw — kNN backend (needs a Rust toolchain)
pip install 'sum-stat[scripts]' # matplotlib, tqdm — the scripts/ pipeline and plots
See pypi.org/project/sum-stat for details, and the documentation for the user guide and API reference.
Citation
If you use sum_stat in your research, please cite it as:
@software{comparat2026sumstat,
author = {Comparat, Johan},
title = {{sum\_stat}: Cosmological summary statistics from galaxy catalogues and lensing data},
year = {2026},
version = {0.4.0},
url = {https://github.com/JohanComparat/sum_stat},
license = {MIT},
}
A CITATION.cff file is also provided for automated citation tools (GitHub "Cite this repository" button).
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for development setup, coding conventions, and how to submit a pull request.
License
MIT — see LICENSE.
Package structure
sum_stat/
├── sum_stat/
│ ├── catalogue.py # GalaxyCatalogue, ShapeCatalogue, PhotoZCalibTable
│ ├── cosmology.py # JAX-differentiable distances and Σ_crit
│ ├── covariance/ # jackknife_covariance, bootstrap_covariance
│ ├── io/ # SummaryStatWriter, SummaryStatReader
│ ├── lensing/ # delta_sigma
│ ├── lf_smf/ # 1/Vmax, SWML, C⁻, STY, EP τ, Rauzy
│ ├── twopcf/ # w_theta, wp, xi_r, xi_multipoles
│ ├── sz/ # stacked_y, stacked_cap, binning [development]
│ ├── knn/ # knn_cdf, cross_knn_cdf [development]
│ ├── nz/ # nz_histogram, nz_kde [development]
│ └── powspec/ # cl_angular, pk3d, pk_multipoles [development]
├── tests/
├── docs/
├── environment.yml
└── pyproject.toml
Metadata
Release files for sum-stat 0.4.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 | |
|---|---|---|---|
| sum_stat-0.4.0.tar.gz | 124.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sum_stat-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 217.9 kB
Release files / sum_stat-0.4.0.tar.gz
| Download URL | sum_stat-0.4.0.tar.gz |
|---|---|
| Size | 124.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
def888d9e08b729acbca5f499143bfe8eb7f6fa1c8b1baeeebb9627a7077fa3f
|
|
BLAKE2b-256 checksum How to use checksums |
88b16fdffa4574de8a5ced42fe0f3b52a1b45706707c6e574a33a74a9bbd9fab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.
Transparency logRelease files / sum_stat-0.4.0-py3-none-any.whl
| Download URL | sum_stat-0.4.0-py3-none-any.whl |
|---|---|
| Size | 93.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84d60cd639dfcb83af07d31e3be276645126256f0230f16d8e784a05df886472
|
|
BLAKE2b-256 checksum How to use checksums |
0ab71ce1561c776263ea486cc5a9c4c807903e62a4bf7a608e16d55120f6472c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.
Transparency log