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.0.1

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.0.1
File Size Uploaded Provenance Actions
pixpoint-8.0.1.tar.gz 370.4 kB With provenance Details for pixpoint-8.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 625.5 kB

Release files / pixpoint-8.0.1.tar.gz

Download URL pixpoint-8.0.1.tar.gz
Size 370.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ba33355c9e2c7fa92dc1cff197bfb07206042bdc42f003af0f4a0e3ad04745f6
BLAKE2b-256 checksum
How to use checksums
79ad00c7ff3d5c7a75e42a8ebc18495f2a6ea820bd8478a8c81e71749e6c8849
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 3, 2026.

Transparency log

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

Download URL pixpoint-8.0.1-py3-none-any.whl
Size 255.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56296b8334604c19445f2755fb50bbe150d112352ecc965ae8852e9fe5c90166
BLAKE2b-256 checksum
How to use checksums
e3f69522d94bb3e4d0acb27a58f47bf82ad49f3e2a9304010a1b307deb53d6fb
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 3, 2026.

Transparency log

Security for pixpoint 8.0.1

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.0.1.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 3, 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