Skip to main content

Polypix

Fast HEALPix coverage for convex footprints on the sphere.

PyPI Python 3.12+ License Tests Docs Benchmarks

Documentation | PyPI | Repository | Issues

Polypix returns the HEALPix cells whose centers fall inside convex footprints on the unit sphere. It is built for coverage simulations and indexing pipelines where footprints are already valid spherical geometry and throughput matters.

Typical inputs are sensor footprints, beam contours, access regions, and swath edges from satellite, aerial, astronomy, or other spherical-domain simulations. Use Polypix when you want deterministic center-sampled coverage for convex regions. It is not a fit for holes, non-convex footprints, planar geometry semantics, conservative overlap coverage, or generating footprints from orbit, attitude, sensor, or beam models.

Install

python -m pip install polypix

Published wheels support Python 3.12 and newer on Linux x86_64 and macOS 11 or newer on Intel and Apple Silicon.

Quick Start

import math

import numpy as np
import polypix as px


def lonlat_to_xyz(lon_deg, lat_deg):
    lon = math.radians(lon_deg)
    lat = math.radians(lat_deg)
    cos_lat = math.cos(lat)
    return cos_lat * math.cos(lon), cos_lat * math.sin(lon), math.sin(lat)


footprint = np.asarray(
    [
        lonlat_to_xyz(-5.0, -5.0),
        lonlat_to_xyz(12.0, -4.0),
        lonlat_to_xyz(10.0, 9.0),
        lonlat_to_xyz(-6.0, 7.0),
    ],
    dtype=np.float64,
)

coverage = px.cover_footprint(footprint, resolution=8)
centers = px.centers(coverage.cell_ids)
boundaries = px.boundaries(coverage.cell_ids[:3])

The returned cell IDs are packed uint64 tokens that include both the HEALPix resolution and the NESTED pixel index. Treat them as opaque IDs; use centers() or boundaries() when you need longitude/latitude geometry.

Supported Inputs

Polypix supports:

  • convex spherical footprints with great-circle edges,
  • unit-vector vertices as (x, y, z),
  • dense footprint batches as arrays with shape (footprints, vertices, 3),
  • swaths from sampled left and right edge vectors.

Vertex orientation does not matter; Polypix normalizes it internally. A repeated final vertex is accepted as a closed-ring marker.

Coverage Rule

Polypix uses center-in-footprint coverage: a HEALPix cell is included only when its center lies inside the footprint. Boundary-touching cells whose centers fall outside the footprint are excluded.

Windows wheels are not published because healpix_cxx is not currently available as a conda-forge win-64 package.

Documentation

The public documentation is published at https://jochimmaene.github.io/polypix/:

Contributor workflows, release notes, and local docs authoring live in the development guide instead of this user-facing overview.

License

Polypix is distributed under GPL-3.0-or-later. This reflects the binary distribution relationship with HEALPix C++, which is GPL-2.0-or-later. See THIRD_PARTY_NOTICES.md for native dependency notices.

Metadata

Release files for polypix 0.2.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 polypix 0.2.1
File Size Uploaded Provenance
polypix-0.2.1.tar.gz 123.9 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for polypix 0.2.1
File
polypix-0.2.1-cp314-cp314-manylinux_2_34_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.34+ x86-64 Details
polypix-0.2.1-cp314-cp314-macosx_11_0_x86_64.whl CPython 3.14 CPython 3.14 macOS 11.0+ x86-64 Details
polypix-0.2.1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
polypix-0.2.1-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details
polypix-0.2.1-cp313-cp313-macosx_11_0_x86_64.whl CPython 3.13 CPython 3.13 macOS 11.0+ x86-64 Details
polypix-0.2.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
polypix-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details
polypix-0.2.1-cp312-cp312-macosx_11_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 11.0+ x86-64 Details
polypix-0.2.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details

Total release size: 142.6 MB

Release files / polypix-0.2.1.tar.gz

Download URL polypix-0.2.1.tar.gz
Size 123.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c60a8184bbc6b792f0379c03f2229871174792869d669bcb875b6ba68f20651b
BLAKE2b-256 checksum
How to use checksums
80dec9d6d27402de0a12d18fde6414b4e5c423e9a6eebbb241c945e7a02219f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 24, 2026.

Transparency log

Release files / polypix-0.2.1-cp314-cp314-manylinux_2_34_x86_64.whl

