astropy / reproject

Python-based Astronomical image reprojection :milky_way: - maintainer @astrofrog
https://reproject.readthedocs.io
BSD 3-Clause "New" or "Revised" License
108 stars 66 forks source link

Make interpolation algorithm more flexible #108

Open eteq opened 8 years ago

eteq commented 8 years ago

Right now it appears that reprojecting by interpolation is only available as polynomial interpolation. Is that an intended restriction? For example, I would love to see Lanczos resampling (due to it's excellent smoothness and theoretically near-ideal S/N properties). But I presume other people have preferred algorithms they might also want to use?

astrofrog commented 8 years ago

We rely on map_coordinates, so we are restricted to whatever they are using. But of course we could simply replace that internally with other interpolation functions if needed.

eteq commented 8 years ago

Ohh, gotcha. Might be worth mentioning that in the docs for now just so no one else asks the same question.

It's tempting to say something like "allow anything that's compatible with map_coordinates"... Then if I wanted I could write my own resampler but let reproject take care of the wcs details and such, right?

The biggest question in my mind right now for that is that order isn't really a good name if other interpolation schemes are to be used. Do you think there should be a new function for that sort of thing, or is reproject_interp malleable enough yet that order could be renamed to interp_type or something?