Skip to content

Add analytic lensing validation contract - #2

Draft
Biswajit1999 wants to merge 4 commits into
mainfrom
science-validation-contract-v1
Draft

Biswajit1999 wants to merge 4 commits into
mainfrom
science-validation-contract-v1

Conversation

@Biswajit1999

Copy link
Copy Markdown
Owner

Adds a science-first validation contract before any UI/rendering upgrade.

Changed:

  • tools/validate_lensing_contract.py
  • docs/validation_contract.md
  • docs/validation.md
  • .github/workflows/ci.yml

Scientific checks added:

  • point-mass image positions solve the scalar lens equation
  • point-mass image product invariant
  • point-mass signed magnification invariant
  • SIS one-image/two-image transition
  • external shear matrix trace and determinant
  • Fermat stationary condition at analytic point-mass image positions

Validation command:

python tools/validate_lensing_contract.py

CI now runs the analytic contract after the existing Python validation tests.

No visual/interface changes are included in this PR. The next scientific gap is strict critical-curve/caustic validation, especially contour sign consistency and topology for point-mass + shear and softened elliptical models.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants