Skip to content

feat: readable cluster point_solver.png (per-source span, display grid, r-labels) - #796

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/cluster-point-solver-readability
Oct 22, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/cluster-point-solver-readability

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Makes point_solver.png readable for cluster-scale models (#795), using cluster_point_1.png as the approved design:

  • Per-source span: each panel spans that source's own images, rejected candidates and observed positions (padded and square), widened so the ticks fall on round values. Galaxy-scale grids that are only just larger than their images are still drawn whole.
  • Figure-only display grid: when the solver's step-0 triangles are too small to draw at that span, the figure re-solves on a coarse display grid. Its pixel scale is min(span/10, closest image separation/1.6), with the same precision and magnification threshold as the real solver. The display grid is used only if it recovers the solver's images and rejected candidates; otherwise the figure draws the solver's own steps. The legend reads "Triangles tested (display grid)". The modelling solver and its grid are never changed.
  • r-labels: rejected candidates are labelled r1, r2 (grey italic), replacing the "rejected by magnification_threshold" box, its arrows and the placement helpers.
  • Critical curves: the curves of the source's own plane come from point_sources.curves_for_planes, drawn in the feat: cluster/multi-source point figures — unified dataset, global fit, fit_per_image, with_points, per-redshift curves #794 tangential and radial style.

Closes #795.

API Changes

None to the public plotting API: aplt.plot_point_solver keeps its signature.
PlotterPoint.point_solver(image_plane_lines=None) now computes the source's own-plane curves on the per-source extent, and VisualizerPoint no longer passes the last plane's curves.
Private helpers in point_solver_plots were replaced (see below).
See full details below.

Test Plan

  • python -m pytest test_autolens/: 936 passed, 1 xfailed (at head b1754a7)
  • New unit tests in test_autolens/point/plot/ cover extent rounding, the display pixel scale, the recovery check and labels
  • Re-rendered cluster and point-source figures in autolens_visualization (companion PR); point_1 matches the approved prototype
Full API Changes (for automation & release notes)

Removed

  • point_solver_plots._critical_curve_lines_from, _rejected_label_placement, _segment_hits, rejected_corner_from (private; annotation box removed)

Added

  • point_solver_plots.round_extent_from(centre, half_width)
  • point_solver_plots.source_extent_from(points, min_width=0.0)
  • point_solver_plots.display_pixel_scale_from(extent, points)
  • point_solver_plots.display_solver_from(solver, extent, pixel_scale)
  • point_solver_plots.recovers(reference, found, tolerance)
  • point_solver_plots.image_labels_from(data)

Changed Behaviour

  • point_solver_plots.point_solver_data_from: per-source extent; may use a display solver for the drawn steps
  • PlotterPoint.point_solver: image_plane_lines=None now computes own-plane curves on the figure extent
  • VisualizerPoint: calls plotter.point_solver(fit=fit) without the last plane's curves

Migration

  • None needed.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

…d, r-labels)

Closes #795.

- Every panel spans the source's own images, rejected candidates and observed
  positions (padded, square), widened so its ticks fall on round values. A
  galaxy-scale grid only just larger than its images is shown whole.
- When the solver's step-0 triangles are too small to draw at that span, the
  figure re-solves on a coarse display grid (pixel scale min(span/10,
  closest separation/1.6), same precision and magnification threshold). The
  display grid is used only if it recovers the solver's images and rejected
  candidates; otherwise the solver's own steps are drawn. The legend marks it
  "Triangles tested (display grid)". The modelling solver is never changed.
- Rejected candidates are labelled r1, r2 (grey italic) beside each
  candidate; the "rejected by magnification_threshold" box, its arrows and
  the dead placement helpers are removed.
- Critical curves of the source's own plane come from
  point_sources.curves_for_planes on the full tracer, in the #794 style
  (tangential + radial); the LensCalc path is dropped and VisualizerPoint no
  longer passes the last plane's curves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Oct 22, 2026
@Jammy2211
Jammy2211 merged commit b273f9c into main Oct 22, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/cluster-point-solver-readability branch October 22, 2026 19:15
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 23, 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.

feat: readable cluster point_solver.png (per-source span, display grid, r-labels)

1 participant