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, lat : Quantity

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

nside : int

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

order : { ‘nested’ | ‘ring’ }

Order of HEALPix pixels

Returns:

indices : ndarray

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

weights : ndarray

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