-
Notifications
You must be signed in to change notification settings - Fork 0
Description
File: master_thesis_code/bayesian_inference/bayesian_inference.py
The GW likelihood uses a uniform fractional error for every event:
sigma_luminosity_distance = FRACTIONAL_LUMINOSITY_ERROR * mu_luminosity_distance # 10%The simulation already computes the actual per-source Cramér–Rao lower bound on d_L and stores it as delta_luminosity_distance_delta_luminosity_distance in the CSV output (accessible via the Detection dataclass).
Using a hardcoded 10% ignores source-by-source variation in SNR and orbital geometry: bright nearby sources become artificially uncertain while faint distant sources appear artificially precise. This flattens the contribution of well-localised events to the H₀ posterior.
Fix: Pass d_L_uncertainty = sqrt(detection.delta_luminosity_distance_delta_luminosity_distance) from the Detection dataclass into BayesianInference and use it in place of FRACTIONAL_LUMINOSITY_ERROR * d_L in both gw_likelihood() and gw_detection_probability().