Repository navigation
Show per-family cluster diagnostics in the fitted plane - #884
Merged
Merged
Conversation
7 tasks done
Collaborator
Author
|
Workspace PR: PyAutoLabs/autolens_visualization#20 |
This was referenced Nov 24, 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
A cluster fit now writes a diagnostic figure for each multiply imaged source. The cluster overview and ranked contributions identify the family and image driving a poor fit. The upper-right panels show what the likelihood measures at each image’s own coordinates. The lower-right panel shows where every observation traces back relative to the fitted source centre.
The two whole-cluster fit maps use the same square sky field and family marker shapes. The observed-image map uses the same grayscale stretch as the family diagnostics. Both maps keep critical curves and show each family’s redshift and fitted statistic above the field. The dataset maps use the same field, legend position and family symbols. For twenty families the legend uses four columns and retains all forty observed-image labels in the two-image-per-family example.
The Simple gallery exercises this with the same five-image family in the source plane and image plane. A 0.003″ source offset gives position χ² totals of 88.22 and 86.80, respectively.
Part of the Cluster usability epic. Tracks PyAutoLens #883.
The cluster plotting walkthrough also shares this styling across its positions overlay, image zooms, dataset subplot, critical curves and caustics. Single-analysis visualizers can take an explicit family index for cluster diagnostics.
Standalone point-source overlays use grayscale and share the cluster’s amber observed-position circles. Their linear and wide-field logarithmic stretches retain their previous limits, orientation and coordinates. The per-image χ² and source-plane panels keep their image colours.
API Changes
The combined visualizer writes
<family>/fit.pngon a full update. For families with more than six observations, further pages are namedfit_page_02.pngand onward. Setfit_point_dataset.family_fit_single_panelto true for a shared angular detail panel. The cluster positions overlay, zooms and dataset subplot accept optionaldatasets=metadata for family names and redshifts. See full details below.Test Plan
Rendered the two standalone likelihood examples with grayscale backgrounds and outlined amber observed positions. They refresh ten PNGs and the solver teaching GIF. Both per-image diagnostic PNGs reproduce byte for byte against the previous renderer with the same inputs. A repeat render reproduced all changed gallery assets.
Render all four cluster maps for twenty source families and verify forty image IDs, twenty legend entries and non-overlapping legend text. Compare Simple and Abell 2744 walkthrough figures.
Full PyAutoLens suite passed with 1,108 passes and one expected failure. The final focused run passed both standalone and cluster marker regressions.
The latest targeted downstream smoke passed the multi-dataset plotting workspace script. The cluster Lenstool modeling script passed on the preceding cluster update.
Verify source and image positions, per-image statistics for hard and mixture pairings, missing predictions, and the unmatched-model penalty.
Compare each new overview against its previous render. Confirm all seven Simple image IDs, the source-plane family scores (88.21557756 and 0.76312077), the matched ±30″ field and reproducible PNG output.
Exercise six- and seven-image families, repeated full rankings, and the shared view. Draw the interactive output for both planes through Matplotlib’s show path under Agg.
Generate Simple examples from the production combined visualizer and compare both families against the reviewed statistics.
The scoped Heart development gate passed. Its informational findings included the active feature checkout and seven unstaged source changes at the pre-commit check, PyAutoFit five and PyAutoGalaxy two commits behind their respective origins, two workspace manifest discrepancies, a missing current-source release rehearsal, and a 51-hour-old release-push credential check. Gallery readiness comes from its own PR checks.
Full API Changes (for automation & release notes)
Added
fit_point_dataset.family_fit_single_panelselects one shared detail panel in the fitted plane. The default is false.PlotterPoint.fit_per_image(..., image=None)accepts an optional image for the cluster overview.Single-analysis
VisualizerPointcallbacks accept an optionalfamily_indexfor cluster-aware rendering. Generic factor-graph child callbacks receive no sibling index and retain their standalone styling. The combined callbacks obtain family identity from their ordered analyses.Changed behaviour
The full and quick combined update now coordinate the framing of
fit.pngandfit_image_with_points.png. When an observed image is available,PlotterPoint.fit_point_combinedandplot_fit_positionsaccept its optionalimage_extentto set the map centre and scale. Observed and model positions expand the frame when necessary.VisualizerPoint.visualize_combineduses per-family paths for detailed figures. At most six image zooms appear per page. Multi-page families use descending contributions and stable image IDs.Dataset and fit overviews share the image extent when the image is available. Both fitted overviews report the individual fitted statistic for every family, including the continuous redshift colour scale above eight families. Image-pair mixtures show a log-likelihood statistic.
Each combined update reuses one native image-plane solver result per fixed family.
Migration
Read
<family>/fit.pngfor a combined fit previously read from the top-levelfit_per_image.pngor its split output directory. The existingfit_per_image_combinedtoggle controls the new files.Generated by the PyAutoLabs agent workflow.