Sparse GPU-enabled regridding from lon/lat to HEALPix
Project description
healpix-resample
healpix-resample is a lightweight Python package designed to regrid
data defined on longitude--latitude coordinates onto a HEALPix
grid.
The package provides GPU-accelerated operators (via PyTorch) to construct sparse linear mappings between input geodetic coordinates and a target HEALPix tessellation at a chosen resolution level.
This package manages the HEALPix authalic definition and the Earth ellipsoid using the WGS84 reference system.
Objectives
The main goals of the package are:
- Provide a generic regridding framework from (lon, lat) to HEALPix.
- Support different interpolation strategies:
- Nearest-neighbor mapping
- PSF / multi-point weighted interpolation
- Enable efficient handling of:
- Large numbers of input points
- Batched data
(B, N) - CUDA acceleration
- Offer a reusable linear operator that can be:
- Applied forward (data → HEALPix)
- Used inside inverse problems or iterative solvers
Design Principles
- Modular architecture:
knnmodule: generic operator constructionnearest: nearest-neighbor specializationpsf: weighted multi-point interpolation
- Sparse matrix representation for scalability
- Torch-based implementation for CPU/GPU flexibility
- Resolution controlled via HEALPix level parameter
Installation (Private Repository)
This package is distributed as a private repository and must be installed from source.
Clone the repository
git clone https://github.com/EOPF-DGGS/healpix-resample.git
cd healpix-resample
If you use SSH access:
git clone git@github.com:EOPF-DGGS/healpix-resample.git
cd healpix-resample
Install in editable mode (recommended for development)
pip install -e .
Editable mode allows you to modify the source code without reinstalling the package after each change.
Standard installation (optional)
If you do not need editable mode:
pip install .
Requirements
Make sure you are using:
- Python ≥ 3.8
- A working PyTorch installation (CPU or CUDA)
- numpy
- healpix-geo
Verifying the installation
After installation:
import healpix_resample
print(healpix_resample.__file__)
If no error occurs, the installation is successful.
Typical Use Case
from healpix_resample.nearest import NearestResampler
op = NearestResampler(lon_deg=lon, lat_deg=lat, level=level, device="cuda")
healpix_values = op.resample(values)
Target Applications
- Earth observation data remapping
- Oceanographic or atmospheric gridding
- Astronomical sky projections
- Large-scale geospatial data harmonization
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 healpix_resample-2026.5.1.tar.gz.
File metadata
- Download URL: healpix_resample-2026.5.1.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
819773af85229475dbd4d5528511a7242083a5555296ff7e51bda9839777ac81
|
|
| MD5 |
0b59ef6f28349512eb6cbaa32be44d16
|
|
| BLAKE2b-256 |
cf9deb1f6de7b6c480e74a3cb94b18333bb09063ea8a773e95b9efb6785b92e6
|
Provenance
The following attestation bundles were made for healpix_resample-2026.5.1.tar.gz:
Publisher:
pypipublish.yml on EOPF-DGGS/healpix-resample
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
healpix_resample-2026.5.1.tar.gz -
Subject digest:
819773af85229475dbd4d5528511a7242083a5555296ff7e51bda9839777ac81 - Sigstore transparency entry: 1458694808
- Sigstore integration time:
-
Permalink:
EOPF-DGGS/healpix-resample@2c0626eed028aae0cc7592f60dae79840d2df064 -
Branch / Tag:
refs/tags/v2026.5.1 - Owner: https://github.com/EOPF-DGGS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypipublish.yml@2c0626eed028aae0cc7592f60dae79840d2df064 -
Trigger Event:
release
-
Statement type:
File details
Details for the file healpix_resample-2026.5.1-py3-none-any.whl.
File metadata
- Download URL: healpix_resample-2026.5.1-py3-none-any.whl
- Upload date:
- Size: 26.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f530a673f51ec9523df415acbbf7352e0ff1a7296e0f69c867497fb3836efec
|
|
| MD5 |
5285308d344c672b5185d14fe7c24c7c
|
|
| BLAKE2b-256 |
0ab779d19fcf4357e36c90eafdac781f5badb167f36ef0b8aecc395083aed1bb
|
Provenance
The following attestation bundles were made for healpix_resample-2026.5.1-py3-none-any.whl:
Publisher:
pypipublish.yml on EOPF-DGGS/healpix-resample
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
healpix_resample-2026.5.1-py3-none-any.whl -
Subject digest:
5f530a673f51ec9523df415acbbf7352e0ff1a7296e0f69c867497fb3836efec - Sigstore transparency entry: 1458695134
- Sigstore integration time:
-
Permalink:
EOPF-DGGS/healpix-resample@2c0626eed028aae0cc7592f60dae79840d2df064 -
Branch / Tag:
refs/tags/v2026.5.1 - Owner: https://github.com/EOPF-DGGS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypipublish.yml@2c0626eed028aae0cc7592f60dae79840d2df064 -
Trigger Event:
release
-
Statement type: