Skip to content

PSF leakage normalises by a 2023 pre-SOM n(z) for every catalogue version #315

Description

@cailmdaley

psf_systematics.py:291 builds dndz_path from the global nz block rather than the per-version entry:

params_in["dndz_path"] = (
    f"{self.cc['nz']['dndz']['path']}_{self.cc[ver]['pipeline']}_{self.cc['nz']['dndz']['blind']}.txt"
)

Every other field in set_params_leakage_scale is self.cc[ver][...]. Since pipeline: SP for all SP versions, this resolves to /n17data/mkilbing/astro/data/CFIS/v1.0/nz/dndz_SP_A.txt (Sep 2023) for every version — confirmed in all ~18 cosmo_val/output/leakage_*/stats_file_leakage.txt, fiducial included. The fiducial version's own n(z) (.../nz/v1.4.6.3/nz_SP_v1.4.6.3_A.txt, Mar 2026, on a different z grid) sits unused in the same config.

dndz_path reaches get_theo_xi at shear_psf_leakage/run_scale.py:1232, i.e. the theoretical xi_pm forming the denominator of the xi_sys/xi_theory leakage-significance ratio. So the "leakage is X% of the cosmological signal" number is normalised by the wrong n(z) for every version. xi_sys itself is unaffected and the rescaling is common across versions, so version-to-version comparisons hold; the absolute fraction does not. The hardcoded config-level blind: A also bypasses self.blind here.

Blast radius: no submitted paper depends on this. The only consumer of dndz_path is LeakageScale.do_xi_sys (shear_psf_leakage/run_scale.py:1232), whose ratio output is xi_sys_ratio.pdf. Papers I, III and IV all quote a leakage-as-fraction-of-signal number, but each normalises by a measured denominator, not a theory one: Paper I's plots/xi_sys_over_xi_plus.pdf is a different figure from a different script (papers/catalog/2025_10_02_xi_sys_rho_tau.py, denominator read from a TreeCorr xi_* file); Paper III's 10% scale-cut criterion is stated against the total measured signal; Paper IV's C_ell^sys/C_ell is built from measured harmonic spectra. Paper II quotes no leakage fraction at all. On disk this path has produced xi_sys_ratio.pdf for 19 catalogue versions across the two output trees checked (17 under comprehensive/output, 2 in a working checkout), none of them cited in any paper — and none for the fiducial SP_v1.4.6.3_leak_corr, whose leakage directory holds only stats_file_leakage.txt in both trees. So this is worth fixing before anyone reruns do_xi_sys and reads the ratio off it, but it is not a correction to anything published.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions