You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: oversampled PSF support in SimulatorImaging + workspace example #482
Follow-up to the oversampled-PSF series (design PyAutoArray#353; chosen as option (a) at the phase-3 sign-off, autolens_workspace#232): support simulation with an oversampled PSF and land the user-facing simulator.py example with it. Run mode: supervised --auto.
Plan
PyAutoGalaxy — OperateImage.convolved_padded_image_2d_from(grid, psf, xp) (shared by Galaxies and Tracer): build the padded all-false mask (as padded_grid_from, using psf.kernel_shape_image_resolution), a padded grid with uniform over-sample size s (the existing padded_grid_from pads the border with 1s, which the uniformity guard correctly rejects), evaluate unbinned on its over-sampled coordinates, convolve at the fine resolution (blurring_image=None — all flux in-frame, same as today's padded flow) and return the image-resolution convolved padded image. via_galaxies_from switches on psf.convolve_over_sample_size > 1.
PyAutoArray — SimulatorImaging.via_image_from(..., image_is_convolved: bool = False): skip the internal convolution when handed an already-convolved image. Additive, default preserves behaviour.
PyAutoLens — the same switch in via_tracer_from (it duplicates the PyAutoGalaxy pattern); trims with kernel_shape_image_resolution.
autolens_workspace — extend scripts/imaging/simulator.py with the oversampled-PSF example (fine kernel, convolve_over_sample_size, uniform over-sampling requirement).
Tests — unit: s=2 simulation equals brute-force fine construction; s=1 regression parity; noise semantics unchanged. Workspace: extend convolution_over_sampled.py with a simulate-at-s=2 → fit-at-s=2 round trip (chi² ≈ noise expectation).
PyAutoArray 862, PyAutoGalaxy 945, PyAutoLens 336 (each +1 new test)
Workspace
simulator.py (with the new example section) runs clean; convolution_over_sampled.py all sections pass; regenerated tracked dataset files restored before commit (no binary churn)
Review
5 repos, +281/−2. Verdict: CLEAN
Implementation notes
from_gaussian gained the convolve_over_sample_size pass-through (the example needed it — API completeness); PyAutoLens simulator.py and convolver.py are CRLF files, patched ending-safely
Ship? Order: PyAutoArray → PyAutoGalaxy → PyAutoLens PRs (pending-release), workspace PRs behind the library merges. On approval + merges, the series queue is just phase 4 (docs) and the refactor follow-up.
Notes from the final stretch: PyAutoGalaxy's simulator.py turned out to be CRLF and the original patch silently never applied — the Galaxy round-trip test caught it (the Lens test alone had masked it); also purged test-output artifacts that add -A swept from an untracked test_autoarray/output dir (gitignore gap noted for the refactor sweep).
✅ Full chain merged in order, each main verified green before proceeding: PyAutoArray#359 → PyAutoGalaxy#483 → PyAutoLens#575 → autolens_workspace#233 + autolens_workspace_test#150. The against-main CI failures resolved exactly as expected once the dependency order was honoured; the navigator catalogue was regenerated in #233. Simulator support for oversampled PSFs is complete, with simulate-and-fit round-trip tests in all three projects.
Activity
Jammy2211 commentedon Jul 8, 2026
Simulator support implemented — at the ship sign-off checkpoint
Five local commits across the task worktree (not pushed): PyAutoArray (+44/−1), PyAutoGalaxy (+105), PyAutoLens (+82/−1), autolens_workspace (simulator.py example), autolens_workspace_test (round-trip test).
Verification
convolution_over_sampled.py)convolved_padded_image_2d_frompadded-frame geometry exact to 1e-14image_is_convolvedsimulator.py(with the new example section) runs clean;convolution_over_sampled.pyall sections pass; regenerated tracked dataset files restored before commit (no binary churn)from_gaussiangained theconvolve_over_sample_sizepass-through (the example needed it — API completeness); PyAutoLenssimulator.pyandconvolver.pyare CRLF files, patched ending-safelyShip? Order: PyAutoArray → PyAutoGalaxy → PyAutoLens PRs (
pending-release), workspace PRs behind the library merges. On approval + merges, the series queue is just phase 4 (docs) and the refactor follow-up.🤖 Generated with Claude Code
Jammy2211 commentedon Jul 8, 2026
🚢 Shipped (human-approved, with the requested per-project simulate-and-fit coverage): every project now has the oversampled round trip — PyAutoArray
test_simulator.py(simulator path vs fit-side convolution, exact), PyAutoGalaxytest_simulate_and_fit_imaging.py(via_galaxies_from, chi²≈0), PyAutoLenstest_simulate_and_fit_imaging.py(via_tracer_from, chi²≈1e-30). Final suites: 863 / 946 / 336.PRs (merge in order): PyAutoArray#359 → PyAutoGalaxy#483 → PyAutoLens#575 → autolens_workspace#233 + autolens_workspace_test#150.
Notes from the final stretch: PyAutoGalaxy's
simulator.pyturned out to be CRLF and the original patch silently never applied — the Galaxy round-trip test caught it (the Lens test alone had masked it); also purged test-output artifacts thatadd -Aswept from an untrackedtest_autoarray/outputdir (gitignore gap noted for the refactor sweep).🤖 Generated with Claude Code
feat: via_image_from image_is_convolved flag + from_gaussian oversamp…
feat: oversampled PSF support in SimulatorImaging (#482) (#483)
Jammy2211 commentedon Jul 8, 2026
✅ Full chain merged in order, each main verified green before proceeding: PyAutoArray#359 → PyAutoGalaxy#483 → PyAutoLens#575 → autolens_workspace#233 + autolens_workspace_test#150. The against-main CI failures resolved exactly as expected once the dependency order was honoured; the navigator catalogue was regenerated in #233. Simulator support for oversampled PSFs is complete, with simulate-and-fit round-trip tests in all three projects.
🤖 Generated with Claude Code