Skip to content

feat: remove fit_quick.png — quick updates write the normal fit subplot #680

Description

@Jammy2211

Overview

The quick-update hook (Analysis.perform_quick_update) writes a special lighter-weight fit_quick.png for the PyAutoLens dataset types (imaging, interferometer, point, weak), while full visualization writes fit.png. The user has to visually recognise two different fit-plot layouts for the same fit. PyAutoGalaxy's quick path already just writes the normal subplot_fit — PyAutoLens should do the same, and PyAutoFit's live display should only look for fit.png.

Plan

  • In the four PyAutoLens model plotters, the quick_update=True path plots the normal fit subplot (writing fit.png) and then returns — mirroring PyAutoGalaxy — instead of calling subplot_fit_quick. The quick path still skips heavy extras (log10, planes, tracer, dirty-image variants, FITS).
  • Delete the four subplot_fit_quick functions + the uncalled subplot_fit_combined_quick, and all fit_quick filenames, from the PyAutoLens plot modules.
  • In PyAutoFit, reduce _DISPLAY_CANDIDATES to ("fit.png",) in autofit/non_linear/quick_update.py; update comments and tests.
  • Update the three autolens_workspace_test visualization-jit scripts to assert fit.png instead of fit_quick.png.
Detailed implementation plan

Work Classification

Both — library (PyAutoLens primary, PyAutoFit) + workspace (autolens_workspace_test follow-up behind the library-first merge gate).

Affected Repositories

  • PyAutoLens (primary)
  • PyAutoFit
  • autolens_workspace_test

Branch Survey

Repository Current Branch Dirty?
./PyAutoLens main clean
./PyAutoFit main clean
./autolens_workspace_test main clean

Suggested branch: feature/remove-fit-quick-plots
Worktree root: ~/Code/PyAutoLabs-wt/remove-fit-quick-plots/ (created by /start_library)

Concurrent-claim note (human-approved): PyAutoLens is also claimed by #672 / #678 / autolens_workspace#442, and autolens_workspace_test by #672. Only #678 (point/model) plausibly overlaps this task's autolens/point/model/plotter.py; pre-merge origin/main before opening the PR.

Implementation Steps

  1. PyAutoLens/autolens/imaging/model/plotter.py — remove the subplot_fit_quick import and the if quick_update: block (~l.79–86); make the subplot_fit block run on should_plot("subplot_fit") or quick_update, returning after it when quick_update is set.
  2. PyAutoLens/autolens/interferometer/model/plotter.py — same restructure in both fit methods (quick block ~l.89); fit_interferometer_combined already uses the normal combined subplot for its quick path.
  3. PyAutoLens/autolens/point/model/plotter.py — quick path plots the normal subplot_fit_point (reusing the already-computed critical-curve lines) then returns.
  4. PyAutoLens/autolens/weak/model/plotter.py — quick path plots the normal subplot_fit_weak then returns.
  5. Delete subplot_fit_quick from autolens/{imaging,interferometer,point,weak}/plot/fit_*_plots.py and subplot_fit_combined_quick (zero callers) from fit_imaging_plots.py.
  6. PyAutoFit/autofit/non_linear/quick_update.py_DISPLAY_CANDIDATES = ("fit.png",); fix stale comments; sweep test_autofit/non_linear/test_quick_update.py for fit_quick references.
  7. autolens_workspace_test/scripts/{imaging,point_source,interferometer}/visualization/modeling_visualization_jit.py — assert fit.png is produced instead of fit_quick.png (verify each script's plots.yaml keeps the assertion meaningful, i.e. only the quick path writes it).
  8. Visualizers keep the quick_update flag unchanged — it still forces the essential subplot and skips expensive extras; only the figure written changes. PyAutoCTI accepts the flag and never special-cases it — no change.

Key Files

  • autolens/{imaging,interferometer,point,weak}/model/plotter.py — quick-update routing
  • autolens/{imaging,interferometer,point,weak}/plot/fit_*_plots.pysubplot_fit_quick definitions to delete
  • autofit/non_linear/quick_update.py — live-display filename candidates
  • autolens_workspace_test/scripts/*/visualization/modeling_visualization_jit.py — assertions

Testing

  • Full test_autofit/ and test_autolens/ suites (no existing tests reference the lens quick plots; PyAutoFit's test_quick_update.py does and is updated).
  • The three workspace_test visualization scripts via smoke after the library changes.

Trade-off (accepted): quick updates now render the full fit.png subplot rather than the lighter 6-panel figure, so each quick update is somewhat slower.

Original Prompt

Click to expand starting prompt

Remove special fit_quick.png for all types of Analysis, instead just plotting the normal fit, same for any other quick plot. ultimately it was annoying having to visually recognise two types of fit plot.

Prompt file: PyAutoMind/draft/feature/autolens/remove_fit_quick_plots.md (advances to active/ on issue creation).

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