toasty.samplers.healpix_fits_file_sampler(path, extension=None, interpolation='nearest', force_galactic=False)[source]

Create a sampler for HEALPix data read from a FITS file.


The path to the FITS file.

extensioninteger or None (default: None)

Which extension in the FITS file to read. If not specified, the first extension with PIXTYPE = “HEALPIX” will be used.

interpolation‘nearest’ | ‘bilinear’

What interpolation scheme to use.

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


If true, force use of Galactic coordinate system, regardless of what the headers say.

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