Repository navigation
test: re-pin two knife-edge positions_threshold pins after the exact grid transform (PyAutoArray#519) - #722
Merged
Conversation
…grid transform (PyAutoArray#519) test_autolens/analysis/test_result.py::test__positions_threshold_from and ::test__positions_likelihood_from__mass_centre_radial_distance_min pin a point-solver quantity on an exactly mirror-symmetric configuration (lens centre (0.1, 0) and source (0, 0) both on x = 0). PyAutoArray#519 made transform_grid_2d_to_reference_frame an exact identity at angle 0 (was 8.9e-16 off), so the on-axis deflection is now exactly 0 instead of 6.1e-17, the solver hits an exact tie, and the tie-break puts both images on the same side: positions[1].x flips sign (magnitude bit-identical) and positions_threshold_from() moves 0.0019501455 -> 0.0019534291 (+1.7e-3 relative). Bisected across today's PyAutoArray/PyAutoGalaxy merges: #519's rotation-matrix commit is the sole mover; every other merge is bit-neutral. The new values are the more accurate branch (exact identity, exact on-axis zero); a 1e-15 nudge of the centre flips the pin back, a 1e-6 nudge moves it 86x, so the quantity is a knife-edge, not a physical pin. Re-pinned to the new values with a comment recording the sensitivity and the cause. No library change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XhnA4pFN2NycuKc8Ni6s2R
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
Closes #721. Corrective PR for the Heart RED reason
PyAutoLens: CI failure(main run 33792218906, human-authorized under the corrective-PR exception). Test-only; no library code changes.Two tests in
test_autolens/analysis/test_result.py—test__positions_threshold_fromandtest__positions_likelihood_from__mass_centre_radial_distance_min— pin a point-solver quantity on an exactly mirror-symmetric configuration (lens centre(0.1, 0.0), source(0, 0), both onx = 0,Isothermalwithell_comps=(0,0)). Bisected across today's library merges with detached scratch worktrees: PyAutoArray#519's rotation-matrixtransform_grid_2d_to_reference_frameis the sole mover (PyAutoGalaxy #599 / #602 / #603 are bit-neutral). The new transform is an exact identity at angle 0 (the old polar form carried 8.9e-16), so the on-axis deflection is now exactly 0 rather than 6.1e-17; the solver hits an exact tie and its tie-break sends both images to the same side. Effects:positions[1].xflips sign with a bit-identical magnitude (5.638186e-04, a grid-step artefact), andpositions_threshold_from()moves0.0019501455607 → 0.0019534291031(+1.7e-3 relative;factor=5.0likewise0.0097507278 → 0.0097671455).The new values are the more accurate branch. The quantity itself is a knife-edge: with the new code a 1e-15 nudge of the centre in x flips the threshold straight back to the old pin, and a 1e-6 nudge moves it by a factor of 86. This PR re-pins both tests to the new values and records the sensitivity and cause in a comment. A follow-up worth filing separately: move the fixture off the symmetry axis (or add a small ellipticity) so the pin is stable rather than branch-selected.
API Changes
None — test-only change.
Test Plan
test_autolens/analysis/test_result.pypasses against current librarymains (PyAutoArray7968d671+, PyAutoGalaxya647aa32+)test_autolenspasses locally62feb7eb^(bisect table on issue)Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XhnA4pFN2NycuKc8Ni6s2R