-
Notifications
You must be signed in to change notification settings - Fork 0
Description
File: master_thesis_code/datamodels/galaxy.py:121
Current code:
cv_grid = 4 * np.pi * (SPEED_OF_LIGHT / h0) ** 3 * cumulative_integral**2Correct formula (Hogg 1999, arXiv:astro-ph/9905116, Eq. 28):
179547V_c(z) = \frac{4\pi}{3} \left(\frac{c}{H_0}\right)^3 \left[\int_0^z \frac{dz'}{E(z')}\right]^3179547
Fix:
cv_grid = (4/3) * np.pi * (SPEED_OF_LIGHT / h0) ** 3 * cumulative_integral**3Impact: Two compounding errors — the exponent is 2 instead of 3, and the prefactor is 4π instead of 4π/3. The comoving volume scales as z² at low redshift instead of the correct z³. Every downstream use is affected: galaxy sampling in get_samples_from_comoving_volume draws from the wrong redshift distribution, and the background weight p_background = comoving_volume(z) in evaluate_galaxy_distribution uses wrong normalisation, biasing the H₀ likelihood.
Physics Change Protocol: Present old/new formula + dimensional analysis + limiting case for approval before implementing.