Download URL polypix-0.2.1-cp314-cp314-manylinux_2_34_x86_64.whl
Size 7.4 MB
Tags CPython 3.14 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
1a88cbdfd512cdb601b9b27b83691116f3ffccb0864e7c1b98020ef0e530de9c
BLAKE2b-256 checksum
How to use checksums
785d23c213247fc6e5c16cac8be7641e579dda1171817c56bad1d0df9fd0e7a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 24, 2026.

Transparency log

Release files / polypix-0.2.1-cp314-cp314-macosx_11_0_x86_64.whl

Download URL polypix-0.2.1-cp314-cp314-macosx_11_0_x86_64.whl
Size 20.2 MB
Tags CPython 3.14 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
c117e201eec682a9db4bb507f7d58c5c6539f159b11b39469fa6fffe9e908e04
BLAKE2b-256 checksum
How to use checksums
6b1b99b8e37aa46c20306283d976d7b60ce56167abfc7818e067a0365f1799ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 24, 2026.

Transparency log

Release files / polypix-0.2.1-cp314-cp314-macosx_11_0_arm64.whl

Download URL polypix-0.2.1-cp314-cp314-macosx_11_0_arm64.whl
Size 19.9 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ff35a896a2f35423e38d45d0cb78c2fcf0f9445fee2c5705ee34f1d97e49d9bb
BLAKE2b-256 checksum
How to use checksums
48bb92967eb006b0c22e88374475d14203430fc8bb83313c041ed4af3b1df1ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 24, 2026.

Transparency log

Release files / polypix-0.2.1-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL polypix-0.2.1-cp313-cp313-manylinux_2_34_x86_64.whl
Size 7.4 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
ae9c43dd46e2580278f4f129d3f22dc2aaeeff5b78ff59fe6dc9fe7a180c0ca0
BLAKE2b-256 checksum
How to use checksums
31c13009fd4805de53365075beb8f5d7efc300592def4fcb7970124407f1dea0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 24, 2026.

Transparency log

Release files / polypix-0.2.1-cp313-cp313-macosx_11_0_x86_64.whl

Download URL polypix-0.2.1-cp313-cp313-macosx_11_0_x86_64.whl
Size 20.2 MB
Tags CPython 3.13 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
5c0b44ae59a13b3b3909cae112132a7373dd0ab04f0bf81f04dcf129f5461f27
BLAKE2b-256 checksum
How to use checksums
473069034315aff70cabd31330991dd5b2ca7f7a3133783b52c5655409cf6270
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 24, 2026.

Transparency log

Release files / polypix-0.2.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL polypix-0.2.1-cp313-cp313-macosx_11_0_arm64.whl
Size 19.9 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
05e6b0a9849bacace217a6b98f3f3675a0433f5b928778f189f0d89f3fbe8325
BLAKE2b-256 checksum
How to use checksums
409e6c149a2b1fda2aef713453e07755775b3cade4cc9e94f493a752214b262f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 24, 2026.

Transparency log

Release files / polypix-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL polypix-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl
Size 7.4 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
fa12248452a04993d07869452c7c4e9b271073471e57899abc7de0fa90be53ce
BLAKE2b-256 checksum
How to use checksums
b5bca005604069240fb19c7999ee98447170f83d5222d6b6f4f18ce32d51db3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 24, 2026.

Transparency log

Release files / polypix-0.2.1-cp312-cp312-macosx_11_0_x86_64.whl

Download URL polypix-0.2.1-cp312-cp312-macosx_11_0_x86_64.whl
Size 20.2 MB
Tags CPython 3.12 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
f6ba7d5f6fefdf00e87133cb1b26886edd9f52c5a92c982e4fca2943d0fc99aa
BLAKE2b-256 checksum
How to use checksums
714042295eb8203caa114f3fa8e9ea3483e4b1e3f0bf4eba1c916501528116ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 24, 2026.

Transparency log

Release files / polypix-0.2.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL polypix-0.2.1-cp312-cp312-macosx_11_0_arm64.whl
Size 19.9 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
48d97654a64285a93cbab0eed8469059f158524a2252489d5bfa14abf6c7a9f5
BLAKE2b-256 checksum
How to use checksums
42475e3523ed2ff88d41a390e9563bac221f45eba2c82cfad9591a8bfec08c86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 24, 2026.

Transparency log

Security for polypix 0.2.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

All 10 files in this release have been uploaded with provenance metadata.

Select from 10 files

Attestation for polypix-0.2.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 Jul 24, 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.

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