Skip to content

Expose the cluster family fit panels through autolens.plot - #890

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/family-plot-api
Nov 25, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/family-plot-api

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Expose the four panels of the cluster family diagnostic through autolens.plot. Authors can introduce a panel on its own, place it on a Matplotlib axis, or show the complete family figure that the point visualizer produces. The walkthrough uses the same image numbers across the sky map, contribution ranking, zoom and source plane.

Refs #883.

API Changes

Four new plotting functions accept a selected FitPointDataset and an optional sequence of cluster fits. A new subplot function composes the panels and paginates families with more than six images. See full details below.

Test Plan

  • Run the PyAutoLens test suite and the family plotting regression tests.
  • Compare standalone and combined panels for source-plane, paired image-plane and all-pairs image-plane likelihoods. Check image numbering, coordinates, statistics, supplied axes and family colours.
  • Render the four panels and the combined subplot on Pandora. Image 4 contributes 6,397.30 of the 14,234.79 source-plane χ² for point_6.
Full API Changes (for automation & release notes)

Added

  • autolens.plot.plot_family_overview(fit, *, fits=None, image=None, ax=None, ...) draws the selected family in its sky context.
  • autolens.plot.plot_family_contributions(fit, *, fits=None, ax=None, ...) ranks per-image contributions to the fitted statistic.
  • autolens.plot.plot_family_image_detail(fit, image_number=None, *, fits=None, ax=None, ...) zooms to the printed image number in the fitted plane. Omitting the number shows all images on shared axes.
  • autolens.plot.plot_family_source_plane(fit, *, fits=None, ax=None, ...) shows each labelled image back-traced to the source plane.
  • autolens.plot.subplot_fit_family(fit, *, fits=None, image=None, single_panel=False, ..., title_prefix=None) creates the complete family figure. Each function supports output_path, output_filename and output_format.

@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Nov 25, 2026
@Jammy2211

Copy link
Copy Markdown
Collaborator Author

The companion walkthrough is open in autolens_workspace #687. Its script and notebook introduce the four panels one by one on Pandora’s point_6 before assembling the subplot.

@Jammy2211
Jammy2211 merged commit 930de76 into main Nov 25, 2026
5 checks passed
@Jammy2211
Jammy2211 deleted the feature/family-plot-api branch November 25, 2026 11:11
@pyautolabs-bot pyautolabs-bot Bot removed the pending-release PR queued for the next release build label Nov 25, 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.

1 participant