bilinear_interpolation_weights

astropy_healpix.bilinear_interpolation_weights(lon, lat, nside, order='ring')[source]

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

Parameters
lon, latQuantity

The longitude and latitude values as Quantity instances with angle units.

nsideint

Number of pixels along the side of each of the 12 top-level HEALPix tiles

order{ ‘nested’ | ‘ring’ }

Order of HEALPix pixels

Returns
indicesndarray

2-D array with shape (4, N) giving the four indices to use for the interpolation

weightsndarray

2-D array with shape (4, N) giving the four weights to use for the interpolation