Skip to content

Implement Gamma prediction in our modeling #3

Description

@eduardojsbarroso

Description

For cluster predictions, the excess surface density ΔΣ is a weak-lensing quantity that depends on cosmology because it is measured using distances, while the tangential shear γₜ is cosmology-independent as it is measured in angles. The relevant equations are in arXiv:2107.10857.

Problem: we need to implement tangential shear (γₜ) support in Firecrown, TXPipe, and SACC. This issue focuses on the modeling / Firecrown + SACC side; the TXPipe data-vector change should be tracked in a separate issue (see related TXPipe issue: #12 ).

Current Firecrown prediction code for ΔΣ lives here:
firecrown/models/cluster/deltasigma.py and is used by the cluster likelihoods. We need the prediction routine to optionally produce γₜ (cosmology-independent) instead of ΔΣ (cosmology-dependent), and ensure SACC can store / represent the chosen data vector correctly.


Steps to Reproduce / Inspect

  1. Inspect current prediction implementation:
    https://github.com/LSSTDESC/firecrown/blob/master/firecrown/models/cluster/deltasigma.py
  2. Inspect cluster likelihoods that consume those predictions:
    • firecrown/likelihood/binned_cluster_number_counts_deltasigma.py
    • firecrown/likelihood/binned_cluster_number_counts.py
  3. Review the theory relating ΔΣ and γₜ (see section/equations in arXiv:2107.10857).

What Needs to Be Done

  • Add support in Firecrown to compute tangential shear γₜ as an option in the cluster prediction code:
    • Decide whether to create a new prediction object (e.g. cluster_shear or deltasigma_or_shear) or extend the existing ΔΣ object to optionally return γₜ.
    • Add a clear configuration flag (e.g. output: "deltasigma" | "shear") so users can choose at runtime.
    • Ensure the implementation computes γₜ correctly (angle-based, cosmology-independent data vector) when requested.
  • Update SACC serialization:
    • Decide on SACC schema/metadata to represent whether a stored column is ΔΣ or γₜ (units / cosmology-dependence metadata).
    • Implement code to write/read γₜ vectors into/from SACC files consistently with existing conventions.
  • Update Firecrown likelihoods / wrappers to accept either data vector type (ΔΣ or γₜ) and to use appropriate prediction outputs.
  • Add tests:
    • Unit tests verifying ΔΣ vs γₜ outputs for a fixed input model (including consistency checks where applicable).
    • End-to-end test that Firecrown + SACC round-trip preserves the data vector type and values.
  • Documentation:
    • Document the new option in Firecrown docs, including guidance on when to use ΔΣ vs γₜ.
    • Add notes to SACC documentation about the new representation (if schema changes).
  • Coordinate with TXPipe team:

Extra Note (not the main focus)

The TXPipe data-vector change is a separate task (see #12 ). This Firecrown/SACC issue should not attempt to change TXPipe internals here, but must remain compatible with the TXPipe-side decision.


Type of change

  • New feature (adds option to output tangential shear γₜ)
  • Refactoring (prediction object/design & SACC serialization)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions