toasty.samplers.healpix_sampler(data, nest=False, coord='C', interpolation='nearest')[source]

Create a sampler for HEALPix image data.


The HEALPix data

nestbool (default: False)

Whether the data is ordered in the nested HEALPix style

coord‘C’ | ‘G’

Whether the image is in Celestial (C) or Galactic (G) coordinates

interpolation‘nearest’ | ‘bilinear’

What interpolation scheme to use.

WARNING: bilinear uses healpy’s get_interp_val, which seems prone to segfaults

A function that samples the HEALPix data; the call signature is
vec2pix(lon, lat) -> data, where the inputs and output are 2D arrays
and lon and lat are in radians.