[AstroPy] Changing orientation of one image to match with other image orientation.

Sebastian Gurovich sebas0 at gmail.com
Thu Oct 20 09:33:19 EDT 2022


If the images are from the same instrument you might be OK with a
rotation/translation but if the images are taken
using different instruments and you intend to do slightly more complex
analysis eg: wish to calculate aperture magnitudes, etc.,
you may need to conserve the flux (counts/sec) across the image pixel plane
with a transformation.

 I'm not up-to-date as to the best-practice astropy method to do this,
but in IRAF it used to be "geomap" task followed by "geotran"
within the "immatch" package. Have a look here for a possible astropy
equivalence:
https://github.com/astropy/astropy-tutorials/issues/478

best of luck!

On Thu, Oct 20, 2022 at 9:10 AM <astropy-request at python.org> wrote:

> Send AstroPy mailing list submissions to
>         astropy at python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://mail.python.org/mailman/listinfo/astropy
> or, via email, send a message with subject or body 'help' to
>         astropy-request at python.org
>
> You can reach the person managing the list at
>         astropy-owner at python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of AstroPy digest..."
>
>
> Today's Topics:
>
>    1. Re: Changing orientation of one image to match with other
>       image orientation. (ANKITA GHOSH)
>    2. Re: Changing orientation of one image to match with other
>       image orientation. (Mohammad Shameoni Niaei)
>    3. Re: Changing orientation of one image to match with other
>       image orientation. (Yannick Roehlly)
>    4. Re: Changing orientation of one image to match with other
>       image orientation. (Yannick Roehlly)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 20 Oct 2022 17:20:48 +0530
> From: ANKITA GHOSH <ankita.rimi98 at gmail.com>
> To: Astronomical Python mailing list <astropy at python.org>
> Subject: Re: [AstroPy] Changing orientation of one image to match with
>         other image orientation.
> Message-ID:
>         <
> CAEUBuA65pGy-jZQYVtBozueb6TKrRkeNxjysnNHpY3U6VxRLXw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Mohammad,
>
> Thank you very much for your help. I was just wondering both of them are
> fit file with wcs information. So, will this astroalign module make changes
> in wcs header of one image with respect to other image?
> Thank you.
>
> Regards,
> Ankita.
>
>
>
>
> On Thu, 20 Oct 2022, 16:50 Mohammad Shameoni Niaei, <m.shemuni at gmail.com>
> wrote:
>
> > Hello Ankita
> >
> > You need image alignment If your images were just shifted you could have
> a
> > single point selected on both images and shift one accordingly.
> > However, we see your images are also rotated. It makes the job a bit
> > complicated.
> >
> > But fear not. There are good tools such as astroalign
> > <https://astroalign.quatrope.org/en/latest/>.
> >
> > astroalign: https://astroalign.quatrope.org/en/latest/
> >
> > On Thu, Oct 20, 2022 at 1:28 PM ANKITA GHOSH <ankita.rimi98 at gmail.com>
> > wrote:
> >
> >> Dear all,
> >>
> >> I am trying to make image cut outs from two different images (fit file
> >> with wcs ) having different orientation. One image have north direction
> >> pointed in upside and east in left side, another has an arbitrary
> >> orientation of north-east direction. I want to orient the second image
> like
> >> the first image that has north in upside and east in left side. Can you
> >> please suggest something to do so. Thank you.
> >>
> >> Regards,
> >> Ankita
> >> _______________________________________________
> >> AstroPy mailing list
> >> AstroPy at python.org
> >> https://mail.python.org/mailman/listinfo/astropy
> >>
> >
> >
> > --
> > Mohammad Shameoni Niaei
> > Astronomer
> > Atat?rk University, Astrophysics Research and Application Center.
> > ERZURUM-TURKEY
> > _______________________________________________
> > AstroPy mailing list
> > AstroPy at python.org
> > https://mail.python.org/mailman/listinfo/astropy
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://mail.python.org/pipermail/astropy/attachments/20221020/84451ecc/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Thu, 20 Oct 2022 14:58:41 +0300
> From: Mohammad Shameoni Niaei <m.shemuni at gmail.com>
> To: Astronomical Python mailing list <astropy at python.org>
> Subject: Re: [AstroPy] Changing orientation of one image to match with
>         other image orientation.
> Message-ID:
>         <
> CAAXud8OzpmcdWn7jy_8HC60brFc0H9XQxhhjpFDeEVArdiFcMQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I don't think so.
>
> However since after aligning both images would have the same fov and
> central coordinates, one can easily copy wcs headers from reference to
> aligned image.
>
> On Thu, 20 Oct 2022, 14:51 ANKITA GHOSH, <ankita.rimi98 at gmail.com> wrote:
>
> > Hi Mohammad,
> >
> > Thank you very much for your help. I was just wondering both of them are
> > fit file with wcs information. So, will this astroalign module make
> changes
> > in wcs header of one image with respect to other image?
> > Thank you.
> >
> > Regards,
> > Ankita.
> >
> >
> >
> >
> > On Thu, 20 Oct 2022, 16:50 Mohammad Shameoni Niaei, <m.shemuni at gmail.com
> >
> > wrote:
> >
> >> Hello Ankita
> >>
> >> You need image alignment If your images were just shifted you could have
> >> a single point selected on both images and shift one accordingly.
> >> However, we see your images are also rotated. It makes the job a bit
> >> complicated.
> >>
> >> But fear not. There are good tools such as astroalign
> >> <https://astroalign.quatrope.org/en/latest/>.
> >>
> >> astroalign: https://astroalign.quatrope.org/en/latest/
> >>
> >> On Thu, Oct 20, 2022 at 1:28 PM ANKITA GHOSH <ankita.rimi98 at gmail.com>
> >> wrote:
> >>
> >>> Dear all,
> >>>
> >>> I am trying to make image cut outs from two different images (fit file
> >>> with wcs ) having different orientation. One image have north direction
> >>> pointed in upside and east in left side, another has an arbitrary
> >>> orientation of north-east direction. I want to orient the second image
> like
> >>> the first image that has north in upside and east in left side. Can you
> >>> please suggest something to do so. Thank you.
> >>>
> >>> Regards,
> >>> Ankita
> >>> _______________________________________________
> >>> AstroPy mailing list
> >>> AstroPy at python.org
> >>> https://mail.python.org/mailman/listinfo/astropy
> >>>
> >>
> >>
> >> --
> >> Mohammad Shameoni Niaei
> >> Astronomer
> >> Atat?rk University, Astrophysics Research and Application Center.
> >> ERZURUM-TURKEY
> >> _______________________________________________
> >> AstroPy mailing list
> >> AstroPy at python.org
> >> https://mail.python.org/mailman/listinfo/astropy
> >>
> > _______________________________________________
> > AstroPy mailing list
> > AstroPy at python.org
> > https://mail.python.org/mailman/listinfo/astropy
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://mail.python.org/pipermail/astropy/attachments/20221020/dd4fcbde/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Thu, 20 Oct 2022 14:08:13 +0200
> From: Yannick Roehlly <yannick.roehlly at gmail.com>
> To: Astronomical Python mailing list <astropy at python.org>
> Subject: Re: [AstroPy] Changing orientation of one image to match with
>         other image orientation.
> Message-ID:
>         <CADbke=
> TnFX7v0CNMiJTC7E-+c7KYDSaK7aRXn9-XwRHzwcMvTg at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi Ankita,
>
> You may also want to look at the reproject
> (https://github.com/astropy/reproject) module to reproject one image
> onto the other's WCS.
>
> Yannick
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 20 Oct 2022 14:09:38 +0200
> From: Yannick Roehlly <yannick.roehlly at gmail.com>
> To: Astronomical Python mailing list <astropy at python.org>
> Subject: Re: [AstroPy] Changing orientation of one image to match with
>         other image orientation.
> Message-ID:
>         <CADbke=
> RPdVspmVxDopEacEWcurLv6WDSF-wj78tPq94Tyu_gNg at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Oh Matt already answered but Google was suspicious about the message... ;-)
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
>
>
> ------------------------------
>
> End of AstroPy Digest, Vol 192, Issue 2
> ***************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/astropy/attachments/20221020/10f38e73/attachment.html>


More information about the AstroPy mailing list