[AstroPy] WCS reprojection
Leo Singer
lsinger at caltech.edu
Wed Jun 11 17:57:54 EDT 2014
> On Jun 11, 2014, at 11:10, Stuart Mumford <stuart at mumford.me.uk> wrote:
>
> Hello,
>
> I am looking for a way to change the projection of my solar image data. Specifically to re-project my TAN projected helioprojective Cartesian data array into a CAR Plate carree projected heliographic map.
>
> The only thing that I could find that looks like it might be able to do this is Kapteyn's coord_map function (https://www.astro.rug.nl/software/kapteyn/wcs.html#function-coordmap). Are there other options? Is this possible using astropy.wcs?
>
> Any suggestions are welcome.
>
> Thanks
> Stuart
Hi Stuart,
If you were to do this in Astropy, the basic algorithm for nearest-neighbor mapping between the two projections would be:
Construct new WCS object representing target projection
Create array of pixels in target projection
For each pixel, convert to world coordinates with WCS.wcs_pix2world
Convert to pixel index in original projection with WCS.wcs_world2pix
Retrieve value from original array, store in target array
Leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20140611/c5ba03f7/attachment.html>
More information about the AstroPy
mailing list