<p>Astronomy uses typically an Earth-centered (or solar system barycentric) spherical coordinate system with right ascension (RA, <span class="math-container">$\alpha$</span>) ranging from 0 to 360° and declination (DEC, <span class="math-container">$\delta$</span>) from -90° to +90° and a distance usually measured in parsec or often directly given as inverse, the parallax angle (PARALLAX, <span class="math-container">$\pi$</span>). In the <a href="https://gea.esac.esa.int/archive/documentation/GDR3/Gaia_archive/chap_datamodel/sec_dm_main_source_catalogue/ssec_dm_gaia_source.html" rel="nofollow noreferrer">Gaia catalogue</a> these columns are named RA, DEC and PARALLAX. You can simply convert these spherical coordinates into cartesian:</p>
<p><span class="math-container">$$ x = \frac{1000}{\pi}\sin\alpha\cos\delta\\ y = \frac{1000}{\pi}\sin\alpha\sin\delta \\ z=\frac{1000}{\pi}\cos\alpha$$</span></p>
<p>I introduced the factor 1000 in the above formulae in order to convert the parallax angle <span class="math-container">$\pi$</span> from milli-arc seconds used in the Gaia data to arc seconds so that a distance in units of <a href="https://en.wikipedia.org/wiki/Parsec" rel="nofollow noreferrer">parsec</a> is obtained.</p>
<p>You could use the rotated galactical coordinate system with longitude L and latitude B as angles - but that is directly derived from the RA and DEC values and is also Earth-centered with the same distance column, PARALLAX - and it makes little sense to use these derived coordinates when you want to convert the coordinates anyway to cartesian.</p>
<p>You might consider to make use of the XX_ERROR columns for the three coordinates you use, especially for the PARALLAX to give you a feeling how accurate the data are you use. In particular as the distance is the inverse of the parallax, the most likely distance is not the inverse if the relative error is large; you can check that directly with the value provided in the column PARALLAX_OVER_ERROR. A careful analysis in regard to stellar distances and a table thereof has been done by <a href="https://ui.adsabs.harvard.edu/abs/2021yCat.1352....0B/abstract" rel="nofollow noreferrer">Bailer-Jones et al. (2021)</a> (thx @ProfRob for the link). For further toying around with a 3D model you might have a look at the proper motion columns PM, PMRA and PMDEC to give you the movement of the stars in RA and DEC. Or use some of the photometric information and the distance to derive the absolute brightness of the sources.</p>

CC BY-SA 4.0
2023-07-20T08:38:01.893Z
The best estimates of the distances (done "properly") are available as a separate catalogue. Bailer-Jones et al. (2021)  https://ui.adsabs.harvard.edu/abs/2021yCat.1352....0B/abstract
ProfRob
CC BY-SA 4.0
2023-07-20T08:58:15.067Z
@ProfRob thanks. With your permission I added that info to my answer
planetmaker
CC BY-SA 4.0
2023-08-01T19:19:29.237Z
Thank you so much for this!
kinkersnick
CC BY-SA 4.0
2023-07-20T06:53:13.087Z
2023-07-20T08:57:55.637Z
2023-07-20T08:57:55.637Z
planetmaker
<p>I’m trying to recreate the Milky Way as a particle system inside Houdini, and I wanted to explore using the Gaia data as a starting point.</p>
<p>I’ve downloaded an example source file from the data set but I’m having difficulty figuring out how to translate the data into Cartesian coordinates inside my 3D software. It’s not immediately clear from all the descriptions of the headings in the CSV which pieces of data I could use for this - there doesn’t seem to be simply ‘position’ or anything like that. I understand that the stars positions must be relative to our own solar system. I see that there is data for galactic latitude and longitude, and from reading the Wikipedia page on that system, it seems I could combine those two values with a distance to create a position, but I can’t figure out which value represents the distance.</p>
<p>I’m not an astronomer and have never worked with astronomical data, so this is all new to me and may be extraordinarily simple and right under my nose, but would appreciate any help figuring this out!</p>

CC BY-SA 4.0
2023-07-20T02:53:08.407Z
You want RA, Dec, and Parallax.  Parallax can be converted to distance using this formula: https://www.celestialprogramming.com/snippets/parallax.html, after that, just convert the polar coordinates to rectangular coordinates.
Greg Miller
<galaxy><data-analysis><gaia>
How to get star position from the Gaia data set?
kinkersnick
# How to get star position from the Gaia data set?

(Asked by: username_0 on 2023-07-19)

I’m trying to recreate the Milky Way as a particle system inside Houdini, and I wanted to explore using the Gaia data as a starting point.

I’ve downloaded an example source file from the data set but I’m having difficulty figuring out how to translate the data into Cartesian coordinates inside my 3D software. It’s not immediately clear from all the descriptions of the headings in the CSV which pieces of data I could use for this - there doesn’t seem to be simply ‘position’ or anything like that. I understand that the stars positions must be relative to our own solar system. I see that there is data for galactic latitude and longitude, and from reading the Wikipedia page on that system, it seems I could combine those two values with a distance to create a position, but I can’t figure out which value represents the distance.

I’m not an astronomer and have never worked with astronomical data, so this is all new to me and may be extraordinarily simple and right under my nose, but would appreciate any help figuring this out!

**Tags:** galaxy, data-analysis, gaia
> **Comments:**
> **username_1**: You want RA, Dec, and Parallax.  Parallax can be converted to distance using this formula: https://www.celestialprogramming.com/snippets/parallax.html, after that, just convert the polar coordinates to rectangular coordinates.  

---

## 1 answers

### Answer by username_2 on 2023-07-20. Score: 5 | Accepted answer

Astronomy uses typically an Earth-centered (or solar system barycentric) spherical coordinate system with right ascension (RA, $\alpha$) ranging from 0 to 360° and declination (DEC, $\delta$) from -90° to +90° and a distance usually measured in parsec or often directly given as inverse, the parallax angle (PARALLAX, $\pi$). In the [Gaia catalogue](https://gea.esac.esa.int/archive/documentation/GDR3/Gaia_archive/chap_datamodel/sec_dm_main_source_catalogue/ssec_dm_gaia_source.html) these columns are named RA, DEC and PARALLAX. You can simply convert these spherical coordinates into cartesian:

$$ x = \frac{1000}{\pi}\sin\alpha\cos\delta\\ y = \frac{1000}{\pi}\sin\alpha\sin\delta \\ z=\frac{1000}{\pi}\cos\alpha$$

I introduced the factor 1000 in the above formulae in order to convert the parallax angle $\pi$ from milli-arc seconds used in the Gaia data to arc seconds so that a distance in units of [parsec](https://en.wikipedia.org/wiki/Parsec) is obtained.

You could use the rotated galactical coordinate system with longitude L and latitude B as angles - but that is directly derived from the RA and DEC values and is also Earth-centered with the same distance column, PARALLAX - and it makes little sense to use these derived coordinates when you want to convert the coordinates anyway to cartesian.

You might consider to make use of the XX\_ERROR columns for the three coordinates you use, especially for the PARALLAX to give you a feeling how accurate the data are you use. In particular as the distance is the inverse of the parallax, the most likely distance is not the inverse if the relative error is large; you can check that directly with the value provided in the column PARALLAX\_OVER\_ERROR. A careful analysis in regard to stellar distances and a table thereof has been done by [Bailer-Jones et al. (2021)](https://ui.adsabs.harvard.edu/abs/2021yCat.1352....0B/abstract) (thx @ProfRob for the link). For further toying around with a 3D model you might have a look at the proper motion columns PM, PMRA and PMDEC to give you the movement of the stars in RA and DEC. Or use some of the photometric information and the distance to derive the absolute brightness of the sources.

> **Comments:**
> **username_3**: The best estimates of the distances (done "properly") are available as a separate catalogue. Bailer-Jones et al. (2021)  https://ui.adsabs.harvard.edu/abs/2021yCat.1352....0B/abstract  
> **username_2**: @ProfRob thanks. With your permission I added that info to my answer  
> **username_0**: Thank you so much for this!  

---

