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
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 sum_stat-0.4.0.tar.gz.
File metadata
- Download URL: sum_stat-0.4.0.tar.gz
- Upload date:
- Size: 124.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
def888d9e08b729acbca5f499143bfe8eb7f6fa1c8b1baeeebb9627a7077fa3f
|
|
| MD5 |
ba640af0ad7cd666a2f91ce5b21ae92d
|
|
| BLAKE2b-256 |
88b16fdffa4574de8a5ced42fe0f3b52a1b45706707c6e574a33a74a9bbd9fab
|
Provenance
The following attestation bundles were made for sum_stat-0.4.0.tar.gz:
Publisher:
release.yml on JohanComparat/sum_stat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sum_stat-0.4.0.tar.gz -
Subject digest:
def888d9e08b729acbca5f499143bfe8eb7f6fa1c8b1baeeebb9627a7077fa3f - Sigstore transparency entry: 2189196627
- Sigstore integration time:
-
Permalink:
JohanComparat/sum_stat@7223440666332ac9679b5eb1a82b34605eb52a43 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/JohanComparat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7223440666332ac9679b5eb1a82b34605eb52a43 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sum_stat-0.4.0-py3-none-any.whl.
File metadata
- Download URL: sum_stat-0.4.0-py3-none-any.whl
- Upload date:
- Size: 93.7 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 |
84d60cd639dfcb83af07d31e3be276645126256f0230f16d8e784a05df886472
|
|
| MD5 |
b6d90176f483c90c4c04f38f2db24a60
|
|
| BLAKE2b-256 |
0ab71ce1561c776263ea486cc5a9c4c807903e62a4bf7a608e16d55120f6472c
|
Provenance
The following attestation bundles were made for sum_stat-0.4.0-py3-none-any.whl:
Publisher:
release.yml on JohanComparat/sum_stat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sum_stat-0.4.0-py3-none-any.whl -
Subject digest:
84d60cd639dfcb83af07d31e3be276645126256f0230f16d8e784a05df886472 - Sigstore transparency entry: 2189196649
- Sigstore integration time:
-
Permalink:
JohanComparat/sum_stat@7223440666332ac9679b5eb1a82b34605eb52a43 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/JohanComparat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7223440666332ac9679b5eb1a82b34605eb52a43 -
Trigger Event:
push
-
Statement type: