Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

autolens_visualization

Browse the gallery → GALLERY.md

The permanent, rendered gallery of every figure PyAutoLens writes during a model-fit — the lens visualization project repo of the PyAutoLabs organism.

This repo owns the lens figures: the producer scripts, the simulators and datasets, the all-on plots.yaml, the instrument presets, 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. Other libraries get sibling <lib>_visualization project repos in the same shape.

Vision

Until now, the only way to see what a PyAutoLens figure looks like was to run a modelling script and open its output/ folder. This repo keeps the most up-to-date rendering of every visualizer output in git — on realistic HST-scale imaging and SMA-scale interferometer data — 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.

Every PyAutoLens dataset type has one folder under scripts/ with one visualization.py, mirroring autolens_workspace (a variant gets its own folder):

Domain Producer Figures
imaging visualization.py full set: parametric + Delaunay source
interferometer visualization.py full set: parametric + Delaunay source
interferometer_datacube visualization.py dataset.png + fit.png per channel
point_source_image_chi_squared visualization.py dataset.png + fit.png + image-with-points pair + point_solver.png; teaching/point_solver.png + .gif (coarse grid)
point_source_source_chi_squared visualization.py dataset.png + fit.png
multi_galaxy visualization.py dataset.png + fit.png
group visualization.py dataset.png + fit.png
cluster visualization.py dataset.png + fit.png + point_solver.png per point-source plane
multi_dataset visualization.py dataset.png + fit.png per band
weak visualization.py dataset.png + fit.png

Each figure is exactly what the visualizers (VisualizerImaging, VisualizerInterferometer, VisualizerPoint, VisualizerWeak) write to a fit's image/ folder, rendered with the simulator's true model, with every toggle in config/visualize/plots.yaml switched on. Imaging and interferometer render every figure; the other types track just the dataset and fit figures for now (several reuse galaxy-scale plots — bespoke point, cluster and weak figures come next).

Render locally

source activate.sh                  # library checkouts on PYTHONPATH (see the file)
bash gallery/gallery_run.sh --all   # run every producer, rebuild GALLERY.md + manifest, --check

Set PYAUTO_EYES_SCRATCH to also mirror each re-rendered domain to $PYAUTO_EYES_SCRATCH/autolens/<domain>/ for review before any PR (see AGENTS.md).

Or one domain: python scripts/imaging/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 stack versions it was rendered with). On every PyAutoLens release, render.yml re-renders with the released stack, commits the result and pings PyAutoEyes (repository_dispatch: eyes-refresh) to refresh its dashboard.

Add a domain

  • Put the true model in true_models/<name>.py, add a simulator under scripts/misc/simulators/ that builds the dataset from it, register it in _viz_cli.DATASETS and track its dataset under dataset/<domain>/<name>/.
  • Add a flat producer scripts/<domain>/visualization.py modelled on scripts/imaging/visualization.py. One folder per dataset type, each with exactly one visualization.py; a variant gets its own top-level folder (e.g. point_source_image_chi_squared, interferometer_datacube).
  • Run bash gallery/gallery_run.sh --all and commit the PNGs + GALLERY.md + gallery/viz_manifest.yaml.

Improve a figure

Three edit surfaces, from cheapest to deepest:

  • Config — config/visualize/plots.yaml: which figures are written at all.
  • Plot API — the plotting code in the libraries: PyAutoLens/autolens/**/plot/, PyAutoGalaxy/autogalaxy/**/plot/, PyAutoArray/autoarray/plot/. Change it there (normal library workflow), then re-render here.
  • Script — the producer in scripts/<domain>/visualization.py (dataset, model, source types).

The Brain Eyes agent runs the review loop on this repo: bin/pyauto-brain eyes survey lens/autolens_visualization.

Related repos

  • PyAutoEyes — the organ: the cross-project visualization dashboard that aggregates this repo (reads gallery/viz_manifest.yaml, links to the PNGs here).
  • autolens_workspace — user-facing science scripts and tutorials.
  • autolens_workspace_test — visualization tests (file / FITS-HDU assertions) and the gallery harness this one was adapted from.
  • autolens_profiling — likelihood timing; the source of this repo's instrument presets, simulators and HST dataset.

Community & Contributing

PyAutoLens 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 PyAutoLens community page.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages