astropy_healpix Package


bilinear_interpolation_weights(lon, lat, nside)

Get the four neighbours for each (lon, lat) position and the weight associated with each one for bilinear interpolation.

boundaries_lonlat(healpix_index, step, nside)

Return the longitude and latitude of the edges of HEALPix pixels

healpix_to_lonlat(healpix_index, nside[, ...])

Convert HEALPix indices (optionally with offsets) to longitudes/latitudes.

healpix_to_xyz(healpix_index, nside[, dx, ...])

Convert HEALPix indices (optionally with offsets) to Cartesian coordinates.

interpolate_bilinear_lonlat(lon, lat, values)

Interpolate values at specific longitudes/latitudes using bilinear interpolation

level_ipix_to_uniq(level, ipix)

Convert a level and HEALPix index into a uniq number representing the cell.


Find the pixel dimensions of the top-level HEALPix tiles.

lonlat_to_healpix(lon, lat, nside[, ...])

Convert longitudes/latitudes to HEALPix indices

neighbours(healpix_index, nside[, order])

Find all the HEALPix pixels that are the neighbours of a HEALPix pixel


Find the number of pixels on the side of one of the 12 'top-level' HEALPix tiles given a total number of pixels.


Find the HEALPix level for a given nside.


Find the number of pixels corresponding to a HEALPix resolution.


Find the area of HEALPix pixels given the pixel dimensions of one of the 12 'top-level' HEALPix tiles.


Find the resolution of HEALPix pixels given the pixel dimensions of one of the 12 'top-level' HEALPix tiles.

pixel_resolution_to_nside(resolution[, round])

Find closest HEALPix nside for a given angular resolution.


Run the tests for the package.


Convert a HEALPix cell uniq number to its (level, ipix) equivalent.

xyz_to_healpix(x, y, z, nside[, ...])

Convert longitudes/latitudes to HEALPix indices


HEALPix([nside, order, frame])

A HEALPix pixellization.

astropy_healpix.healpy Module

This submodule provides a healpy-compatible interface.


nside2resol(nside[, arcmin])

Drop-in replacement for healpy nside2resol.

nside2pixarea(nside[, degrees])

Drop-in replacement for healpy nside2pixarea.


Drop-in replacement for healpy nside2npix.


Drop-in replacement for healpy npix2nside.

pix2ang(nside, ipix[, nest, lonlat])

Drop-in replacement for healpy pix2ang.

ang2pix(nside, theta, phi[, nest, lonlat])

Drop-in replacement for healpy ang2pix.

pix2vec(nside, ipix[, nest])

Drop-in replacement for healpy pix2vec.

vec2pix(nside, x, y, z[, nest])

Drop-in replacement for healpy vec2pix.


Drop-in replacement for healpy order2nside.

nest2ring(nside, ipix)

Drop-in replacement for healpy nest2ring.

ring2nest(nside, ipix)

Drop-in replacement for healpy ring2nest.

boundaries(nside, pix[, step, nest])

Drop-in replacement for healpy boundaries.

vec2ang(vectors[, lonlat])

Drop-in replacement for healpy vec2ang.

ang2vec(theta, phi[, lonlat])

Drop-in replacement for healpy ang2vec.

get_interp_weights(nside, theta[, phi, ...])

Drop-in replacement for healpy get_interp_weights.

get_interp_val(m, theta, phi[, nest, lonlat])

Drop-in replacement for healpy get_interp_val.