No project description provided
Project description
hpinterp
A faster (~100x) and more accurate interpolation algorithm for HEALPix maps by Prof. Jonathan Sievers. The code pre-interpolates the map data in advance, saving time at the evaluation stage.
Installation
pip install hpinterp
Example
import numpy as np
import healpy as hp
from hpinterp import InterpMap
map_ = hp.read_map("your_map.fits")
# Set nest=True if your map has nested ordering
interp_map = InterpMap(map_)
# Generating example coordinate grid of co-latitude and longitude in radians
npoints = int(1e5)
theta = np.random.rand(npoints) * np.pi
phi = np.random.rand(2 * npoints) * 2 * np.pi
# Get interpolated values. Set lonlat=True if using longitude and latitude in degrees
interp_result = interp_map(theta, phi)
# or
interp_result = interp_map.get_interp_val(theta, phi)
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
hpinterp-0.1.1.tar.gz
(3.9 kB
view details)
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 hpinterp-0.1.1.tar.gz.
File metadata
- Download URL: hpinterp-0.1.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.19.0-32-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfb23930cf50b68c0b38440778ec4246c76bbb5d83a2093f60ee64e39c1f5af5
|
|
| MD5 |
b88854463e3d52e23b2c706e6c6bcf57
|
|
| BLAKE2b-256 |
168bf48ac459d29f2484a794e708903780d35a096dad8d755a13f19910d5a58b
|
File details
Details for the file hpinterp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: hpinterp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.19.0-32-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3da8684c6903ddead0164520c32941020b9789072114a9e565f2ca78e68016f0
|
|
| MD5 |
eeead62f2a68b9206ac46bca97059493
|
|
| BLAKE2b-256 |
25acf2e602447a856887cb1b6de9eeed6209d900a784d538de403e122b2e83a1
|