Skip to content

Interferometer pixelization examples: linear bulge + pixelization hybrid - #229

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/interferometer-bulge-pixelization-example
Aug 28, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/interferometer-bulge-pixelization-example

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

The canonical interferometer pixelization examples now fit the clumpy galaxy with a linear Sersic bulge and a pixelization simultaneously, through the sparse-operator inversion — the same hybrid model the imaging counterparts already demonstrate. Previously both scripts reconstructed the whole galaxy on the mesh and told the reader this was "for simplicity … rarely necessary for science"; the real reason was that the sparse-operator path could not combine a linear light profile with a mapper, which PyAutoLabs/PyAutoArray#500 lifted. The prose in both files is reframed around the hybrid rationale (a parametric profile for the smooth component, a pixelization for everything it cannot describe, both solved in one linear solve on the sparse path). Closes #228. Deliberately not applied to autolens_workspace: its interferometer datasets are simulated without lens light, so there is no smooth component for a bulge to absorb.

Scripts Changed

  • scripts/interferometer/features/pixelization/fit.py — new __Bulge__ section building ag.lp_linear.Sersic with the simulator's truth geometry (no intensity, it is solved linearly); galaxy now takes bulge= alongside pixelization=; the fit plot is followed by a per-linear-object image split via inversion.mapped_reconstructed_data_dict. __Linear Objects__ rewritten for the two-entry linear_obj_list (LightProfileLinearObjFuncList at 0, Mapper at 1), with all linear_obj_list[0] mapper lookups moved to [1] and a new note explaining why mapper_index / pixelization_index stay 0. __Reconstruction__ now uses reconstruction_dict (the flat reconstruction array is the bulge intensity stacked on the 784 mesh fluxes), including the Simulated Interferometer section's griddata input. Intro, __Contents__, __Advantages__ and __Wrap Up__ updated to the hybrid framing.
  • scripts/interferometer/features/pixelization/modeling.py — model is now af.Model(ag.lp_linear.Sersic) + pixelization on one Galaxy, N=1 → N=8 (bulge 6, GaussianKernel regularization 2 — the old prose claimed N=1 while the code already used GaussianKernel, so N was really 2). Intro, __Contents__, both __Model__ blocks, the VRAM and run-time paragraphs and __Wrap Up__ reworded; result section gains aplt.subplot_galaxies(...) where the imaging counterpart has it, and the early model summary's stale "Imaging dataset" / "Constant regularization" claims are corrected.

Test Plan

  • Both scripts run end-to-end under the smoke env (PYAUTO_TEST_MODE=2 PYAUTO_SMALL_DATASETS=1 PYAUTO_FAST_PLOTS=1 JAX_ENABLE_X64=True, JAX enabled): fit.py 12s, modeling.py 25s, both exit 0. Asserted out-of-script via runpy: type(fit.inversion).__name__ == 'InversionInterferometerSparse' and len(fit.inversion.linear_obj_list) == 2 → ['LightProfileLinearObjFuncList', 'Mapper']. model.total_free_parameters == 8.
  • Full-size run (PYAUTO_SMALL_DATASETS unset, dataset deleted and re-simulated at full resolution): fit.py 1m12s, modeling.py 22s from a cleared output directory. Both exit 0.
  • Notebook twins regenerated via generate.py autogalaxy (135 scripts); the only other tracked deltas are the two catalogue lines in llms-full.txt / workspace_index.json that reflect these edits.
  • Smoke CI

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_012JM45sA4YGEUw6KYW8Pm96

The canonical interferometer pixelization fit.py / modeling.py now fit the
clumpy galaxy with a linear Sersic bulge and a pixelization simultaneously
through the sparse-operator inversion, mirroring the imaging examples.
This was deferred while the sparse path was pixelization-only; PyAutoArray
#500 lifted that. Notebook twins regenerated.

Closes #228

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012JM45sA4YGEUw6KYW8Pm96
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Aug 28, 2026
@Jammy2211
Jammy2211 merged commit 24879a2 into main Aug 28, 2026
7 checks passed
@Jammy2211
Jammy2211 deleted the feature/interferometer-bulge-pixelization-example branch August 28, 2026 18:41
@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.

docs: interferometer pixelization examples — linear bulge + pixelization hybrid on the sparse path

1 participant