<p>So I want to get the XYZ (rectangular/Cartesian) coordinates of the LRG (luminous red galaxies) catalog. The catalog is available for download from here: <a href="https://data.sdss.org/sas/dr16/eboss/lss/catalogs/DR16/" rel="nofollow noreferrer">https://data.sdss.org/sas/dr16/eboss/lss/catalogs/DR16/</a> You just have to search the &quot;LRG&quot; ones. Since I'm not very interested in clustering at first I figured I'd download the eBOSS_LRG_full_ALLdata-vDR16.fits. In this fits file, I see RA and DEC coordinates but I don't see any measure of distance. Thus I'm not sure how to covert this RA and DEC to XYZ coordinates. I've read some papers where they say they have done this so in principle it should be possible just I am not sure how. Am I supposed to use the magnitude to somehow estimate the distance (something like this: <a href="https://ned.ipac.caltech.edu/level5/Willick/Willick1_2.html" rel="nofollow noreferrer">https://ned.ipac.caltech.edu/level5/Willick/Willick1_2.html</a>)? For some reason, I expected this would be precomputed in the catalog measurements but maybe I'm misunderstanding something.</p>
<p>I understand that <a href="https://en.wikipedia.org/wiki/Baryon_acoustic_oscillations" rel="nofollow noreferrer">BAO (Baryon Acoustic Oscillation)</a> is used for determining distance. According to <a href="https://www.sdss.org/dr16/spectro/lss/" rel="nofollow noreferrer">https://www.sdss.org/dr16/spectro/lss/</a> the SDSS fits files link I posted above also contains information about BAO (it is the files that contain &quot;rec&quot; I am using the <code>eBOSS_LRGpCMASS_clustering_data_rec-NGC-vDR16.fits</code> file for example). However, I can't find what the fields mean and more importantly how to get distance from them.</p>
<p>Any and all help appreciated if I'm missing some documentation please let me know.</p>

CC BY-SA 4.0
2021-02-19T22:42:07.903Z
The format of those catalogs is described in the [SchemaBrowser](https://data.sdss.org/datamodel/files/EBOSS_LSS/catalogs/DR16/eBOSS_LRGpCMASS_clustering_data_rec.html) which shows there is a `Z` column which gives you the redshift (distance). Assuming a cosmological model for the Universe can let you convert redshifts to distance e.g. with [AstroPy](https://docs.astropy.org/en/stable/cosmology/index.html#id1)
astrosnapper
CC BY-SA 4.0
2021-02-19T22:54:05.737Z
What @astrosnapper posted I think is a good way to go about it. I just found a good cosmology calculator code in python2 from Ned Wright (see here: http://www.astro.ucla.edu/~wright/CC.python) that also seems to work. This website looks like an online implementation of it. However, I think it's probably easier to just call the WMAP9 astropy code. Thanks for pointing me to this. 

I'm still not entirely sure how to use the BAO measurements but I think for now should be fine :)
kauii8
CC BY-SA 4.0
2022-12-18T09:39:02.513Z
The misunderstanding you have is that you don't in general know the distance to a galaxy and there isn't an obvious and easy way to estimate the distance other than by simply plugging the redshift into Hubble's law; it is a difficult and nuanced process with different methods giving different results.
ProfRob
<galaxy><coordinate><galaxy-cluster><sloan-dss>
Getting XYZ coordinates of Luminous Red Galaxies catalogue
kauii8
# Getting XYZ coordinates of Luminous Red Galaxies catalogue

(Asked by: username_0 on 2021-02-19)

So I want to get the XYZ (rectangular/Cartesian) coordinates of the LRG (luminous red galaxies) catalog. The catalog is available for download from here: <https://data.sdss.org/sas/dr16/eboss/lss/catalogs/DR16/> You just have to search the "LRG" ones. Since I'm not very interested in clustering at first I figured I'd download the eBOSS\_LRG\_full\_ALLdata-vDR16.fits. In this fits file, I see RA and DEC coordinates but I don't see any measure of distance. Thus I'm not sure how to covert this RA and DEC to XYZ coordinates. I've read some papers where they say they have done this so in principle it should be possible just I am not sure how. Am I supposed to use the magnitude to somehow estimate the distance (something like this: <https://ned.ipac.caltech.edu/level5/Willick/Willick1_2.html>)? For some reason, I expected this would be precomputed in the catalog measurements but maybe I'm misunderstanding something.

I understand that [BAO (Baryon Acoustic Oscillation)](https://en.wikipedia.org/wiki/Baryon_acoustic_oscillations) is used for determining distance. According to <https://www.sdss.org/dr16/spectro/lss/> the SDSS fits files link I posted above also contains information about BAO (it is the files that contain "rec" I am using the `eBOSS_LRGpCMASS_clustering_data_rec-NGC-vDR16.fits` file for example). However, I can't find what the fields mean and more importantly how to get distance from them.

Any and all help appreciated if I'm missing some documentation please let me know.

**Tags:** galaxy, coordinate, galaxy-cluster, sloan-dss

> **Comments:**
> **username_1**: The format of those catalogs is described in the [SchemaBrowser](https://data.sdss.org/datamodel/files/EBOSS_LSS/catalogs/DR16/eBOSS_LRGpCMASS_clustering_data_rec.html) which shows there is a `Z` column which gives you the redshift (distance). Assuming a cosmological model for the Universe can let you convert redshifts to distance e.g. with [AstroPy](https://docs.astropy.org/en/stable/cosmology/index.html#id1)  
> **username_0**: What @username_1 posted I think is a good way to go about it. I just found a good cosmology calculator code in python2 from Ned Wright (see here: http://www.astro.ucla.edu/~wright/CC.python) that also seems to work. This website looks like an online implementation of it. However, I think it's probably easier to just call the WMAP9 astropy code. Thanks for pointing me to this.   I'm still not entirely sure how to use the BAO measurements but I think for now should be fine :)  
> **username_2**: The misunderstanding you have is that you don't in general know the distance to a galaxy and there isn't an obvious and easy way to estimate the distance other than by simply plugging the redshift into Hubble's law; it is a difficult and nuanced process with different methods giving different results.  

---

## 0 answers

