This implements LibHealpix.interpolate(map, theta, phi) for linearly interpolating between the 4 nearest pixels to the coordinates (theta, phi). This is useful for rotating maps to new coordinate systems.
The current implementation is not ideal because we need to call to_cxx (making a copy of the map) in order to do map->get_interpol(ptg, pix, wgt); It's probably possible to get the nearest pixels without doing this, but I didn't figure out how. I implemented a vectorized LibHealpix.interpolate to help amortize the cost of to_cxx over several interpolations.
This implements
LibHealpix.interpolate(map, theta, phi)
for linearly interpolating between the 4 nearest pixels to the coordinates(theta, phi)
. This is useful for rotating maps to new coordinate systems.The current implementation is not ideal because we need to call
to_cxx
(making a copy of the map) in order to domap->get_interpol(ptg, pix, wgt);
It's probably possible to get the nearest pixels without doing this, but I didn't figure out how. I implemented a vectorizedLibHealpix.interpolate
to help amortize the cost ofto_cxx
over several interpolations.