Repository navigation
Interferometer pixelization examples: linear bulge + pixelization hybrid - #229
Merged
Jammy2211 merged 1 commit intoAug 28, 2026
Merged
Conversation
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
deleted the
feature/interferometer-bulge-pixelization-example
branch
August 28, 2026 18:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The canonical interferometer pixelization examples now fit the
clumpygalaxy with a linearSersicbulge 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 toautolens_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 buildingag.lp_linear.Sersicwith the simulator's truth geometry (nointensity, it is solved linearly); galaxy now takesbulge=alongsidepixelization=; the fit plot is followed by a per-linear-object image split viainversion.mapped_reconstructed_data_dict.__Linear Objects__rewritten for the two-entrylinear_obj_list(LightProfileLinearObjFuncListat 0,Mapperat 1), with alllinear_obj_list[0]mapper lookups moved to[1]and a new note explaining whymapper_index/pixelization_indexstay 0.__Reconstruction__now usesreconstruction_dict(the flatreconstructionarray is the bulge intensity stacked on the 784 mesh fluxes), including theSimulated Interferometersection'sgriddatainput. Intro,__Contents__,__Advantages__and__Wrap Up__updated to the hybrid framing.scripts/interferometer/features/pixelization/modeling.py— model is nowaf.Model(ag.lp_linear.Sersic)+ pixelization on oneGalaxy, N=1 → N=8 (bulge 6,GaussianKernelregularization 2 — the old prose claimed N=1 while the code already usedGaussianKernel, so N was really 2). Intro,__Contents__, both__Model__blocks, the VRAM and run-time paragraphs and__Wrap Up__reworded; result section gainsaplt.subplot_galaxies(...)where the imaging counterpart has it, and the early model summary's stale "Imagingdataset" / "Constantregularization" claims are corrected.Test Plan
PYAUTO_TEST_MODE=2 PYAUTO_SMALL_DATASETS=1 PYAUTO_FAST_PLOTS=1 JAX_ENABLE_X64=True, JAX enabled):fit.py12s,modeling.py25s, both exit 0. Asserted out-of-script viarunpy:type(fit.inversion).__name__ == 'InversionInterferometerSparse'andlen(fit.inversion.linear_obj_list) == 2→['LightProfileLinearObjFuncList', 'Mapper'].model.total_free_parameters == 8.PYAUTO_SMALL_DATASETSunset, dataset deleted and re-simulated at full resolution):fit.py1m12s,modeling.py22s from a cleared output directory. Both exit 0.generate.py autogalaxy(135 scripts); the only other tracked deltas are the two catalogue lines inllms-full.txt/workspace_index.jsonthat reflect these edits.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_012JM45sA4YGEUw6KYW8Pm96