[AstroPy] Rotate an image and create new FITS header with updated astrometry

Thomas Robitaille thomas.robitaille at gmail.com
Wed Nov 16 07:52:26 EST 2016


On 15 November 2016 at 15:55, Marcio Melendez <marcio.melendez at gmail.com> wrote:
> Hi Peter,
> I use Montage mainly for display purpose, to get the correct sky
> orientation, but I have never used it to perform any operation. I see that
> there is a rotation utility, mRotate, but from the description "This module
> is meant for quick-look only; it is not flux conserving." which is not
> useful for what I need. Are there any other options?

You can still do this with Montage - the easy way is to first run
mRotate, then run mGetHdr to get the header from the rotated image,
and mProject your original image to the new header to get your final
image - since mProject is flux-conserving.

Cheers,
Tom



>
> Thanks!
>
> On Tue, Nov 15, 2016 at 10:32 AM, Peter Teuben <teuben at astro.umd.edu> wrote:
>>
>> the best is to use the python interface to montage. it's a contributed
>> package for astropy.
>>
>>
>> On 11/15/2016 09:26 AM, Marcio Melendez wrote:
>>
>> Hi all,
>> Is there a similar function to IDL's  HROT in python, e.g., a function to
>> rotate an image and create a new FITS header with updated astrometry.
>>
>> Thanks!
>>
>> --
>> Marcio B. Melendez, Ph.D
>> JWST ISIM Optics Support Scientist
>> KBRwyle Science, Technology and Engineering Group
>> NASA Goddard Space Flight Center  Greenbelt, MD  20771
>> Bldg. 29 Rm. T29-10, phone: 301-286-8517
>>
>>
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at scipy.org
>> https://mail.scipy.org/mailman/listinfo/astropy
>>
>>
>>
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at scipy.org
>> https://mail.scipy.org/mailman/listinfo/astropy
>>
>
>
>
> --
> Marcio B. Melendez, Ph.D
> JWST ISIM Optics Support Scientist
> KBRwyle Science, Technology and Engineering Group
> NASA Goddard Space Flight Center  Greenbelt, MD  20771
> Bldg. 29 Rm. T29-10, phone: 301-286-8517
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> https://mail.scipy.org/mailman/listinfo/astropy
>



More information about the AstroPy mailing list