Skip to content

docs: array-free datacube modeling example via from_stream (streaming P5) - #582

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/streaming-p5-cubes-phase-centre
Oct 1, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/streaming-p5-cubes-phase-centre

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Streaming visibilities phase 5 workspace half (epic streaming-visibilities, Discussion https://github.com/orgs/PyAutoLabs/discussions/13; issue PyAutoLabs/PyAutoArray#600). Adds an array-free datacube modeling example: each channel of the datacube/sim_simple cube is streamed through al.Interferometer.from_stream (memory-mapped FITS generator, 2 chunks per channel) so no data / noise_map / uv_wavelengths are ever held, then fitted with the same per-channel AnalysisInterferometer → FactorGraphModel as modeling.py. Two short sections then show (i) the MFS dataset as sum() of the per-channel SparseTerms (from_sparse_terms; n_vis 760 = 4 × 190 asserted; evaluated at the simulator's true model) and (ii) phase_centre= re-centring a channel on its dirty-image peak (peak moves to the origin with its value preserved; shifted + unshifted terms cannot be summed). Listed in smoke_tests.txt with no __Env__ override.

Full-profile wall ≈ 13 min with n_live=50 (the prose says so); smoke profile 6 s. Channel 0's log evidence at the true model is identical on the array-free and the in-memory from_fits + apply_sparse_operator dataset.

Scripts Changed

  • scripts/interferometer/features/datacube/modeling_array_free.py — new array-free datacube example (from_stream per channel, MFS sum, phase_centre demo).
  • scripts/interferometer/features/datacube/README.md — row for the new script.
  • smoke_tests.txt — new entry.
  • llms-full.txt, workspace_index.json — regenerated navigator catalogue (CI check).
  • notebooks/interferometer/features/datacube/modeling_array_free.ipynb — generated.

Upstream PR

Needs the released library for the phase_centre section and sum() of terms; everything else runs on the released stack. Merge after both library PRs (library-first gate).

Test Plan

  • modeling_array_free.py exit 0 under the smoke profile (6 s) and under the full profile; modeling.py regression exit 0.
  • check_navigator, check_search_memory, check_sizes.sh, black pass.
  • pyauto-heart smoke autolens --root <task worktree> on this branch: 42/42 scripts PASS, 2/2 notebooks PASS (modeling_array_free.py PASS 6.4 s).
  • CI smoke green on the same-named library branch.

Notes / follow-ups (not fixed here)

  • The search's maximum-likelihood point on this low-S/N cube has a regularisation coefficient ≈ 9.7e5 at which FitInterferometer.log_evidence raises LinAlgError (NumPy) / NaN (eager JAX) on both dataset types while the jit/vmap search path accepted it — the example evaluates the MFS fit at the true model and says why; filed as a Mind draft.
  • Phase-centre target is the dirty-image arc peak minus half a pixel (even-sized masks put the origin on a pixel corner), not the source-plane centre from cube_summary.json.

Heart RED development override (human-authorized, 2026-10-01)

Shipped under the AUTONOMY.md "Human override for Heart RED (development only)". Live human authorization in the CLI session (Fable 5.1), quoted: "Yes: library now, workspace when its run passes" for task streaming-p5-cubes-phase-centre (PyAutoLabs/PyAutoArray#600) — the workspace PR opens under that grant now that the full-profile run and the Heart smoke run have passed. Exact RED reasons at ship time (pyauto-heart readiness):

  • release validation FAILED (stage integrate)
  • workspace validation not passing (0 failed, 1 timeout, cloud#36404726969: autolens_test scripts/multi_dataset/rectangular.py)
  • manifest drift: public front-door organ tables (generated) — 1 mismatch(es) vs PyAutoMind/repos.yaml

None relate to this branch. Scope: push + PR-open only. Merge requires a separate human /prm with every required check green and the library PRs merged first; not a release.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

Jammy2211 and others added 2 commits October 1, 2026 11:07
Add scripts/interferometer/features/datacube/modeling_array_free.py, the
modeling.py fit with every channel built by Interferometer.from_stream from
memory-mapped FITS chunks (no visibilities held), plus an MFS dataset from
the summed per-channel SparseTerms (from_sparse_terms) and a phase_centre
re-centring demo. Registered in smoke_tests.txt and the datacube README;
navigator catalogue regenerated.

Refs PyAutoLabs/PyAutoArray#600

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <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