[AstroPy] WCS reprojection

Adam Ginsburg adam.g.ginsburg at gmail.com
Thu Jun 12 03:27:34 EDT 2014


I've implemented wrappers of both the process Leo outlined and the
pyAST version (with help from Tim & David) as part of FITS_tools:
https://github.com/keflavich/FITS_tools/blob/master/FITS_tools/hcongrid.py

The latter tool, "wcsalign", is just a copy of the script David sent,
but with a different docstring format.

On Thu, Jun 12, 2014 at 8:52 AM, David Berry <d.berry at jach.hawaii.edu> wrote:
> On 11 June 2014 19:30, David Berry <d.berry at jach.hawaii.edu> wrote:
>> On 11 June 2014 19: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.
>>
>> pyast can do that sort of thing. The attached script will re-project a
>> given input image so that it aligned with a given reference image. So
>> if your input image is in TAN projection and you can create a
>> reference image in CAR projection, it should do the job. If you do not
>> have a CAR image, the script could be modified to create a suitable
>> header for you from scratch.
>
> As it stands, the script uses bi-linear interpolation within the input
> pixel values to determine each output pixel value. But this can be
> changed easily, by changing the "Ast.LINEAR" constant passed to the
> resample method to one of the other interpolation methods supported by
> AST (see the section "Sub-Pixel Interpolation Schemes" at
> http://starlink.jach.hawaii.edu/devdocs/sun211.htx/node385.html).
> Available methods include nearest neighbour, Gaussian, various forms
> of sinc interpolation, etc.
>
> David
>
>
>
>> David
>>
>>
>>> 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
>>>
>>> _______________________________________________
>>> AstroPy mailing list
>>> AstroPy at scipy.org
>>> http://mail.scipy.org/mailman/listinfo/astropy
>>>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy



-- 
Adam Ginsburg
Fellow, European Southern Observatory
http://www.adamgginsburg.com/



More information about the AstroPy mailing list