# 3d distance between the Galaxies inside the galaxy cluster

I am currently working on the dynamics of the galaxy cluster, so i am trying to get the distance between the galaxies inside the galaxy cluster from its centre. As a input i have RA , DEC and Z (Redshift of the galaxies and its centre). my approach is something like this

1. First of all i start with the commoving distance of the galaxies and Cluster for a given z (Galaxies redshift) and z_cl (Clusters redshift) .
2. then i get the Cartesian position of each object in 3D space
3. Once i have the Cartesian of the objects, i use the standard distance formula to compute 3-D Distances between them the python Code is like this
#  comoving distances
D_cl=cosmos.comoving_distance(z).value #  z for each galaxy
D_clus=cosmos.comoving_distance(z_cl).value # z_cl for Cluster's centre

def get_x_y_z(ra, dec, D):
phi   = ( ra*180/np.pi   - 180 ) * np.pi / 180.
theta = (dec*180/np.pi + 90 ) * np.pi / 180.
xx = D * np.cos( phi) * np.sin( theta )
yy = D * np.sin( phi) * np.sin( theta )
zz = D * np.cos( theta )
return xx, yy, zz

# get 3D Cartesian positions of the sub haloes
xx, yy, zz = get_x_y_z(ra, dec, D_cl)

# get 3D Cartesian positions of the cluster
xx_cl, yy_cl, zz_cl = get_x_y_z(ra_cl, dec_cl, D_clus)

# array of distances between sub haloes and the cluster :
distances = np.sqrt((xx_cl-xx)**2 + (yy_cl-yy)**2 + (zz_cl-zz)**2)
distances.min(),distances.max()



Another Approach using astropy

c2 = SkyCoord(ra*180/np.pi *u.deg, dec*180/np.pi *u.deg, distance=D_clus*u.Mpc, frame='icrs')
distance_3d = c1.separation_3d(c2)
distance_3d


So after using this method i am getting a wrong value's (Almost 70 Mpc for a given redshift therefore i would like to know what can i change or adapt to have right measurement of the 3d distances or my method is wrong. As you can see i am going to use this distance r in order to calculate the jeans solution. where i need two distances r and R.

• R is the projected separation of the galaxies from clusters centre

• r is the actual 3d distance of the galaxies from clusters centre

$$v_g(r) = -\frac{1}{\pi}\int_r^\infty \frac{d \Sigma}{dr} \frac{dR}{\sqrt{R^2-r^2}}$$

• You haven’t told us what units you are using, or given us an example of an actual result. Commented Dec 17, 2022 at 8:11
• More generally, you can’t find 3D positions of galaxies within a cluster this way, because you can’t determine their distances (from us) to an accuracy better than the cluster’s distance. This is because the measured redshift of an individual galaxy is the overall redshift of the cluster plus the Doppler shift due to the galaxy’s line-of-sight velocity from its orbital motion within the cluster. Commented Dec 17, 2022 at 8:19
• Dear , I calculated the commoving distance of the galaxies in Mega parsec.
– Atul
Commented Dec 18, 2022 at 1:24
• As you can now see that in picture above from Jeans analysis by ( Binny and Tremaine 2008) i am going to use the distance 3d (r ) and projected distance (R) of the galaxies where (R) i have already calculated using the following equation. so now i am trying all available approaches to get (r) distance between galaxy and its centre.
– Atul
Commented Dec 18, 2022 at 1:28
• Hi @Atul Welcome to Stack Exchange! From FAQ see How do comment @replies work? If you add the @username then the user will receive a notification that you have replied to them. And we generally discourage using screenshots of text or equations. For the latter, consider giving MathJax a try :-)
– uhoh
Commented Dec 18, 2022 at 4:53

You can't calculate the distances to galaxies in a cluster like that to any useful precision.

The mean redshift will give you an estimate of the mean distance of the cluster, but the individual galaxies have perturbations around this value to that reflect their dynamics within the cluster rather than cosmological redshift. These "peculiar velocities" with respect to the cluster mean can be as large as 1000 km/s (RMS), which leads to distance error bars of order 15 Mpc compared with a typical cluster diameter of a few Mpc. And of course, some small fraction of deviations could be several times this RMS error.

In general, I do not think there is any reliable way to estimate the 3D positions of cluster galaxies with respect to the cluster centre for distant clusters. For closer clusters (Virgo) there is the possibility of using some of the other distance ladder indicators (Cepheids, globular clusters, most luminous red giants, fundamental plane, Tully-Fisher etc.) to get the individual galaxy distances with a precision somewhat better than the cluster diameter (e.g. Gavazzi et al. 1999; Solanes et al. 2002).

• Dear, i admit what you have just said and same confusion i have inmy head .so isn't there any method to get the estimate of the 3d- separation between the galaxies and cluster centre ? as i need to have this for Jeans analysis where i must have projected (R) as well as 3d distances (r) of the galaxies.( as you can see in the equation above. Best
– Atul
Commented Dec 18, 2022 at 1:47
• Peculiar velocities in a cluster can actually be as large as 2000 or 3000 km/s (massive clusters have dispersions of $\sim 1000$ km/s). Commented Dec 18, 2022 at 16:12
• Another useful distance indicator for relatively nearby clusters like Virgo and Fornax is surface brightness fluctuations. Commented Dec 18, 2022 at 16:16
• Peculiarities can be as big as 2-3 times the RMS. So yes, I agree. Or do you mean that the RMS is 2000-3000 km/s? @PeterErwin Commented Dec 18, 2022 at 17:17
• @Atul the answer is clear. The different radial velocites of galaxies in a cluster have almost nothing to do with their distance from the cluster centre and Hubble's law cannot be used in the way to are trying to. Compare the line-of-sight distance spread you are getting with the diameter of the cluster in the plane of the sky! Commented Dec 19, 2022 at 12:55