[AstroPy] Vizier projection

Eric L. N. Jensen ejensen1 at swarthmore.edu
Mon Aug 30 13:26:38 EDT 2021


Hi Gabriel, 

The main reason your RA,Dec plot looks different from the other plots is that 1 degree of Right Ascension is not (except at the equator) 1 degree on the sky.  The difference is especially noticeable when you are near the poles, as in this case.   It’s exactly analogous to latitude and longitude on the Earth - as you near the poles, the longitude lines converge so that one degree of longitude is a lot less distance on the surface of the Earth than it is at the equator.  

The correction factor is to multiply by the cosine of the other coordinate.  So for example if you plot RA*cos(Dec) as your X coordinate and Dec as your Y coordinate, you should get a plot that is 0.2 x 0.2 degrees, and which looks a lot like the _x, _y plot (but without the mean value subtracted).  

In a small field like this simply subtracting the mean will get you something that’s pretty close to the correct _x, _y values, except that it doesn’t take into account the curvature of the celestial sphere. 

A more correct way to do it would be to convert each of your data points to a SkyCoord in astropy, and also to make a SkyCoord for your field center coords.   Then you could find coord1.separation(coord2) to get the angular distance between any two points. 

SkyCoord docs are here: https://docs.astropy.org/en/stable/coordinates/index.html 

and docs on separations are here:  https://docs.astropy.org/en/stable/coordinates/matchsep.html

Hope this helps, 

Eric


> On Aug 30, 2021, at 10:24 AM, Gabriel Perren <gabrielperren at gmail.com> wrote:
> 
> Hi everyone,
> 
> I'm trying to reproduce the projection applied by Vizier to obtain the (_x, _y) columns. According to what is stated here http://cdsarc.u-strasbg.fr/vizier/vizHelp/xy.htx <http://cdsarc.u-strasbg.fr/vizier/vizHelp/xy.htx>, these columns are the *arc projection* of the `(RA, DE)` coordinates. 
> 
> I'm trying to reproduce these values based on the equations shown in the above link, but I can't seem to get the proper results. See for example the attached image with a queried region of 0.2 deg length around the center `(100, -80)`.
> 
> The plot to the left are the `(RA, DE)` coordinates, the middle plot are the projected `(_x, _y)` positions by Vizier, and the right plot my attempts to reproduce these last values (the code is below, test.dat file here: https://justpaste.it/623lj <https://justpaste.it/623lj>)
> 
> What am I doing wrong? And, can astropy apply this projection?
> 
> I've also posted this question to SO here: https://stackoverflow.com/q/68985179/1391441 <https://stackoverflow.com/q/68985179/1391441>
> 
> Cheers,
> Gabriel
> 
> <zuGeb.png>_______________________________________________
> 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/20210830/18190a3a/attachment.html>


More information about the AstroPy mailing list