Repository navigation
feat: point positions panels — solver extent, visible markers, noise circles, titles - #786
Merged
Merged
Conversation
…circles, titles (#785) The dataset and fit "Positions" panels span the PointSolver grid extent (fallback: the #783 critical-curve square), drop the axis labels, draw large filled markers with true-radius noise circles and sigma in the legend, and are titled "Dataset Positions (<name>)" / "Fit Positions (<name>)". The fit panel adds model positions, residual lines from the fit's own pairing, unmatched model images, critical curves and mass centres. critical_curve_grid_from takes an optional solver and covers its grid, so curves are never broken inside the panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 21, 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
Redraws the point-source "Positions" panels of
dataset_point.pngand the "Fit Positions" panel offit.png(closes #785). Before, they were the bare grid scatter: tiny dots, positions clipped at the panel edge, axis labels overlapping the tick labels and no noise shown. Cluster uses the same functions and changes too.Both panels now:
PointSolvergrid extent (where the model can find images); with no solver they fall back to the fix: point-source critical curves clipped into arcs by a too-small grid #783 critical-curve square, which contains every position. If an observed position lies outside the solver grid the extent grows just enough to contain it, so nothing is ever clipped;x (")/y (")labels, only arc-second ticks, and an equal aspect ratio;Observed (σ = 0.005″);Dataset Positions (point_0)/Fit Positions (point_0)(fluxes panels:Dataset Fluxes (point_0)/Fit Fluxes (point_0)).The fit panel adds (human-approved decisions 7-10):
Residualline from each observed position to the model position the fit's own pairing matches it to: Hungarian forFitPositionsImagePair, nearest forFitPositionsImagePairRepeat, the dominant (nearest) term forFitPositionsImagePairAll. Source-plane fits (FitPositionsSource) have no image-plane pairing: their model data are drawn asModel (source plane)with no lines (documented);Unmatched model image);+(Mass centre).Critical curves and the solver extent.
critical_curve_grid_fromtakes an optionalsolverand enlarges its square to cover the solver grid. Without that, on the cluster (solver ±40″, curve grid ±22″) the tangential curve stopped inside the panel as four broken arcs; now a curve is only ever cut by the panel frame. When the solver grid already lies inside the default square (the galaxy-scale point example) the grid is unchanged. The visualizer uses the enlarged grid for the curves only; the tracer/galaxy plots keep their grid.API Changes
Additive and backward compatible:
solveris optional everywhere.subplot_dataset(..., solver=None),subplot_fit(..., solver=None)(defaults tofit.solver);subplot_fitnow drawsimage_plane_linesand computes them itself when it is given no lines (pass[]for none).PlotterPoint.dataset_point(dataset, solver=None);VisualizerPoint.visualize_before_fitpassesanalysis.solver.critical_curve_grid_from(..., solver=None).autolens.point.plot.positions_panel(the shared panel drawing).See full details below.
Test Plan
pytest test_autolens/point/plot test_autolens/point/model: newtest_positions_panel.pycovers solver extent, out-of-grid enlargement, the no-solver fallback containing every position, titles, no axis labels, the σ legend and noise-circle radii, mass centres plotted, critical curves drawn / computed when absent / suppressed with[], each class's pairing, residual lines, unmatched model images, source-plane fits without lines, and the solver-covering curve grid; plus a visualizer solver-threading test.pytest test_autolens: 859 passed, 1 xfailed (5m43s); point/plot + point/model: 68 passed.Full API Changes (for automation & release notes)
Added
autolens.point.plot.positions_panel:positions_extent_from(positions, solver=None),solver_extent_from(solver),fallback_extent_from(positions, scale=2.0, buffer=0.1),sigma_label_from(noise_map),mass_centres_from(tracer),model_pairing_from(fit_positions),unmatched_model_mask_from(model, indexes), and the drawing helpersplot_observed_positions,plot_critical_curves,plot_mass_centres,plot_fit_model_positions,finish_positions_panel.solver=Nonekeyword onautolens.point.plot.point_dataset_plots.subplot_dataset,autolens.point.plot.fit_point_plots.subplot_fit,PlotterPoint.dataset_pointandautolens.lens.plot.critical_curves.critical_curve_grid_from.Changed
<name> Positions→Dataset Positions (<name>);<name> Fit Positions→Fit Positions (<name>); fluxes likewise.subplot_fitdraws critical curves on the positions panel (previously accepted but ignored) and computes them when none are passed.Migration
Heart readiness at ship: YELLOW, pre-existing and unrelated, acknowledged by the human ("manifest drift: workspace checkouts — 1 mismatch vs PyAutoMind/repos.yaml"; "release validation stale: source moved since rehearsal (PyAutoArray)").
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code