Overview
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).
Prompt: PyAutoMind/issued/oversampled_psf_simulator.md. Suggested branch: feature/psf-oversample-simulator.
🤖 Generated with Claude Code
Overview
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.pyexample with it. Run mode: supervised--auto.Plan
OperateImage.convolved_padded_image_2d_from(grid, psf, xp)(shared byGalaxiesandTracer): build the padded all-false mask (aspadded_grid_from, usingpsf.kernel_shape_image_resolution), a padded grid with uniform over-sample size s (the existingpadded_grid_frompads 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_fromswitches onpsf.convolve_over_sample_size > 1.SimulatorImaging.via_image_from(..., image_is_convolved: bool = False): skip the internal convolution when handed an already-convolved image. Additive, default preserves behaviour.via_tracer_from(it duplicates the PyAutoGalaxy pattern); trims withkernel_shape_image_resolution.scripts/imaging/simulator.pywith the oversampled-PSF example (fine kernel,convolve_over_sample_size, uniform over-sampling requirement).convolution_over_sampled.pywith a simulate-at-s=2 → fit-at-s=2 round trip (chi² ≈ noise expectation).Prompt:
PyAutoMind/issued/oversampled_psf_simulator.md. Suggested branch:feature/psf-oversample-simulator.🤖 Generated with Claude Code