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.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.0.0
File Size Uploaded Provenance Actions
pixpoint-8.0.0.tar.gz 369.9 kB With provenance Details for pixpoint-8.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 625.6 kB

Release files / pixpoint-8.0.0.tar.gz

Download URL pixpoint-8.0.0.tar.gz
Size 369.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cade75ae2510a517af351fa4f8469f22599f2d7d3d672141876c524f8ce1b45d
BLAKE2b-256 checksum
How to use checksums
99e8ca8f673825337fd1eb71d65232778f08b7c2d2201988937f3111fdf3c0ba
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.0-py3-none-any.whl

Download URL pixpoint-8.0.0-py3-none-any.whl
Size 255.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c37f70559ea027e692b9e3edf5740b8c887e5377622a0bb37fa41346c0c0e12
BLAKE2b-256 checksum
How to use checksums
eb7c02b9c0210729417fb2a0b49c6ee76e8e8fc41c459a09632b5a5f3b42416c
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.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.0.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 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