Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several issues with interp_points #483

Closed
rhugonnet opened this issue Feb 7, 2024 · 0 comments · Fixed by #484
Closed

Several issues with interp_points #483

rhugonnet opened this issue Feb 7, 2024 · 0 comments · Fixed by #484
Labels
bug Something isn't working invalid This doesn't seem right priority

Comments

@rhugonnet
Copy link
Member

rhugonnet commented Feb 7, 2024

The Raster.interp_points function has several urgent issues:

  1. The mode argument is never used, and actually defines the wrong thing (it is the order argument that defines the type of interpolation in map_coordinates, mode is for behaviour around the margin of the image),
  2. The prefilter argument of map_coordinates runs by default: https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.map_coordinates.html#scipy-ndimage-map-coordinates. This spline pre-filter will actually expand NaNs for up to 20 PIXELS (tested with order=3 on this data: https://github.com/ICESat2-SlideRule/coregistration/blob/master/xdem_test.ipynb),
  3. Scipy's map_coordinates is used for performance (much faster than interpn), but only works on grids of equal spacing, need to combine with interpn,
  4. We need to clarify/merge behaviour with value_at_coords, see Improve docstrings of Raster.value_at_coords and Raster.interp_points, or merge the two methods. #395.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right priority
Projects
None yet
1 participant