From ankita.rimi98 at gmail.com Thu Oct 20 06:27:55 2022 From: ankita.rimi98 at gmail.com (ANKITA GHOSH) Date: Thu, 20 Oct 2022 15:57:55 +0530 Subject: [AstroPy] Changing orientation of one image to match with other image orientation. Message-ID: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcraig at mnstate.edu Thu Oct 20 06:45:11 2022 From: mcraig at mnstate.edu (Craig, Matthew W) Date: Thu, 20 Oct 2022 10:45:11 +0000 Subject: [AstroPy] Changing orientation of one image to match with other image orientation. In-Reply-To: References: Message-ID: <91B9E9C4-A011-49F9-9935-EDFF0D118AC6@minnstate.edu> Hi, Since you already have WCS for both images I would recommend using reproject: https://reproject.readthedocs.io/en/stable/ Thanks, Matt Craig schedule: http://physics.mnstate.edu/craig ?? Professor Department of Physics and Astronomy Minnesota State University Moorhead 1104 7th Ave S, Moorhead, MN 56563 Office: Hagen 307F Phone: (218) 477-2439 Fax: (218) 477-2290 On Oct 20, 2022, at 11:27, ANKITA GHOSH > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.shemuni at gmail.com Thu Oct 20 07:19:29 2022 From: m.shemuni at gmail.com (Mohammad Shameoni Niaei) Date: Thu, 20 Oct 2022 14:19:29 +0300 Subject: [AstroPy] Changing orientation of one image to match with other image orientation. In-Reply-To: References: Message-ID: 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 . astroalign: https://astroalign.quatrope.org/en/latest/ On Thu, Oct 20, 2022 at 1:28 PM ANKITA GHOSH 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ankita.rimi98 at gmail.com Thu Oct 20 07:50:48 2022 From: ankita.rimi98 at gmail.com (ANKITA GHOSH) Date: Thu, 20 Oct 2022 17:20:48 +0530 Subject: [AstroPy] Changing orientation of one image to match with other image orientation. In-Reply-To: References: Message-ID: 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, 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 > . > > astroalign: https://astroalign.quatrope.org/en/latest/ > > On Thu, Oct 20, 2022 at 1:28 PM ANKITA GHOSH > 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: From m.shemuni at gmail.com Thu Oct 20 07:58:41 2022 From: m.shemuni at gmail.com (Mohammad Shameoni Niaei) Date: Thu, 20 Oct 2022 14:58:41 +0300 Subject: [AstroPy] Changing orientation of one image to match with other image orientation. In-Reply-To: References: Message-ID: 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, 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, > 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 >> . >> >> astroalign: https://astroalign.quatrope.org/en/latest/ >> >> On Thu, Oct 20, 2022 at 1:28 PM ANKITA GHOSH >> 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: From yannick.roehlly at gmail.com Thu Oct 20 08:08:13 2022 From: yannick.roehlly at gmail.com (Yannick Roehlly) Date: Thu, 20 Oct 2022 14:08:13 +0200 Subject: [AstroPy] Changing orientation of one image to match with other image orientation. In-Reply-To: References: Message-ID: 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 From yannick.roehlly at gmail.com Thu Oct 20 08:09:38 2022 From: yannick.roehlly at gmail.com (Yannick Roehlly) Date: Thu, 20 Oct 2022 14:09:38 +0200 Subject: [AstroPy] Changing orientation of one image to match with other image orientation. In-Reply-To: References: Message-ID: Oh Matt already answered but Google was suspicious about the message... ;-) From sebas0 at gmail.com Thu Oct 20 09:33:19 2022 From: sebas0 at gmail.com (Sebastian Gurovich) Date: Thu, 20 Oct 2022 10:33:19 -0300 Subject: [AstroPy] Changing orientation of one image to match with other image orientation. Message-ID: 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 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 > To: Astronomical Python mailing list > 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, > 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 > > . > > > > astroalign: https://astroalign.quatrope.org/en/latest/ > > > > On Thu, Oct 20, 2022 at 1:28 PM ANKITA GHOSH > > 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 > To: Astronomical Python mailing list > 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, 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, > > > 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 > >> . > >> > >> astroalign: https://astroalign.quatrope.org/en/latest/ > >> > >> On Thu, Oct 20, 2022 at 1:28 PM ANKITA GHOSH > >> 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 > To: Astronomical Python mailing list > Subject: Re: [AstroPy] Changing orientation of one image to match with > other image orientation. > Message-ID: > 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 > To: Astronomical Python mailing list > Subject: Re: [AstroPy] Changing orientation of one image to match with > other image orientation. > Message-ID: > 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: From sebas0 at gmail.com Thu Oct 20 09:43:42 2022 From: sebas0 at gmail.com (Sebastian Gurovich) Date: Thu, 20 Oct 2022 10:43:42 -0300 Subject: [AstroPy] Changing orientation of one image to match with other image orientation. (Craig, Matthew W) Message-ID: My apologies Mohammad, i think Matthew W Craig pointed you in the right direction. best, On Thu, Oct 20, 2022 at 8:20 AM 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. 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. (Craig, Matthew W) > 3. Re: Changing orientation of one image to match with other > image orientation. (Mohammad Shameoni Niaei) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 20 Oct 2022 15:57:55 +0530 > From: ANKITA GHOSH > To: astropy at python.org > Subject: [AstroPy] Changing orientation of one image to match with > other image orientation. > Message-ID: > vDp0mp-n8tmPZYS+kFJwonJK-8TRjApw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > 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 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > https://mail.python.org/pipermail/astropy/attachments/20221020/19f3b58a/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Thu, 20 Oct 2022 10:45:11 +0000 > From: "Craig, Matthew W" > To: Astronomical Python mailing list > Subject: Re: [AstroPy] Changing orientation of one image to match with > other image orientation. > Message-ID: <91B9E9C4-A011-49F9-9935-EDFF0D118AC6 at minnstate.edu> > Content-Type: text/plain; charset="utf-8" > > Hi, > > Since you already have WCS for both images I would recommend using > reproject: https://reproject.readthedocs.io/en/stable/ > > Thanks, > Matt Craig > > schedule: http://physics.mnstate.edu/craig > ?? > Professor > Department of Physics and Astronomy > Minnesota State University Moorhead > 1104 7th Ave S, Moorhead, MN 56563 > > Office: Hagen 307F > Phone: (218) 477-2439 > Fax: (218) 477-2290 > > On Oct 20, 2022, at 11:27, 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 > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > https://mail.python.org/pipermail/astropy/attachments/20221020/bfda4846/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Thu, 20 Oct 2022 14:19:29 +0300 > From: Mohammad Shameoni Niaei > To: Astronomical Python mailing list > Subject: Re: [AstroPy] Changing orientation of one image to match with > other image orientation. > Message-ID: > zcQ at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > 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 > . > > astroalign: https://astroalign.quatrope.org/en/latest/ > > On Thu, Oct 20, 2022 at 1:28 PM ANKITA GHOSH > 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 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > https://mail.python.org/pipermail/astropy/attachments/20221020/b7a1ba21/attachment.html > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy > > > ------------------------------ > > End of AstroPy Digest, Vol 192, Issue 1 > *************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: