You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: move positions_threshold fixture off the symmetry axis #860
The positions_threshold pins in test_autolens/analysis/test_result.py::test__positions_threshold_from sit on a solver tie-break: the lens centre (0.1, 0.0) and source (0.0, 0.0) both lie on the x = 0 grid axis, so the on-axis deflection is exactly 0.0 and the point solver's branch is chosen by floating-point noise. PyAutoArray#519 flipped it once already (PyAutoLens#721).
Reproduced on main 2deeab94:
lens centre
threshold
factor=5
(0.1, 0.0)
0.000989832
0.00494916
(0.1, 1e-15)
0.0000228167 (×43 smaller)
0.000114083
Plan
Move the lens centre off every grid symmetry line (x=0, y=0, y=±x) to (0.06, 0.08).
Re-pin the two threshold values once against it.
Replace the knife-edge comment with one saying why the fixture is off-axis.
Tier: glance — merge mode: auto-merge on green if the Witness passes, post-merge summary
test_autolens/analysis/test_result.py::test__positions_threshold_from: lens centre=(0.06, 0.08); re-pin positions_threshold_from() and factor=5.0.
Measured candidate: threshold 0.0012770598, two images at (±0.5996, ±0.7995); ±1e-6 nudges in x and y keep both images bit-identical and move the threshold by ≤ 2.5e-8 relative; ±1e-5 by ≤ 9.3e-7.
Out of scope
test__positions_likelihood_from__mass_centre_radial_distance_min carries the same on-axis fixture and knife-edge position pins; not touched here (Witness names only the threshold pins). Can follow up.
Witness
The positions_threshold fixture sits off the lens symmetry axis, the two pins are re-pinned once, and a 1e-6 nudge changes neither the solved branch nor the pinned thresholds beyond 1e-6 relative.
test__positions_threshold_from: lens centre moved from (0.1, 0.0) (on the x = 0 axis) to (0.06, 0.08), off every grid symmetry line; the two thresholds were re-pinned once (0.0012770598, factor=5 → 0.0063852988; tolerance unchanged at 1e-4).
Independently re-checked at the PR head (unattended glance close-out, shift 2026-11-14-pm2): ±1e-6 nudges in x and y leave both image positions identical and move the thresholds by at most 2.51e-8 relative. Control: a 1e-6 nudge of the old fixture flips the solver branch and moves the threshold 98%.
Out of scope: test__positions_likelihood_from__mass_centre_radial_distance_min still uses the on-axis tracer. It can follow up separately.
Activity
Jammy2211 commentedon Nov 14, 2026
PR opened: #861 (tier glance — ends at PR-open; the shift close-out runs the witness and merges on green). Workspace impact: none (test-only diff, option iii). Gate: tests 1021 passed · smoke n/a · independent review CLEAN · adversary nothing falsified · Heart dev-ship GREEN.
Jammy2211 commentedon Nov 14, 2026
Shipped
test__positions_threshold_from: lens centre moved from(0.1, 0.0)(on the x = 0 axis) to(0.06, 0.08), off every grid symmetry line; the two thresholds were re-pinned once (0.0012770598,factor=5→0.0063852988; tolerance unchanged at 1e-4).test__positions_likelihood_from__mass_centre_radial_distance_minstill uses the on-axis tracer. It can follow up separately.