surveyed_spacetime_volume(gps_start_time, gps_end_time, max_redshift, omega)
Returns the total spacetime volume surveyed:
<VT> = T \int dz \frac{dV_c}{dz} \frac{1}{1+z}
Results are given in units Gpc^3 yr(Julian).
Source code in gw/lts/utils/cosmology_utils.py
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104 | def surveyed_spacetime_volume(gps_start_time, gps_end_time,
max_redshift, omega):
"""
Returns the total spacetime volume surveyed:
<VT> = T \\int dz \\frac{dV_c}{dz} \\frac{1}{1+z}
Results are given in units Gpc^3 yr(Julian).
"""
# Note: LAL's cosmology routines returns distances in Mpc
def integrand(z, omega):
"""
Returns the integrand
(1 + z) D_A^2(z) / E(z)
in units of Mpc^2. Multiply the integral by 4 * pi * D_H
to get the desired integral.
"""
return (
(1.0 + z)
* lal.AngularDistance(omega, z) ** 2
* lal.HubbleParameter(z, omega)
)
I, _ = scipy.integrate.quad(integrand, 0.0, max_redshift, args=omega)
# multiply by remaining factors and scale to Gpc^3
V = 4.0 * numpy.pi * lal.HubbleDistance(omega) * I / (1e3) ** 3
# surveyed time in Julian years
T = (gps_end_time - gps_start_time) / lal.YRJUL_SI
return V * T
|