mweastwood / LibHealpix.jl

A Julia wrapper of the Healpix library.
http://mweastwood.info/LibHealpix.jl/stable/
Other
11 stars 7 forks source link

linearly interpolating between pixels #23

Closed mweastwood closed 7 years ago

mweastwood commented 7 years ago

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.

mweastwood commented 7 years ago

The mac build is broken but will eventually be fixed when I get around to #20