<p>In the paper, the plot is showing volume distribution to understand the distribution of their selected sample.  The plot is probably normalized to have unit area (integral under the line is 1).   Notice that the mean is at about .2 and it goes from z = 0 to 5, so .2*5 = 1.</p>

CC BY-SA 4.0
2023-07-29T23:01:12.523Z
The plot in question comes in the middle of 5 pages of appendices all devoted to calculating Bayesian probabilities based on a set of expected distributions.  Only a normalized distribution makes any sense here.  Plus, the question itself goes into complete detail about how to calculate it in units of Gpc$^3$ per z.  If you want me to move it to a comment, I can.  But,  it answers the question, and it would be a waste of time for others to work on it.
eshaya
CC BY-SA 4.0
2023-07-29T23:46:07.963Z
...and... *sold!*
uhoh
CC BY-SA 4.0
2023-07-28T18:50:04.570Z
2023-07-30T03:55:59.867Z
2023-07-30T03:55:59.867Z
eshaya
<p>I am trying to find the expression for the rate of change of comoving volume with respect to redshift, that is <span class="math-container">$\frac{\mathrm{d}V_c}{\mathrm{d}z}$</span>. In <a href="https://arxiv.org/abs/astro-ph/9905116" rel="nofollow noreferrer">this</a> paper (Hogg, David W.), the comoving volume differential is given as follows:</p>
<p><span class="math-container">$$\mathrm{d}V_c=D_\mathrm{H}\frac{(1+z)^2D_\mathrm{A}^2}{E(z)}\mathrm{d}\Omega\mathrm{d}z$$</span></p>
<p><span class="math-container">$$\implies\frac{\mathrm{d}V_c}{\mathrm{d}z}=D_\mathrm{H}\frac{(1+z)^2D_\mathrm{A}^2}{E(z)}\mathrm{d}\Omega$$</span></p>
<p>Where <span class="math-container">$D_\mathrm{H}$</span> is the Hubble distance, <span class="math-container">$D_\mathrm{A}$</span> is the angular diameter distance. These expressions can be expressed as follows:</p>
<p><span class="math-container">$$D_\mathrm{H}=\frac{c}{H_0}$$</span></p>
<p>Where <span class="math-container">$c$</span> is the speed of light in vacuum, and <span class="math-container">$H_0$</span> is the Hubble's constant.</p>
<p><span class="math-container">$$D_\mathrm{A}=\frac{D_\mathrm{M}}{1+z}$$</span></p>
<p>Where <span class="math-container">$D_\mathrm{M}$</span> is the transverse comoving distance given by:</p>
<p><span class="math-container">$$D_\mathrm{M}=D_\mathrm{C},\textrm{ }\Omega_k=0$$</span></p>
<p>Where <span class="math-container">$\Omega_k=0$</span> implies spatial curvature 0, and <span class="math-container">$D_\mathrm{C}$</span> is the comoving distance given by:</p>
<p><span class="math-container">$$D_\mathrm{C}=D_\mathrm{H}\int_0^z\frac{\,\mathrm{d}z'}{E(z')}$$</span></p>
<p>Now, this derivation can be substituted in <span class="math-container">$\frac{\mathrm{d}V_c}{\mathrm{d}z}=4\pi D_\mathrm{H}\frac{(1+z)^2D_\mathrm{A}^2}{E(z)}$</span>, where <span class="math-container">$4\pi$</span> substitutes the solid angle element <span class="math-container">$\mathrm{d}\Omega$</span>. Now, I want to plot this result as a function of redshift, for which I have written the following code in Python:</p>
<pre><code>import numpy as np
import matplotlib.pyplot as plt
from astropy.cosmology import FlatLambdaCDM

cosmopar = FlatLambdaCDM(H0 = 67.8, Om0 = 0.3) #Defining the Cosmological model

speed_light = 3*10**5 #km/s
D_H = (speed_light/cosmopar.H(0).value)/10**3 #Gpc

Omega_m = 0.3
Omega_k = 0
Omega_Lambda = 1-Omega_m

def E(z_m): #Redshift z_m
    return math.sqrt((1+z_m)^2*Omega_m+(1+z_m)^2*Omega_k+Omega_Lambda)

def Comov_vol(z_m): #in Gpc^3
    return 4*math.pi*D_H*(((1+z_m)^2*(cosmopar.angular_diameter_distance(z_m).value/10**3)^2)/(E(z_m)))

#Plotting dVc_dz as a function of z:

ztrial = np.linspace(0,10,100) #Creating an array of redshift
comovol_arr = np.array([Comov_vol(v) for v in ztrial]) #Creating an array for corresponding comoving volume per redshift

plt.xlabel(r'Redshift')
plt.ylabel(r'<span class="math-container">$\frac{\mathrm{d}V_c}{\mathrm{d}z}$</span>')

plt.plot(ztrial, comovol_arr)
</code></pre>
<p>This gives me the following plot:</p>
<p><a href="https://i.sstatic.net/kmqWX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/kmqWX.png" alt="My plot for comoving volume per unit redshift vs redshift" /></a></p>
<p>Now, as one might notice, the magnitude of <span class="math-container">$\frac{\mathrm{d}V_c}{\mathrm{d}z}$</span> (in Gpc<span class="math-container">$^3$</span>) quite large as compared to <a href="https://arxiv.org/abs/2210.05724#:%7E:text=gwsim%20provides%20each%20mock%20event,a%20user%2Dsupplied%20galaxy%20catalog." rel="nofollow noreferrer">literature</a> (Karathanasis, Christos, et. al.). I am referring to this paper for a project I am working on and the comoving volume per unit redshift vs redshift graph provided in this paper is as follows:</p>
<p><a href="https://i.sstatic.net/4Ijw4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4Ijw4.png" alt="enter image description here" /></a></p>
<p>This graph is again given in Gpc<span class="math-container">$^3$</span>, and the shape of both my plot and this literature plot is the same; however, the magnitude of <span class="math-container">$\frac{\mathrm{d}V_c}{\mathrm{d}z}$</span> seems to differ vastly. Can someone please help me understand where I am going wrong?</p>
<p>For context: I am new to both Astronomy and Coding. As an undergraduate Physics student, I am working on a project as a part of my summer internship and the paper which I refer to for the <a href="https://arxiv.org/abs/2210.05724#:%7E:text=gwsim%20provides%20each%20mock%20event,a%20user%2Dsupplied%20galaxy%20catalog." rel="nofollow noreferrer">literature plot</a> is the one required by my mentor, thank you.</p>

