Skip to content

docs: simple JSON/FITS result loading entry point in guides/results#65

Merged
Jammy2211 merged 3 commits intomainfrom
feature/results-json-load-docs
Apr 14, 2026
Merged

docs: simple JSON/FITS result loading entry point in guides/results#65
Jammy2211 merged 3 commits intomainfrom
feature/results-json-load-docs

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

@Jammy2211 Jammy2211 commented Apr 14, 2026

Summary

  • Add a new top-level scripts/guides/results/start_here.py demonstrating the fast, in-memory way to load a completed fit from the output/ folder using .json (Tracer, Model, Samples) and .fits (Imaging) files.
  • Rename scripts/guides/results/examples/scripts/guides/results/aggregator/ and rewrite its start_here.py intro as the memory-efficient, generator-based path for multi-fit workflows.
  • Cross-link the two entry points so users can pick the right trade-off.
  • Append a __Loading From Output Folder__ section to scripts/imaging/modeling.py showing how to load tracer.json / tracer.fits via search.paths.output_path (no hardcoded hash). Guarded with Path.exists() so it's smoke-test safe.
  • Update stale results/examples path references across guides.

Scripts Changed

  • scripts/imaging/modeling.py
  • scripts/guides/results/start_here.py (new)
  • scripts/guides/results/aggregator/* (moved from examples/)
  • scripts/guides/results/database/start_here.py
  • scripts/guides/units/cosmology.py, scripts/guides/tracer.py
  • Regenerated notebooks.

Test Plan

  • Ran modeling.py end-to-end with n_like_max=5000; all loadable files produced.
  • Verified autoconf.dictable.from_json loads tracer.json and model.json.
  • Smoke tests pass with PYAUTO_SKIP_FIT_OUTPUT=1 (existence guard).

Companion: PyAutoLabs/autogalaxy_workspace#30

Jammy2211 and others added 3 commits April 14, 2026 21:39
Restructure guides/results/ to present two distinct result-loading paths:
the new top-level start_here.py covers direct .json/.fits loading from the
output folder (fast, in-memory), while the former start_here.py is moved
into a renamed aggregator/ folder to document the memory-efficient
generator-based workflow. Both entry points cross-link to explain the
trade-off. modeling.py gains a __Loading From Output Folder__ section
with a tracer.json / tracer.fits example pointing to the new guide.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tence

Tracer.from_json / Galaxies.from_json are not valid APIs — objects are
deserialised via autoconf.dictable.from_json. Also guard the modeling.py
example with Path.exists() so it no-ops under PYAUTO_SKIP_FIT_OUTPUT=1
(used in smoke tests) while still running after a normal fit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant