healpix_resample.BilinearResampler#
- class healpix_resample.BilinearResampler(*args, area=None, **kwargs)[source]#
Bilinear (Npt=4, inverse-distance weighted) HEALPix resampler.
- Parameters:
area (
array-likeorNone) – Per-sample pixel area/weight, shape(N,). Only used byresample(conservative=True)(see below) – ignored by the default interpolation path. Defaults to1.0for every sample (equal-area pixels / already-extensive quantities), the same convention asConservativeResampler.All other parameters are forwarded to ``KNeighborsResampler``.
- __init__(*args, area=None, **kwargs)[source]#
Pre-compute sparse operators.
- Parameters:
lon_deg, lat_deg – unstructured sample coordinates in degrees, shape (N,)
Npt – number of nearest HEALPix cells used per sample
level – HEALPix level, nside = 2**level
sigma_m – Gaussian length scale (meters). If None, uses the HEALPix pixel scale sigma = sqrt(4*pi/(12*4**level))*R.
threshold – keep only HEALPix cells whose global weight sum >= threshold
nest – HEALPix indexing scheme
dtype/device – torch dtype/device for all matrices and computations
Methods
__init__(*args[, area])Pre-compute sparse operators.
comp_matrix()get_cell_ids()invert(hval)Project HEALPix field back to the sample locations.
resample(val, *[, conservative])Estimate the HEALPix field from unstructured samples.