Skip to main content

PixPoint

CI codecov Documentation PyPI DOI License: MIT

Correlation functions of HEALPix maps, fast.

Documentation · Getting started · Installation · Citing

PixPoint measures two-point, three-point, integrated three-point and one-point statistics of cosmological fields on HEALPix maps: cosmic shear, galaxy clustering, galaxy-galaxy lensing, convergence. You give it maps and weights, it gives you labelled results. The pixel pairs of a footprint are found once and reused for every map, so a simulation suite costs one pair search and one fast pass per map, on a CPU or, with the same code, on NVIDIA GPUs.

from pixpoint import Global2PCF

g2 = Global2PCF(nside=512, mask=mask, nbins=20, theta_min=2.5, theta_max=250)
g2.preprocess()                          # find the pixel pairs once (save_pairs / load_pairs to reuse)

res = g2.gg(shear_maps, weights)         # shear_maps (nz, 2, npix), weights (nz, npix)
res.theta                                # bin centres, arcmin
res.xi_p, res.xi_m                       # (n_combinations, nbins)
res.combinations                         # which tomographic bins each row is

g2.kk(delta_maps, w_cov).xi              # clustering w(theta)
g2.kg(delta_maps, shear_maps, w_lens, w_source).xi   # galaxy-galaxy lensing gamma_t

What it measures

estimator measures methods result
Global2PCF two-point functions of the whole footprint: ξ±, w(θ), γ_t gg, kk, kg, three_by_two_pt TwoPointResult
Global3PCF three-point functions of the whole footprint, by multipoles ggg, kkk, kgg, kkg, measure ThreePointResult
Integrated3PCF aperture masses and 2PCFs in patches: the integrated 3PCF gg, kk, kg, three_by_two_pt, m_a, m_g IntegratedResult
OnePoint PDFs and moments of aperture mass and smoothed scalar fields g, k OnePointResult

Method names follow TreeCorr's field codes: g is a shear field, k a scalar field such as a density contrast or convergence map. Every estimator is tomographic, and every result carries the labels of its rows.

Why PixPoint

  • Exact pixel-pair estimators. The two-point functions are ratios of weighted sums over every pair of unmasked pixels, and agree with TreeCorr on the pixel centres to rounding.
  • Find pairs once, measure many maps. A full-footprint tomographic shear 2PCF of DES Y3 at nside 512 (6.7 × 10⁸ pairs) takes 33 ms per map on an A100 after a one-off pair search; the same code runs on a laptop CPU.
  • Everything in one vocabulary. Shear, clustering, galaxy-galaxy lensing and 3×2pt from one object; 3PCF multipoles for any mix of spin-0 and spin-2 fields; the integrated 3PCF with its aperture filters; aperture-mass PDFs and moments.
  • Built for suites. Streaming HDF5 writers with provenance and resume, loaders that hide the upload behind the measurement, multi-GPU splitting, and an optional treecode that cuts the pair count at large separations.
  • Checked. Every GPU kernel has a NumPy twin and a brute-force reference test at machine precision; mypy --strict clean; ships py.typed.

Installation

Python 3.12 or newer:

pip install pixpoint             # CPU
pip install "pixpoint[gpu]"      # + CuPy for NVIDIA GPUs (CUDA 12 build)

The gpu extra installs cupy-cuda12x, which runs on any driver that supports CUDA 12 or newer; for a CUDA 13 build install pixpoint and cupy-cuda13x instead. PixPoint picks the GPU automatically. Details, including the development install, in the installation guide.

Learn more

PixPoint was called CosmoFuse before version 8.0.0; import CosmoFuse is now import pixpoint, nothing else in the API changed, and old pair files are still read.

Citing

Until PixPoint has a software paper of its own, please cite the paper it was developed for, Gebauer et al. 2026, SBi3PCF: simulation-based inference with the integrated 3PCF, JCAP 06 (2026) 036 (arXiv:2510.13805), and name the PixPoint version you used. Please also cite the papers behind the estimators you use. The BibTeX entry and those papers are on the Citing page.

Contributing

Issues and pull requests are welcome; see CONTRIBUTING.md. PixPoint is released under the MIT licence.

Metadata

Release files for pixpoint 8.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pixpoint 8.1.0
File Size Uploaded Provenance Actions
pixpoint-8.1.0.tar.gz 375.0 kB With provenance Details for pixpoint-8.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pixpoint 8.1.0
File Interpreter ABI Platform Actions
pixpoint-8.1.0-py3-none-any.whl Python 3 none any Details for pixpoint-8.1.0-py3-none-any.whl

Total release size: 633.2 kB

Release files / pixpoint-8.1.0.tar.gz

Download URL pixpoint-8.1.0.tar.gz
Size 375.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9aa1c81a6a24d6290a594ca8195e5ac6295198d99f183b12b1761ff29ea1f41a
BLAKE2b-256 checksum
How to use checksums
7f8ef11eefe8cb0f7ebd67c3b284024d5c44e69d4b4c50e075846f7bcce09da3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 4, 2026.

Transparency log

Release files / pixpoint-8.1.0-py3-none-any.whl

Download URL pixpoint-8.1.0-py3-none-any.whl
Size 258.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1782395422764bada8b4ca892782e77e94d97b28f29b7f3c865c5f57a1da1f6a
BLAKE2b-256 checksum
How to use checksums
2fd8e57cfaf902cbeebfdc1d06c9f752e9e7726fc6ba1deb1f063707bd2f6a78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 4, 2026.

Transparency log

Security for pixpoint 8.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pixpoint-8.1.0.tar.gz

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 Nov 4, 2026.

Transparency log

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.

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