<cosmology><distances><redshift>
Finding an expression for the rate of change of Comoving volume with respect to redshift
noob anomaly
# Finding an expression for the rate of change of Comoving volume with respect to redshift

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

I am trying to find the expression for the rate of change of comoving volume with respect to redshift, that is $\frac{\mathrm{d}V_c}{\mathrm{d}z}$. In this paper (Hogg, David W.), the comoving volume differential is given as follows:
$$\mathrm{d}V_c=D_\mathrm{H}\frac{(1+z)^2D_\mathrm{A}^2}{E(z)}\mathrm{d}\Omega\mathrm{d}z$$
$$\implies\frac{\mathrm{d}V_c}{\mathrm{d}z}=D_\mathrm{H}\frac{(1+z)^2D_\mathrm{A}^2}{E(z)}\mathrm{d}\Omega$$
Where $D_\mathrm{H}$ is the Hubble distance, $D_\mathrm{A}$ is the angular diameter distance. These expressions can be expressed as follows:
$$D_\mathrm{H}=\frac{c}{H_0}$$
Where $c$ is the speed of light in vacuum, and $H_0$ is the Hubble's constant.
$$D_\mathrm{A}=\frac{D_\mathrm{M}}{1+z}$$
Where $D_\mathrm{M}$ is the transverse comoving distance given by:
$$D_\mathrm{M}=D_\mathrm{C},\textrm{ }\Omega_k=0$$
Where $\Omega_k=0$ implies spatial curvature 0, and $D_\mathrm{C}$ is the comoving distance given by:
$$D_\mathrm{C}=D_\mathrm{H}\int_0^z\frac{\,\mathrm{d}z'}{E(z')}$$
Now, this derivation can be substituted in $\frac{\mathrm{d}V_c}{\mathrm{d}z}=4\pi D_\mathrm{H}\frac{(1+z)^2D_\mathrm{A}^2}{E(z)}$, where $4\pi$ substitutes the solid angle element $\mathrm{d}\Omega$. Now, I want to plot this result as a function of redshift, for which I have written the following code in Python:
import numpy as np
import matplotlib.pyplot as plt
from astropy.cosmology import FlatLambdaCDM

cosmopar = FlatLambdaCDM(H0 = 67.8, Om0 = 0.3) #Defining the Cosmological model

speed_light = 3*10**5 #km/s
D_H = (speed_light/cosmopar.H(0).value)/10**3 #Gpc

Omega_m = 0.3
Omega_k = 0
Omega_Lambda = 1-Omega_m

def E(z_m): #Redshift z_m
    return math.sqrt((1+z_m)^2*Omega_m+(1+z_m)^2*Omega_k+Omega_Lambda)

def Comov_vol(z_m): #in Gpc^3
    return 4*math.pi*D_H*(((1+z_m)^2*(cosmopar.angular_diameter_distance(z_m).value/10**3)^2)/(E(z_m)))

#Plotting dVc_dz as a function of z:

ztrial = np.linspace(0,10,100) #Creating an array of redshift
comovol_arr = np.array([Comov_vol(v) for v in ztrial]) #Creating an array for corresponding comoving volume per redshift

plt.xlabel(r'Redshift')
plt.ylabel(r'$\frac{\mathrm{d}V_c}{\mathrm{d}z}$')

plt.plot(ztrial, comovol_arr)

This gives me the following plot:

Now, as one might notice, the magnitude of $\frac{\mathrm{d}V_c}{\mathrm{d}z}$ (in Gpc$^3$) quite large as compared to literature (Karathanasis, Christos, et. al.). I am referring to this paper for a project I am working on and the comoving volume per unit redshift vs redshift graph provided in this paper is as follows:

This graph is again given in Gpc$^3$, and the shape of both my plot and this literature plot is the same; however, the magnitude of $\frac{\mathrm{d}V_c}{\mathrm{d}z}$ seems to differ vastly. Can someone please help me understand where I am going wrong?
For context: I am new to both Astronomy and Coding. As an undergraduate Physics student, I am working on a project as a part of my summer internship and the paper which I refer to for the literature plot is the one required by my mentor, thank you.

**Tags:** cosmology, distances, redshift

---

## 1 answers

### Answer by username_1 on 2023-07-28. Score: 2 | Accepted answer

In the paper, the plot is showing volume distribution to understand the distribution of their selected sample. The plot is probably normalized to have unit area (integral under the line is 1). Notice that the mean is at about .2 and it goes from z = 0 to 5, so .2\*5 = 1.

> **Comments:**
> **username_1**: The plot in question comes in the middle of 5 pages of appendices all devoted to calculating Bayesian probabilities based on a set of expected distributions.  Only a normalized distribution makes any sense here.  Plus, the question itself goes into complete detail about how to calculate it in units of Gpc$^3$ per z.  If you want me to move it to a comment, I can.  But,  it answers the question, and it would be a waste of time for others to work on it.  
> **username_2**: ...and... *sold!*  

---

