CTI resurrection Phase 1: Plotter to matplotlib function API#85
Merged
Conversation
Deletes the Plotter/PlotterInterface object stack, which targeted the
autoarray MatPlot/Visuals/Include API removed from the stack, and rewrites
PyAutoCTI visualization on the matplotlib function API used by PyAutoGalaxy:
- autocti/util/plot_utils.py: the plot_cti_1d primitive (errorbar/log-y/
zero-line/text annotations) + region title/text/FPR-mask helpers ported
from the old abstract Plotter.
- Per-domain function modules: dataset_1d/plot/{dataset_1d_plots,fit_plots}.py
and charge_injection/plot/{imaging_ci_plots,fit_ci_plots}.py — subplot_*,
figure_*, combined *_list subplots and fits_fit writers.
- Config-gated orchestrators autocti/model/plotter.py (base) +
{dataset_1d,charge_injection}/model/plotter.py (PlotterDataset1D,
PlotterImagingCI), driven by the af.Visualizer classes (Phase-0 ImportError
quarantine removed).
- autocti/plot/__init__.py rebuilt as the function namespace; `from . import
plot` restored in autocti/__init__.py.
- config/visualize.yaml plots schema simplified to the PyAutoGalaxy-style
subplot/figure keys (subplot_dataset, subplot_dataset_regions, data,
data_logy, data_binned, subplot_fit, subplot_fit_regions, residual_map,
residual_map_logy, fits_fit, fpr_non_uniformity, combined_only).
- Plot tests rewritten for the function API (plot_patch modernized to
intercept Figure.savefig); conftest collect_ignore quarantine removed.
test_autocti: 266 passed, 5 skipped (Phase-2 aggregator ports).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 17, 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
Phase 1 of the CTI resurrection epic (#84; Phase 0 was #82/#83). The quarantined Plotter/PlotterInterface object stack — which targeted the autoarray MatPlot/Visuals/Include API removed from the stack — is deleted and PyAutoCTI visualization is rewritten on the matplotlib function API used by PyAutoGalaxy/PyAutoLens. The Phase-0 quarantine (detached
autocti.plot, no-op visualizers, skipped plot tests) is fully removed: visualization now runs end-to-end during fits again.API Changes
aplt.Dataset1DPlotter,aplt.FitDataset1DPlotter,aplt.ImagingCIPlotter,aplt.FitImagingCIPlotter, thePlotterInterface*classes,autocti/plot/get_visuals/, and all re-exported autoarrayMatPlot*/Visuals*/Include*/wrapobjects (already gone upstream).autocti.plot—subplot_dataset_1d,subplot_fit_dataset_1d,subplot_imaging_ci,subplot_imaging_ci_region,subplot_imaging_ci_data_binned,subplot_fit_ci,subplot_fit_ci_region,subplot_noise_scaling_map_dict,figure_*singles, combined*_listsubplots,fits_fit_*writers, and theplot_cti_1dprimitive. CTI region overlays/annotations (FPR value text, zero-line on EPERs, electronics settings) live inautocti/util/plot_utils.py.VisualizerDataset1D/VisualizerImagingCInow drive config-gatedPlotterDataset1D/PlotterImagingCIorchestrators (model/plotter.py), mirroringautogalaxy/analysis/plotter.py.config/visualize.yamlplots:schema simplified to ag-style keys; per-quantity booleans (noise_map, signal_to_noise_map, …) folded into the subplots.See full details below.
Test Plan
python -m pytest test_autocti— 266 passed, 5 skipped (30 new plot/plotter tests; quarantine removed)fit.fits) into a scratch dirimport autocti.plotclean;from . import plotrestoredFull API Changes (for automation & release notes)
Removed
autocti.plot.{Dataset1DPlotter, FitDataset1DPlotter, ImagingCIPlotter, FitImagingCIPlotter}— replaced by the function API below.autocti.plot.{MatPlot1D, MatPlot2D, Visuals1D, Visuals2D, Include1D, Include2D, Output, ...}autoarray wrap re-exports — removed upstream.autocti/model/plotter_interface.py,*/model/plotter_interface.py,autocti/plot/abstract_plotters.py,autocti/plot/get_visuals/.Added
autocti.plotfunctions:figure_dataset_1d_data,subplot_dataset_1d(_list),figure_fit_dataset_1d,subplot_fit_dataset_1d(_list),fits_fit_dataset_1d,figure_imaging_ci_data_region,figure_pre_cti_data_residual_map,subplot_imaging_ci(_region/_data_binned/_list/_data_region_list),figure_fit_ci_region,subplot_fit_ci(_region/_list/_region_list),subplot_noise_scaling_map_dict,fits_fit_ci,plot_cti_1d, plusplot_array/plot_yxautoarray re-exports and the autofit search plots.autocti/model/plotter.py(Plotter,plot_setting),PlotterDataset1D,PlotterImagingCI.autocti/util/plot_utils.py.Migration
aplt.ImagingCIPlotter(dataset=dataset, mat_plot_2d=...).subplot_dataset()aplt.subplot_imaging_ci(dataset=dataset, output_path=..., output_format="png")plots.yamlper-quantity keys (noise_map: true, …)subplot_dataset,subplot_fit,data,data_logy,residual_map,residual_map_logy,data_binned,fits_fit).Notes
figures_1d_data_binned(rows/columns × FPR/no-FPR) is now one four-panelsubplot_data_binnedbehind thedata_binnedkey.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code