CosmoStat / CosmoStat/sp_validation

Native CosmoSIS SACC likelihood (sacc_like)

Open
#254 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Let the CosmoSIS inference chain consume the sp_validation SACC file natively through an sp_validation-owned subclass of the upstream SaccClLikelihood, so the fiducial (IA-only, ξ±) pipeline no longer depends on the 2pt-FITS converter.

Desired end state

  • An sp_validation-owned CosmoSIS module, SaccLikeUnions(SaccClLikelihood), reads a {version}.sacc file and produces a ξ± likelihood numerically identical to the existing 2pt-FITS + 2pt_like path. It overrides only what two hazards in the upstream class require: the upstream ξ± path evaluates a radian-θ theory spline at arcmin data tags (theory ≈ 0, χ² silently wrong), and it assumes a theory↔data ordering it never enforces. The subclass evaluates theory on radian θ while keeping self.sacc_data in arcmin, applies scale cuts in arcmin, and adds a loud ordering guard that raises on a misordered file. A third upstream defect (an undefined-name bug in the unused keep_tracers path) is deliberately left untouched.
  • The inference-prep step emits, from one assembled {version}.sacc, two CosmoSIS ini files: the legacy 2pt-FITS + 2pt_like path and a native sacc_like_unions path pointing directly at the SACC file. n(z) is read directly from the SACC NZ tracers — no 2pt-FITS is required on the native path.
  • The shim is self-retiring: a tripwire test fails the day upstream fixes the unit bug, signaling the subclass can be deleted.

Out of scope (dormant, unchanged): the PSF / xi_sys pipeline variant and the glass-mock rules stay on the existing FITS-assembly path.

Acceptance

  • A test suite asserts χ² / theory-vector / post-cut-count equality between the two paths to machine precision, and asserts the ordering guard raises on a misordered file. The suite skips cleanly where CosmoSIS is unavailable.

— Fable on behalf of Cail.

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.

Research direction

Start by locating the existing 2pt-FITS + 2pt_like inference-prep path and the upstream SaccClLikelihood integration. Trace how the assembled {version}.sacc file and NZ tracers reach the CosmoSIS ini files, then add the SaccLikeUnions path and comparison tests. Done means machine-precision equality, an ordering-guard failure, and clean skipping when CosmoSIS is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.