[AstroPy] WCS reprojection

David Berry d.berry at jach.hawaii.edu
Thu Jun 12 02:52:15 EDT 2014


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
>>



More information about the AstroPy mailing list