research: correct the circular Sersic hazard classification - #122
Merged
Merged
Conversation
This was referenced Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ell_comps_0/1coordinatesFitImagingJAX gradient probe at the exact circular default-prior mean and a bounded Cartesian neighbourhoodEvidence
q >= 0.99corresponds to||ell_comps|| <= 0.0050251and contains1.4028e-4of the default independentGaussian(0, 0.3)prior, not 1%ell_comps=(0, 0)is finite (-15.477240141252718)[NaN, NaN]for its exact gradient there1e-8and ±1e-6Cartesian axes are finite and have norm about1.278921e-8Gaussian neighbourhood contains5.56e-16prior mass; exact continuous prior mass is zero, but deterministic initialization at the prior mean remains reachableClassification
Resolved:
likelihood.imaging-sersic.circular-orientation-degeneracyNew:
likelihood.imaging-sersic.ell-comps-origin-nonfinite-gradientThe post-change likelihood scan still contains three persistent IDs overall: conditioning, active-set kinks, and this corrected JAX-gradient finding.
Impact
Profiling and generated evidence only. This PR does not modify PyAutoGalaxy, priors, likelihood values, public API, configuration, or release behavior. The evidence recommends a bounded PyAutoGalaxy source task that preserves physical circular symmetry while making the combined Cartesian geometry path differentiable.
Validation
ruff check .ruff format --checkpytest scripts/misc/test/— 38 passedscan.py --subject likelihood --check— 3 persistent IDs, no new uncommitted IDsscripts/misc/tooling/build_readme.py --checkAUTOLENS_PROFILING_SMOKE=1Merge authorization
The user explicitly authorized merging each bounded follow-up once its required CI is green and continuing the campaign. Do not release.
Closes #121