Overview
Phase 2c of oversampled PSF convolution: the PyAutoGalaxy consumer switch, per §5 of the approved design (PyAutoMind/feature/autoarray/oversampling_design.md, approved in PyAutoLabs/PyAutoArray#353). When the dataset's PSF is oversampled, operate/image.py must evaluate images at the fine resolution before convolving — today the over_sample decorator bins immediately, so the Convolver only ever sees image-resolution arrays.
Depends on PyAutoArray phase 2a (#354, merged as #355). Independent of phase 2b (#356 / PR #357, inversion path).
Design refinement at implementation: instead of threading a binned= kwarg through every image_2d_from signature (Galaxy → Galaxies → light profiles, plus Tracer in PyAutoLens), the oversampled branch evaluates on aa.Grid2DIrregular(grid.over_sampled) — the decorator already passes irregular grids through unbinned, and grid.over_sampled is in per-pixel sub-block order, exactly the oversampled Convolver's input format. No signature changes anywhere; Tracer inherits the behaviour through OperateImage unchanged.
Plan
blurred_image_2d_from: when psf.convolve_over_sample_size > 1, evaluate the image and blurring image on the over-sampled irregular grids and pass them to psf.convolved_image_from(..., mask=grid.mask); the LightProfileOperated branch is unchanged (operated images are added at image resolution, unblurred).
blurred_image_2d_list_from and galaxy_blurred_image_2d_dict_from: same switch per galaxy image.
padded_image_2d_from / unmasked_blurred_image_2d_from stay at image resolution (visualization-only; documented limitation per the design, revisited in the docs phase).
- Tests (numpy-only): s=1 strict parity; s=2 blurred image through
operate/image.py equals the same computation done directly through the phase-2a Convolver API; list/dict variants consistent with the scalar path.
Original Prompt
Click to expand starting prompt
See PyAutoMind/issued/oversampling_phase_2c_autogalaxy_consumer.md (phase 2c split of oversampling_phase_2_core_api.md; design approved in PyAutoArray#353).
Overview
Phase 2c of oversampled PSF convolution: the PyAutoGalaxy consumer switch, per §5 of the approved design (
PyAutoMind/feature/autoarray/oversampling_design.md, approved in PyAutoLabs/PyAutoArray#353). When the dataset's PSF is oversampled,operate/image.pymust evaluate images at the fine resolution before convolving — today theover_sampledecorator bins immediately, so the Convolver only ever sees image-resolution arrays.Depends on PyAutoArray phase 2a (#354, merged as #355). Independent of phase 2b (#356 / PR #357, inversion path).
Design refinement at implementation: instead of threading a
binned=kwarg through everyimage_2d_fromsignature (Galaxy → Galaxies → light profiles, plus Tracer in PyAutoLens), the oversampled branch evaluates onaa.Grid2DIrregular(grid.over_sampled)— the decorator already passes irregular grids through unbinned, andgrid.over_sampledis in per-pixel sub-block order, exactly the oversampled Convolver's input format. No signature changes anywhere;Tracerinherits the behaviour throughOperateImageunchanged.Plan
blurred_image_2d_from: whenpsf.convolve_over_sample_size > 1, evaluate the image and blurring image on the over-sampled irregular grids and pass them topsf.convolved_image_from(..., mask=grid.mask); theLightProfileOperatedbranch is unchanged (operated images are added at image resolution, unblurred).blurred_image_2d_list_fromandgalaxy_blurred_image_2d_dict_from: same switch per galaxy image.padded_image_2d_from/unmasked_blurred_image_2d_fromstay at image resolution (visualization-only; documented limitation per the design, revisited in the docs phase).operate/image.pyequals the same computation done directly through the phase-2a Convolver API; list/dict variants consistent with the scalar path.Original Prompt
Click to expand starting prompt
See
PyAutoMind/issued/oversampling_phase_2c_autogalaxy_consumer.md(phase 2c split ofoversampling_phase_2_core_api.md; design approved in PyAutoArray#353).