Skip to content

feat: cluster/multi-source point figures — unified dataset, global fit, fit_per_image, with_points, per-redshift curves #793

Closed

Description

@Jammy2211

Overview

Cluster-scale (multi-source) point-source figures, designed with the human over four prototype rounds (v4 approved 2026-10-21). One visual language for every positions figure: a unified Dataset Positions figure, a global Fit Positions figure showing every source with its own-redshift critical curves, a new fit_per_image.png (per-source residual ranking + image-plane + source-plane rows), and multi-source image_with_points / fit_image_with_points. Per-source curves are computed at each source's own redshift with a fast single-deflection-field contour method on the FULL tracer (absorbs draft/bug/autolens/point_fit_critical_curves_ignore_source_redshift.md). Every figure is configured in plots.yaml and written during a real search.fit, including the cross-dataset figures of a factor-graph (cluster) fit.

Plan

  • Add a per-source record + per-plane curve module (fast deflection-field contouring, full tracer) to autolens/point/plot/.
  • Port the approved v4 figures into the library: unified dataset, global fit, fit_per_image (ranking / IP / SP rows), image_with_points / fit_image_with_points for any number of sources; reuse the positions-panel and source-plane-panel helpers and library ticks/fonts.
  • Darker/thicker critical curves and caustics everywhere (incl. source-plane panel + inset); PairAll shows −2 ln L instead of χ²; source-plane fits rank by their own per-image χ.
  • Wire through PlotterPoint / VisualizerPoint (per-analysis + visualize_combined / visualize_before_fit_combined for factor graphs), with commented plots.yaml entries.
  • Unit tests; verify with real test-mode modelling runs (single point source + 2-source cluster factor graph) that every configured PNG lands.
  • autolens_visualization: config on, producers render all new figures, cluster imaging simulator + tracked FITS, manifest refresh.
Detailed implementation plan

Affected Repositories

  • PyAutoLens (primary)
  • autolens_visualization (workspace follow-up)

Branch Survey

Repository Current Branch Dirty?
./lens/PyAutoLens main clean
./lens/autolens_visualization main clean

Suggested branch: feature/cluster-point-figures

Implementation Steps

  1. autolens/point/plot/point_sources.py (new): SourceRecord per fit (observed, σ, numbers, pairing, unmatched/no-model, Δ, μ, style), source colours/markers (black ● then Okabe-Ito + shapes; colour-by-z beyond 8), PlaneCurves + curves_for_planes (one deflection field, np.gradient, contourpy contours of λt/λr, caustics by ray-tracing; full tracer).
  2. autolens/point/plot/multi_source_plots.py (new): plot_dataset_positions, plot_fit_positions, subplot_fit_per_image (+ per-source files beyond 8 sources, shared ranking range), plot_image_with_points (dataset/fit) — the v4 look, label-adjacency placer.
  3. Route existing subplot_dataset / subplot_fit / plot_image_with_points through the unified functions; source-plane panel caustics darker/thicker.
  4. PlotterPoint / VisualizerPoint: per-analysis figures + combined figures (visualize_combined, visualize_before_fit_combined); plots.yaml keys with comments.
  5. Tests in test_autolens/point/plot/ and test_autolens/point/model/.

Key Files

  • autolens/point/plot/positions_panel.py, source_plane_panel.py, fit_point_plots.py, point_dataset_plots.py
  • autolens/point/model/plotter.py, visualizer.py
  • autolens/config/visualize/plots.yaml

Original Prompt

Click to expand starting prompt

See PyAutoMind active/cluster_point_figures_dedicated_pass.md (Request, Human direction, round 1-4 decisions, FINAL design approval and the config + modelling output + Eyes addition are binding).

Activity

  1. Jammy2211 commented on Oct 21, 2026

    @Jammy2211
    CollaboratorAuthor

    Library PR Created

  2. Jammy2211 commented on Oct 22, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped — merged 2026-10-22 in library-first order:

    • PyAutoLens#794 — unified point dataset, global fit, fit_per_image, with_points panels, per-redshift critical curves (pending release)
    • autolens_visualization#14 — cluster/multi-source point figures + cluster imaging simulator (lint green on rerun against the merged library main)
    • autolens_workspace#594 / autolens_workspace_test#347 — plots.yaml mirrors the PyAutoLens point visualization keys

    This also fixes the point-fit critical curves ignoring the source redshift (absorbed Mind bug draft). PyAutoEyes dashboard refresh dispatched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions