Skip to content

fix: SersicGradient integral reference uses the R_e-ellipse pivot - #368

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/stellar-ml-gradient-conventions
Nov 19, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/stellar-ml-gradient-conventions

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

This is the workspace half of PyAutoLabs/PyAutoGalaxy#725 (library PR: PyAutoLabs/PyAutoGalaxy#726). The script scripts/misc/mass_via_integral/sersic_gradient.py computes an independent Keeton-integral reference for the SersicGradient deflections. Its mass-to-light factor hard-coded the old pivot, (q * eta / R_e) ** -gradient. This PR changes it to (eta / R_e) ** -gradient, which matches the library fix: M/L now equals mass_to_light_ratio on the ellipse of the effective radius.

Merge after the library PR. Without it, this script fails by exactly a factor of q^gradient. The script currently fails on main with the library branch installed, by a relative 0.25 at q=0.8, gradient +1.

Test Plan

  • The script passes on the task worktree: library branch plus this branch, "All SersicGradient integral tests passed."
  • Smoke for autogalaxy, autolens and autolens_test on the task worktree: 99 passed, 0 failed.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

Mirror PyAutoGalaxy#725: the mass-to-light gradient pivots on the ellipse of
the effective radius, (eta / R_e) ** -gradient, not (q * eta / R_e).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant