"Find images in the same area" formula AstroBin Platform open discussions community forum · Francis Moreau · ... · 4 · 84 · 0

francismoreau 0.00
...
· 
Hello,
In the "Find images in the same area" menu, what is the formula for finding the distance?
Is it a simple application of the Pythagorean theorem in the plane or is it a calculation based on spherical geometry?

Thanks
Like
siovene
...
· 
·  1 like
Hi Francis,

it's nothing that complicated.

Given an image with RA center X and dec center Y, and a "look around value" of n degrees, it finds all images where:

center RA <= X - n/2 <= X + n/2
center dec <= Y -n/2 <= Y + n/2

Source code here:

https://github.com/astrobin/astrobin/blob/master/astrobin_apps_platesolving/services/solution_service.py#L90
Like
francismoreau 0.00
...
· 
I've looked into the matter and it seems to me that there's an error in the calculation when ra is around 0.
For example, with ra = 1 and degree = 4, the calculation (ra_min = ra - degrees * .5) gives -1 when the correct result should be 359.

The same problem applies to dec around ±90°.
Like
siovene
...
· 
·  1 like
Francis Moreau:
I've looked into the matter and it seems to me that there's an error in the calculation when ra is around 0.
For example, with ra = 1 and degree = 4, the calculation (ra_min = ra - degrees * .5) gives -1 when the correct result should be 359.

The same problem applies to dec around ±90°.

Thanks! Will add this to the internal issue tracker.
Like
siovene
...
· 
·  1 like
@Francis Moreau, this is now live on AstroBin. Thanks again for reporting!
Like
 
Register or login to create to post a reply.