Fast HEALPix center-in-polygon coverage for convex spherical polygons.
Project description
Polypix
Fast HEALPix center-in-polygon coverage for convex spherical polygons.
Polypix takes one polygon or a batch of polygons on the unit sphere and returns the HEALPix cells whose centers fall inside each polygon. It is meant for throughput-oriented workloads where the input is already a valid convex spherical polygon.
import numpy as np
import polypix as px
polygon = np.array(
[
[-5.0, -5.0],
[12.0, -4.0],
[10.0, 9.0],
[-6.0, 7.0],
],
dtype=np.float64,
)
cell_ids = px.cover(px.Polygon.from_lonlat(polygon), resolution=8)
centers = px.center(cell_ids)
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
center() or boundary() when you need longitude/latitude geometry.
Scope
Polypix supports:
- convex spherical polygons with great-circle edges,
- longitude/latitude vertices in degrees,
- unit-vector vertices as
(x, y, z), - dense and ragged polygon batches.
Polypix does not support holes, non-convex polygons, planar geometry semantics, or conservative overlap coverage. A cell is included only when its center is inside the polygon.
Install
Polypix supports Python 3.12 and newer on Linux x86_64 and macOS 11 or newer on Intel and Apple Silicon:
python -m pip install polypix
Windows wheels are not enabled yet because healpix_cxx is not currently
available as a conda-forge win-64 package.
Development
Polypix uses Pixi for the supported development environments:
- Linux x86_64
- macOS 11 or newer on Intel
- macOS 11 or newer on Apple Silicon
Install Pixi, then run:
pixi run test
That command creates a conda-forge based environment with Python, NumPy, CMake,
nanobind, and healpix_cxx, installs Polypix in editable mode without build
isolation, and runs the test suite.
To build a local wheel:
pixi run wheel
The local wheel bundles runtime libraries from the active build environment for
smoke testing. Publishable wheels are built by the release workflow with
cibuildwheel and repaired with the platform wheel repair tools.
Build the documentation site with Zensical:
pixi run docs-build
Preview the documentation while editing:
pixi run docs-serve
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file polypix-0.1.0.tar.gz.
File metadata
- Download URL: polypix-0.1.0.tar.gz
- Upload date:
- Size: 111.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba93617275be81958e25598f6678fd739ab98beafa74022dd231637b8c776082
|
|
| MD5 |
fca415bd899c3e1839b4e18f51bdf1ed
|
|
| BLAKE2b-256 |
eb2a737e80db77e168ce27568235d00ffe56288e91795ba7a3c92282be00a161
|
Provenance
The following attestation bundles were made for polypix-0.1.0.tar.gz:
Publisher:
release.yml on JochimMaene/polypix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polypix-0.1.0.tar.gz -
Subject digest:
ba93617275be81958e25598f6678fd739ab98beafa74022dd231637b8c776082 - Sigstore transparency entry: 1719804553
- Sigstore integration time:
-
Permalink:
JochimMaene/polypix@98c67358c164b5de86e5bb15c63384df0e12f65e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JochimMaene
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98c67358c164b5de86e5bb15c63384df0e12f65e -
Trigger Event:
release
-
Statement type:
File details
Details for the file polypix-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: polypix-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.14, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dd4fce0e4c38d4d59cd1f6e4027039b4fa48e396cfd00fa686dde7250a8ae7c
|
|
| MD5 |
c9ff70e64a17d2f2b48429c23e52dc60
|
|
| BLAKE2b-256 |
64026044b51d2c5cce6cff36aaf4172384abf0d9ed0449d1633fe8d0a05b6dd6
|
Provenance
The following attestation bundles were made for polypix-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl:
Publisher:
release.yml on JochimMaene/polypix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polypix-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl -
Subject digest:
9dd4fce0e4c38d4d59cd1f6e4027039b4fa48e396cfd00fa686dde7250a8ae7c - Sigstore transparency entry: 1719804819
- Sigstore integration time:
-
Permalink:
JochimMaene/polypix@98c67358c164b5de86e5bb15c63384df0e12f65e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JochimMaene
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98c67358c164b5de86e5bb15c63384df0e12f65e -
Trigger Event:
release
-
Statement type:
File details
Details for the file polypix-0.1.0-cp314-cp314-macosx_11_0_x86_64.whl.
File metadata
- Download URL: polypix-0.1.0-cp314-cp314-macosx_11_0_x86_64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.14, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e88728108dc6190d606392406d3ac4e8af3141bedcbd48059d7b826f0767e9be
|
|
| MD5 |
808a0b30de830153abf478f262eeec8c
|
|
| BLAKE2b-256 |
f13750499bf36a879ae5a1b65ae58e89a40739e919a928dc15235a0bf0ddcf74
|
Provenance
The following attestation bundles were made for polypix-0.1.0-cp314-cp314-macosx_11_0_x86_64.whl:
Publisher:
release.yml on JochimMaene/polypix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polypix-0.1.0-cp314-cp314-macosx_11_0_x86_64.whl -
Subject digest:
e88728108dc6190d606392406d3ac4e8af3141bedcbd48059d7b826f0767e9be - Sigstore transparency entry: 1719805449
- Sigstore integration time:
-
Permalink:
JochimMaene/polypix@98c67358c164b5de86e5bb15c63384df0e12f65e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JochimMaene
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98c67358c164b5de86e5bb15c63384df0e12f65e -
Trigger Event:
release
-
Statement type:
File details
Details for the file polypix-0.1.0-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: polypix-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af2be68153d0d30518dfc945d53337d1100e357458db9f45d183d2a48ef2166d
|
|
| MD5 |
2291205d5afbae5bd1676427feafabb6
|
|
| BLAKE2b-256 |
2a4092a1ebe272f6937c9da9b90e57b3503e6a52d3603b51df24b8f82d2ca18b
|
Provenance
The following attestation bundles were made for polypix-0.1.0-cp314-cp314-macosx_11_0_arm64.whl:
Publisher:
release.yml on JochimMaene/polypix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polypix-0.1.0-cp314-cp314-macosx_11_0_arm64.whl -
Subject digest:
af2be68153d0d30518dfc945d53337d1100e357458db9f45d183d2a48ef2166d - Sigstore transparency entry: 1719804707
- Sigstore integration time:
-
Permalink:
JochimMaene/polypix@98c67358c164b5de86e5bb15c63384df0e12f65e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JochimMaene
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98c67358c164b5de86e5bb15c63384df0e12f65e -
Trigger Event:
release
-
Statement type:
File details
Details for the file polypix-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: polypix-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.13, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f232dd64245edd0071bcef4afbf06d7a3168e1bedabe3e37278f5deee61c1c00
|
|
| MD5 |
0521d0aef0ac8b53150ca29a9006c962
|
|
| BLAKE2b-256 |
8158558b69580b01c77a08bab2a1e00f279514cd88bc04876d993cea06aa58c1
|
Provenance
The following attestation bundles were made for polypix-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl:
Publisher:
release.yml on JochimMaene/polypix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polypix-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl -
Subject digest:
f232dd64245edd0071bcef4afbf06d7a3168e1bedabe3e37278f5deee61c1c00 - Sigstore transparency entry: 1719805191
- Sigstore integration time:
-
Permalink:
JochimMaene/polypix@98c67358c164b5de86e5bb15c63384df0e12f65e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JochimMaene
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98c67358c164b5de86e5bb15c63384df0e12f65e -
Trigger Event:
release
-
Statement type:
File details
Details for the file polypix-0.1.0-cp313-cp313-macosx_11_0_x86_64.whl.
File metadata
- Download URL: polypix-0.1.0-cp313-cp313-macosx_11_0_x86_64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.13, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68884789c39d8ef453ab0a86c8cf7125466a4d44397cbb5222e7f389a8ff6ef1
|
|
| MD5 |
3c522a8fb1d73b838e915627b0fd4550
|
|
| BLAKE2b-256 |
ce107cad381b59941d46e7f7da1209a984adc4fd16e2996da1e1130112dd50f3
|
Provenance
The following attestation bundles were made for polypix-0.1.0-cp313-cp313-macosx_11_0_x86_64.whl:
Publisher:
release.yml on JochimMaene/polypix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polypix-0.1.0-cp313-cp313-macosx_11_0_x86_64.whl -
Subject digest:
68884789c39d8ef453ab0a86c8cf7125466a4d44397cbb5222e7f389a8ff6ef1 - Sigstore transparency entry: 1719805078
- Sigstore integration time:
-
Permalink:
JochimMaene/polypix@98c67358c164b5de86e5bb15c63384df0e12f65e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JochimMaene
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98c67358c164b5de86e5bb15c63384df0e12f65e -
Trigger Event:
release
-
Statement type:
File details
Details for the file polypix-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: polypix-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
075f3e49ca9dbf8033722ac25768d19d791d0ad687ab84bec40af47d57cd4634
|
|
| MD5 |
5d7ec160209b665e561a35a4166dec65
|
|
| BLAKE2b-256 |
a60c0be6401f538e1d1b5af93babf688c79657e22b76ab7e662233d6dc923847
|
Provenance
The following attestation bundles were made for polypix-0.1.0-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
release.yml on JochimMaene/polypix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polypix-0.1.0-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
075f3e49ca9dbf8033722ac25768d19d791d0ad687ab84bec40af47d57cd4634 - Sigstore transparency entry: 1719805385
- Sigstore integration time:
-
Permalink:
JochimMaene/polypix@98c67358c164b5de86e5bb15c63384df0e12f65e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JochimMaene
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98c67358c164b5de86e5bb15c63384df0e12f65e -
Trigger Event:
release
-
Statement type:
File details
Details for the file polypix-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: polypix-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3aa421fb9cc9965ef2fa83e7091bb7a58a3d25cac77f55420b6f3c8c7906c2c
|
|
| MD5 |
1fb8c6138d76190d7d9fe964f1214561
|
|
| BLAKE2b-256 |
5f951655f29b1c4dd7e40361448134ec81c215404a0950e2e93321053595f96c
|
Provenance
The following attestation bundles were made for polypix-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl:
Publisher:
release.yml on JochimMaene/polypix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polypix-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl -
Subject digest:
e3aa421fb9cc9965ef2fa83e7091bb7a58a3d25cac77f55420b6f3c8c7906c2c - Sigstore transparency entry: 1719805535
- Sigstore integration time:
-
Permalink:
JochimMaene/polypix@98c67358c164b5de86e5bb15c63384df0e12f65e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JochimMaene
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98c67358c164b5de86e5bb15c63384df0e12f65e -
Trigger Event:
release
-
Statement type:
File details
Details for the file polypix-0.1.0-cp312-cp312-macosx_11_0_x86_64.whl.
File metadata
- Download URL: polypix-0.1.0-cp312-cp312-macosx_11_0_x86_64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.12, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
583279eff158dafc7c1f135d950f73ecdf87798609ec2b18cc904126e685cbfa
|
|
| MD5 |
36878ee3d48c2f725065c45b4f8cc83c
|
|
| BLAKE2b-256 |
4ba04846fe2a9c0a00bbd70ffccb579e1750609d8a440589e67144195cc5ba39
|
Provenance
The following attestation bundles were made for polypix-0.1.0-cp312-cp312-macosx_11_0_x86_64.whl:
Publisher:
release.yml on JochimMaene/polypix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polypix-0.1.0-cp312-cp312-macosx_11_0_x86_64.whl -
Subject digest:
583279eff158dafc7c1f135d950f73ecdf87798609ec2b18cc904126e685cbfa - Sigstore transparency entry: 1719804947
- Sigstore integration time:
-
Permalink:
JochimMaene/polypix@98c67358c164b5de86e5bb15c63384df0e12f65e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JochimMaene
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98c67358c164b5de86e5bb15c63384df0e12f65e -
Trigger Event:
release
-
Statement type:
File details
Details for the file polypix-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: polypix-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aaea4d0cdc810f28a1db28a8c64a0e77218e395b64790225efe55f616b760927
|
|
| MD5 |
8b08c4658921ca1037bf27b17b1e893b
|
|
| BLAKE2b-256 |
235a716202c5dfbaf756f0e419a277c3020734059d1e3bd6a6b573a74db32295
|
Provenance
The following attestation bundles were made for polypix-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
release.yml on JochimMaene/polypix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polypix-0.1.0-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
aaea4d0cdc810f28a1db28a8c64a0e77218e395b64790225efe55f616b760927 - Sigstore transparency entry: 1719805298
- Sigstore integration time:
-
Permalink:
JochimMaene/polypix@98c67358c164b5de86e5bb15c63384df0e12f65e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JochimMaene
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98c67358c164b5de86e5bb15c63384df0e12f65e -
Trigger Event:
release
-
Statement type: