[AstroPy] help with SkyCoord

Mohammad Shameoni Niaei m.shemuni at gmail.com
Thu Jan 21 02:22:24 EST 2021


Hello Emmanuella.

Thank you for sending this question. I found it challenging.

As Ivan suggested, I tried to understand regions, CircleSkyRegion and find
the boundaries to no avail.
I even tried to solve the angular distance equation
<https://en.wikipedia.org/wiki/Angular_distance#Equation> for known one
coordinates and distance. That failed too.

But I think I have a solution. We can use Vectors for this problem. Let's
say we have a vector (v1) pointed to x, y, z (Spherical form would be r,
theta, phi. Where theta and phi is our reference point and r can be
anything but better to be 1.) We can create another vector (v2) with
angular distance of your R (Where R is your radius) and rotate the v2 about
v1. see: stackexchange
<https://math.stackexchange.com/questions/511370/how-to-rotate-one-vector-about-another>

I once created a simple Vector library, which is installable with pip,
named v3d <https://pypi.org/project/v3d/> .

You can easily do the same calculations with numpy if v3d is bugged or is
not trustable enough for you.

An example is in attachment

Links:
angular distance equation:
https://en.wikipedia.org/wiki/Angular_distance#Equation
stackexchange:
https://math.stackexchange.com/questions/511370/how-to-rotate-one-vector-about-another
v3d: https://pypi.org/project/v3d/

On Thu, Jan 21, 2021 at 1:28 AM Ivan Valtchanov <ivvv68 at gmail.com> wrote:

> Hi Emmanuella,
>
> Have a look at astropy regions package:
> https://astropy-regions.readthedocs.io/en/latest/
>
> hope this helps,
> Ivan
>
> On Wed, 20 Jan 2021 at 19:11, Emanuella Puddu <manupu08 at gmail.com> wrote:
> >
> > Hi everyone!
> > I have to draw a circle around an object's center, a circle made of
> points which have the same distance from the object. This all in spherical
> projection on the sky (package SkyCoord). Does anyone have an idea about
> how this can be done?
> > Many thanks in advance for the help ...
> > _______________________________________________
> > 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
>


-- 
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/20210121/276739b2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sky_circle.py
Type: text/x-python
Size: 731 bytes
Desc: not available
URL: <https://mail.python.org/pipermail/astropy/attachments/20210121/276739b2/attachment.py>


More information about the AstroPy mailing list