Skip to content

feat: datacube modeling opts into shared_preloads - #218

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/datacube-shared-state
Jun 8, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/datacube-shared-state

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

The interferometer datacube modeling example opts into the FactorGraphModel cross-Analysis shared-state mechanism: each per-channel AnalysisInterferometer is constructed with shared_preloads=True, so the channel-invariant inversion-setup quantities (the source-plane mapper and the curvature matrix F = LᵀW̃L) are computed once on the lead channel and reused by every channel instead of being rebuilt N times.

The added prose explains the validity precondition — this is only correct when the lens model is shared (it is) and uv_wavelengths / noise_map are channel-invariant (the simulated cube is built this way) — and points at the parity test that asserts the shared and unshared paths give identical likelihoods.

Scripts Changed

  • scripts/interferometer/features/datacube/modeling.py — set shared_preloads=True on each per-channel AnalysisInterferometer; added a "Shared Preloads" prose section (mechanism, validity precondition, speed-up, cross-reference to the parity test).

Upstream PR

Test Plan

  • Shared-vs-unshared likelihood parity asserted in autolens_workspace_test/scripts/jax_likelihood_functions/datacube/shared_preloads.py
  • modeling.py is exercised end-to-end by the release build

🤖 Generated with Claude Code

The pixelization datacube modeling example sets shared_preloads=True on each
per-channel AnalysisInterferometer, so the channel-invariant mapper and
curvature matrix are computed once and reused across channels. Prose explains
when this is valid (shared lens model + channel-invariant uv/noise) and the
speed-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jun 8, 2026
@Jammy2211
Jammy2211 merged commit d3a55b7 into main Jun 8, 2026
6 checks passed
@Jammy2211
Jammy2211 deleted the feature/datacube-shared-state branch June 8, 2026 14:46
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 7, 2026
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