Repository navigation
Description
Overview
Restore SersicCoreSph mass-to-light ratio. Part of the four related mass-profile fixes requested on 2026-10-25. Each remains an independent task and PR.
Plan
- Append mass_to_light_ratio=1.0 to the spherical constructor and forward it to the parent; restore its prior matching the elliptical class. Test deflection and convergence scaling and model construction.
- Run focused regressions and the full PyAutoGalaxy NumPy suite; put JAX validation in workspace parity scripts.
- Preserve separate branch claims and report test evidence and limitations.
Tier: glance — merge mode: human /prm (no automatic merge requested).
Detailed implementation plan
Primary repository: PyAutoGalaxy. Branch: feature/sersic-core-sph-ml. Clean checkout from origin/main; open PR #656 was inspected and is unrelated. Workspace parity changes, where needed, belong to autogalaxy_workspace_test / autolens_workspace_test. Implement in the profile module named by the prompt and its matching tests. No API removals; the SersicCoreSph keyword is appended to preserve positional callers. Heart readiness GREEN at launch. Execute the four independent branches sequentially as this user-requested group.
Original Prompt
Starting prompt
SersicCoreSph has no mass_to_light_ratio argument
Type: bug
Target: PyAutoGalaxy
Repos:
- PyAutoGalaxy
Difficulty: small
Autonomy: safe
Priority: medium
Status: formalised
Consequence: glance
Witness: EitherSersicCoreSph.__init__acceptsmass_to_light_ratio, thesersic_core.yamlprior block is restored and a test shows its deflections scale linearly with it, or the class docstring states it is intensity-scaled by design and the config-priors walker test stays green.
Review-minutes: 3
Unattended: ready
SersicCoreSph stellar mass profile has no mass_to_light_ratio argument. Found by the config-priors-drift walker test (PyAutoGalaxy#618 / PR #619): autogalaxy/config/priors/mass/stellar/sersic_core.yaml carried a SersicCoreSph.mass_to_light_ratio prior block that was silently dead because SersicCoreSph.__init__ only accepts alpha, centre, effective_radius, gamma, intensity, radius_break, sersic_index. Its elliptical sibling SersicCore in the same module does take mass_to_light_ratio. Decide whether the spherical stellar profile is missing the argument (bug: the mass profile cannot be scaled by M/L) or whether the class is deliberately intensity-scaled, and either add the argument + restore the prior block or document why not. The dead prior block was removed in PR #619; restore it if the argument is added.
Activity
Jammy2211 commentedon Oct 25, 2026
Shipped via PyAutoGalaxy#664, confirmed merged after Python 3.12/3.13, no-JAX and docs jobs passed. Local full suite: 1360 passed, 6 skipped; downstream PyAutoLens Tracer smoke passed. Library change awaits the next release.