Skip to content

test: re-pin two knife-edge positions_threshold pins after the exact grid transform (PyAutoArray#519) - #722

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/positions-threshold-repin
Sep 3, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/positions-threshold-repin

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

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_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.0), source (0, 0), both on x = 0, Isothermal with ell_comps=(0,0)). Bisected across today's library merges with detached scratch worktrees: PyAutoArray#519's rotation-matrix transform_grid_2d_to_reference_frame is 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].x flips sign with a bit-identical magnitude (5.638186e-04, a grid-step artefact), and positions_threshold_from() moves 0.0019501455607 → 0.0019534291031 (+1.7e-3 relative; factor=5.0 likewise 0.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

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XhnA4pFN2NycuKc8Ni6s2R

…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
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Sep 3, 2026
@Jammy2211
Jammy2211 merged commit c6c2a06 into main Sep 3, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/positions-threshold-repin branch September 3, 2026 22:56
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 4, 2026
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.

test: re-pin knife-edge positions_threshold pins after the exact grid transform (PyAutoArray#519)

1 participant