Skip to main content

sum_stat

PyPI version License: MIT Python 3.11+ CI codecov Documentation

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 TAPd) 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

sum_stat-0.4.0.tar.gz (124.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sum_stat-0.4.0-py3-none-any.whl (93.7 kB view details)

Uploaded Python 3

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

Hashes for sum_stat-0.4.0.tar.gz
Algorithm Hash digest
SHA256 def888d9e08b729acbca5f499143bfe8eb7f6fa1c8b1baeeebb9627a7077fa3f
MD5 ba640af0ad7cd666a2f91ce5b21ae92d
BLAKE2b-256 88b16fdffa4574de8a5ced42fe0f3b52a1b45706707c6e574a33a74a9bbd9fab

See more details on using hashes here.

Provenance

The following attestation bundles were made for sum_stat-0.4.0.tar.gz:

Publisher: release.yml on JohanComparat/sum_stat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for sum_stat-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84d60cd639dfcb83af07d31e3be276645126256f0230f16d8e784a05df886472
MD5 b6d90176f483c90c4c04f38f2db24a60
BLAKE2b-256 0ab71ce1561c776263ea486cc5a9c4c807903e62a4bf7a608e16d55120f6472c

See more details on using hashes here.

Provenance

The following attestation bundles were made for sum_stat-0.4.0-py3-none-any.whl:

Publisher: release.yml on JohanComparat/sum_stat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page