Browse the gallery → GALLERY.md
The permanent, rendered gallery of every figure PyAutoFit draws for a model-fit — the fit visualization project repo of the PyAutoLabs organism.
This repo owns the PyAutoFit figures: the producer scripts, the 1D toy datasets and their
simulator, the all-on config/ (every search plot, the model figure and the EP
factor-search visuals switched on), the tracked PNGs, GALLERY.md and the render
harness. The organ PyAutoEyes is the cross-project
visualization dashboard: it reads this repo's tracked figure manifest
(gallery/viz_manifest.yaml) and links to the PNGs here — it never
renders or copies them. It is the sibling of
autolens_visualization and
autogalaxy_visualization, in the same
shape.
Until now, the only way to see what a PyAutoFit figure looks like was to run a fit and open its
output/ folder. This repo keeps the most up-to-date rendering of every figure PyAutoFit itself
draws in git, so there is one place to see every figure, judge it, and improve it (by hand or in
an AI chat pointed at the plotting source) without re-running anything:
- samples — the search plots drawn from a fit's
Samples:corner_anestheticandcorner_cornerpyfor two nested samplers (DynestyStatic, Nautilus) and two MCMC samplers (Emcee, Zeus); the six MLE traces of LBFGS (subplot_parametersandlog_likelihood_vs_iteration, each plain / log-y / last-50-percent); thefigure_of_merit_vs_iterationtrace of the JAX multi-start gradient search MultiStartAdam. - model —
af.ModelPlottermodel figures (themodel.pngbesidemodel.info) for a single Gaussian, a collection, a linked model (a shared prior and a fixed parameter) and an EP factor graph's global model, each by names and by priors, collapsed and not. - ep — an expectation-propagation fit over three datasets:
graph.png,graph_factors.png,graph_model.png,graph_state.png,mean_field_evolution.png, theaf.EPPlotterviews with prior factors, and each factor search's own figures. - visualizer — what the
af.exexampleAnalysis'sVisualizerExamplewrites (data.png,model_fit.png) plus the search'smodel.png: the template every user's own visualizer starts from.
Every figure is a real render from a real (small) fit to this repo's 1D Gaussian datasets
(dataset/example_1d/). Unlike the lens and galaxy siblings there is no instruments/
directory: the data are 100-pixel 1D toy profiles, not telescope images, so there is no
instrument to preset.
source activate.sh # PyAutoNerves + PyAutoFit checkouts on PYTHONPATH (see the file)
bash gallery/gallery_run.sh --all # run every producer, rebuild GALLERY.md + manifest, --checkSet PYAUTO_EYES_SCRATCH to also mirror each re-rendered domain to
$PYAUTO_EYES_SCRATCH/autofit/<domain>/ for review before any PR (see AGENTS.md).
Or one domain: python scripts/samples/visualization.py, then python gallery/gallery_build.py.
Commit the regenerated PNGs under scripts/<domain>/images/ together with GALLERY.md and
gallery/viz_manifest.yaml (every figure's producer, domain, source type, path, byte size and
sha256, plus the autofit version it was rendered with). On every PyAutoFit release,
render.yml re-renders with the released stack, commits the
result and pings PyAutoEyes (repository_dispatch: eyes-refresh) to refresh its dashboard.
Runtime on an 8-core laptop (CPU): model ~3 s (no fit), visualizer ~10 s, samples
~1.5-2.5 min (six fits; Nautilus is the slowest at 30-60 s), ep ~0.5-2.5 min (up to five EP
sweeps of three dynesty factor fits, stopping early once the KL tolerance is met) — 2-5 min
for --all (measured 2m12s and 5m01s). The fits are real, so the samplers' randomness means a re-render changes
PNG bytes even when nothing else changed.
- Add a dataset to
scripts/misc/simulators/gaussian.py(or a new simulator) and track it underdataset/example_1d/<name>/. - Add a flat producer
scripts/<domain>/visualization.pymodelled onscripts/samples/visualization.py. - Run
bash gallery/gallery_run.sh --alland commit the PNGs +GALLERY.md+gallery/viz_manifest.yaml.
Three edit surfaces, from cheapest to deepest:
- Config —
config/:visualize/plots_search.yaml(which search plots a fit writes),output.yamlmodel_figure,general.yamlvisualize_ep_factor_searches. - Plot API — the plotting code in PyAutoFit:
autofit/non_linear/plot/(corner and MLE plots),autofit/model_figure/(model and EP graph figures),autofit/graphical/expectation_propagation/(graph.png,graph_factors.png,mean_field_evolution.png),autofit/example/visualize.py(the example visualizer). Change it there (normal library workflow), then re-render here. - Script — the producer in
scripts/<domain>/visualization.py(dataset, model, search).
The Brain Eyes agent runs the review loop on this repo:
bin/pyauto-brain eyes survey fit/autofit_visualization (or /eyes review fit). Accepted
critiques are filed with the eyes-critique label.
- PyAutoEyes — the organ: the cross-project
visualization dashboard that aggregates this repo (reads
gallery/viz_manifest.yaml, links to the PNGs here). - autogalaxy_visualization — the galaxy sibling this repo was copied from (harness, builder, workflows).
- autolens_visualization — the lens sibling.
- autofit_workspace — user-facing scripts and tutorials; the source of the datasets' recipe, the EP example and the config.
PyAutoFit is built in the open by its users: everyone is welcome to ask questions, share what they have made with it, and contribute.
Questions, ideas and bug reports: the PyAutoLabs Discussions. Chat with us on Slack.
Community-built tools and tutorials, and how to contribute: the PyAutoFit community page.