<p>I find <a href="https://arxiv.org/abs/astro-ph/9905116" rel="nofollow noreferrer">this discussion of cosmological distances</a> by David Hogg to be very useful in answering questions like this.  In Section 4 he says:</p>
<blockquote>
<p>The line-of-sight comoving distance between two nearby events (ie, close in redshift or distance) is the distance which we would measure locally between the events today if those two points were locked into the Hubble flow. It is the correct distance measure for measuring aspects of large-scale structure imprinted on the Hubble flow, eg, distances between “walls.”</p>
</blockquote>
<p>That would suggest to me that it’s the distance measure you want for your problem, but I encourage you to read further in that article to be sure.</p>

CC BY-SA 4.0
2021-02-21T13:52:32.440Z
Hi, thanks for the article. Comoving distance seems like an appropriate choice if I consider all the galaxies in the same cluster to have an approximate average redshift and comoving distance. However, the results of my code seem to be not right, given that the galaxies appear stretched out in one direction in the cluster. I don't think this is the right place to troubleshoot this though. Thanks nevertheless!
kenc_
CC BY-SA 4.0
2021-02-19T12:48:31.657Z
2021-02-19T12:48:31.657Z
Eric Jensen
<p>I'm trying to search for galaxy clusters with the friends-of-friends (FoF) algorithm. I have the equatorial coordinates (<span class="math-container">$\alpha, \delta$</span>) and redshifts (<span class="math-container">$0.5&lt;z&lt;2.5$</span>) of galaxies that I wish to convert to Cartesian coordinates, with the following:</p>
<p><span class="math-container">$$
X = R\cdot \cos(\delta)\cos(\alpha) \\
Y = R\cdot \cos(\delta)\sin(\alpha) \\
Z = R\cdot \sin(\delta)
$$</span></p>
<p>The problem I'm having is deciding the correct <span class="math-container">$R$</span> to use: should it be comoving distance, angular diameter distance or luminosity distance, given that I only have redshifts to work with? How do we determine the best LOS distance measure to use for this case? Is there a better way to do this?</p>
<p>For example, in astropy, their <a href="https://docs.astropy.org/en/stable/api/astropy.coordinates.Distance.html" rel="nofollow noreferrer">default Distance quantity</a> computes the distance from redshift (and a given cosmology) using luminosity distance.</p>
<h3>References</h3>
<ul>
<li>Some notes on the <a href="http://swift.dur.ac.uk/docs/FriendsOfFriends/algorithm_description.html" rel="nofollow noreferrer">Friends-of-Friends Algorithm</a></li>
</ul>

CC BY-SA 4.0
2021-02-19T11:44:21.413Z
Welcome to astronomy SE! I fixed a bit of typesetting and allowed to add a reference for the FOF algorithm, feel free to adjust that.
B--rian
<distances><coordinate><galaxy-cluster><algorithm>
Converting equatorial coordinates to Cartesian coordinates for extragalactic distances
kenc_
# Converting equatorial coordinates to Cartesian coordinates for extragalactic distances

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

I'm trying to search for galaxy clusters with the friends-of-friends (FoF) algorithm. I have the equatorial coordinates ($\alpha, \delta$) and redshifts ($0.5) of galaxies that I wish to convert to Cartesian coordinates, with the following:

$$
X = R\cdot \cos(\delta)\cos(\alpha) \\
Y = R\cdot \cos(\delta)\sin(\alpha) \\
Z = R\cdot \sin(\delta)
$$

The problem I'm having is deciding the correct $R$ to use: should it be comoving distance, angular diameter distance or luminosity distance, given that I only have redshifts to work with? How do we determine the best LOS distance measure to use for this case? Is there a better way to do this?

For example, in astropy, their [default Distance quantity](https://docs.astropy.org/en/stable/api/astropy.coordinates.Distance.html) computes the distance from redshift (and a given cosmology) using luminosity distance.

### References

* Some notes on the [Friends-of-Friends Algorithm](http://swift.dur.ac.uk/docs/FriendsOfFriends/algorithm_description.html)

**Tags:** distances, coordinate, galaxy-cluster, algorithm
> **Comments:**
> **username_1**: Welcome to astronomy SE! I fixed a bit of typesetting and allowed to add a reference for the FOF algorithm, feel free to adjust that.  

---

## 1 answers

### Answer by username_2 on 2021-02-19. Score: 2 | Accepted answer

I find [this discussion of cosmological distances](https://arxiv.org/abs/astro-ph/9905116) by David Hogg to be very useful in answering questions like this. In Section 4 he says:

> The line-of-sight comoving distance between two nearby events (ie, close in redshift or distance) is the distance which we would measure locally between the events today if those two points were locked into the Hubble flow. It is the correct distance measure for measuring aspects of large-scale structure imprinted on the Hubble flow, eg, distances between “walls.”

That would suggest to me that it’s the distance measure you want for your problem, but I encourage you to read further in that article to be sure.

> **Comments:**
> **username_0**: Hi, thanks for the article. Comoving distance seems like an appropriate choice if I consider all the galaxies in the same cluster to have an approximate average redshift and comoving distance. However, the results of my code seem to be not right, given that the galaxies appear stretched out in one direction in the cluster. I don't think this is the right place to troubleshoot this though. Thanks nevertheless!  

---

