Skip to content

[PHYSICS BUG][MEDIUM] dist() accepts w₀, wₐ but silently uses hardcoded ΛCDM formula #4

@JasperSeehofer

Description

@JasperSeehofer

File: master_thesis_code/physical_relations.py:72

dist() accepts w_0 and w_a parameters but passes them to lambda_cdm_analytic_distance(), which ignores them. The hypergeometric formula used there is the exact analytic result only for flat ΛCDM (w₀ = −1, wₐ = 0):

179888\int_0^z \frac{dz'}{E(z')} = \frac{(1+z)\sqrt{1+\Omega_m(1+z)^3/\Omega_\Lambda}}{\sqrt{\Omega_\Lambda+\Omega_m(1+z)^3}},{}2F_1!\left(\tfrac{1}{3},\tfrac{1}{2};\tfrac{4}{3};-\frac{\Omega_m(1+z)^3}{\Omega\Lambda}\right) - \ldots179888

No warning is raised when non-fiducial w₀, wₐ are supplied. hubble_function() already implements the correct general CPL formula but is not used in the distance integral.

Fix options:

  • (a) Remove w_0, w_a arguments from dist() and document the ΛCDM assumption explicitly.
  • (b) Fall back to numerical integration via hubble_function() when w_0 != -1 or w_a != 0.

Reference: Hogg (1999), arXiv:astro-ph/9905116, Eq. (14–16).

Physics Change Protocol required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingphysicsPhysics formula or scientific correctness issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions