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

Open Beginner friendly
#315 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
data

Research direction

Start at psf_systematics.py:291 and inspect set_params_leakage_scale, then follow dndz_path into shear_psf_leakage/run_scale.py:1232 and get_theo_xi. Verify that each catalogue version uses its own configured n(z) and blind value, and check the resulting xi_sys_ratio output for the affected versions.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
2
Forks
5
Avg merge
1d 14h
Merged PRs (30d)
19

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CosmoStat/sp_validation

All issues in CosmoStat/sp_validation

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.