Overview
Standardize how the PSF convolution / convolve_over_sample_size input is documented across every simulator.py example in both autolens_workspace and autogalaxy_workspace. The reference simulators get a dedicated __PSF Convolution__ docstring section (in __Contents__), with the over-sample note written as docstring prose rather than a run of # comments. All other example simulators simply gain the convolve_over_sample_size=1 input on their from_gaussian(...) call, with no extra prose (users are assumed to have read the base simulator.py).
Plan
- Give the reference simulators (
imaging/simulator.py in both workspaces, plus group/simulator.py in autolens) a __PSF Convolution__ section: header, __Contents__ entry, and the over-sample explanation converted from # comments into docstring prose.
autogalaxy imaging/simulator.py is upgraded from its inline one-liner to the full section (galaxy terminology, ag.).
- Every other simulator with a real-space Gaussian PSF (38 files) gets
convolve_over_sample_size=1 added as the first argument to its from_gaussian(...) call — no header, no prose.
- Interferometer / point-source-multiple / weak-base simulators (no real-space PSF) are out of scope.
- CRLF autogalaxy files edited CRLF-safe so each diff stays a single line.
Detailed implementation plan
Affected Repositories
- autolens_workspace (primary)
- autogalaxy_workspace
Branch Survey
| Repository |
Current Branch |
Dirty? |
| ./autolens_workspace |
main |
clean (source); generated data products only |
| ./autogalaxy_workspace |
main |
clean (source); generated data products only |
Suggested branch: feature/psf-convolution-docstring
Implementation Steps
- Tier A (full section, 3 files):
autolens_workspace/scripts/imaging/simulator.py (add header + Contents entry + prose-ify the existing # over-sample note), autogalaxy_workspace/scripts/imaging/simulator.py (upgrade inline one-liner → full section), autolens_workspace/scripts/group/simulator.py (mirror imaging).
- Tier B (input-only, 38 files): insert
convolve_over_sample_size=1, as the first arg of each from_gaussian(...) call. Handles single-call, list-comprehension (multi/), and indented variants. CRLF-safe for the 10 autogalaxy CRLF files.
- Regenerate notebooks for both workspaces (PyAutoBuild
generate.py).
- Smoke-check representative simulators run end-to-end.
Key Files
autolens_workspace/scripts/imaging/simulator.py — canonical reference (already carries the prose + convolve_over_sample_size code; needs header/Contents/prose-ify).
autogalaxy_workspace/scripts/imaging/simulator.py — upgrade to full section.
autolens_workspace/scripts/group/simulator.py — mirror imaging.
- 38 further
simulator.py files with from_gaussian — input-only edit.
Original Prompt
Click to expand starting prompt
The new workspaces document the PSF convolution. The reference documentation style is:
"""
All CCD imaging data (e.g. Hubble Space Telescope, Euclid) are blurred by the telescope optics when they are imaged.
The Point Spread Function (PSF) describes the blurring of the image by the telescope optics, in the form of a
two dimensional convolution kernel. The lens modeling scripts use this PSF when fitting the data, to account for
this blurring of the image.
In this example, use a simple 2D Gaussian PSF, which is convolved with the image of the lens and source galaxies
when simulating the dataset.
"""
psf_convolve_over_sample_size = 1
Requirements: each reference simulator.py gets a __PSF Convolution__ docstring section (in Contents), with the over-sample note as docstring prose (not # comments). Other simulators that fold PSF under __Simulate__ don't need the header but should list the input as =1 on the from_gaussian call. group/simulator.py gets the same doc as imaging/simulator.py. Applies to both autogalaxy_workspace and autolens_workspace.
Overview
Standardize how the PSF convolution /
convolve_over_sample_sizeinput is documented across everysimulator.pyexample in bothautolens_workspaceandautogalaxy_workspace. The reference simulators get a dedicated__PSF Convolution__docstring section (in__Contents__), with the over-sample note written as docstring prose rather than a run of#comments. All other example simulators simply gain theconvolve_over_sample_size=1input on theirfrom_gaussian(...)call, with no extra prose (users are assumed to have read the basesimulator.py).Plan
imaging/simulator.pyin both workspaces, plusgroup/simulator.pyin autolens) a__PSF Convolution__section: header,__Contents__entry, and the over-sample explanation converted from#comments into docstring prose.autogalaxyimaging/simulator.pyis upgraded from its inline one-liner to the full section (galaxy terminology,ag.).convolve_over_sample_size=1added as the first argument to itsfrom_gaussian(...)call — no header, no prose.Detailed implementation plan
Affected Repositories
Branch Survey
Suggested branch:
feature/psf-convolution-docstringImplementation Steps
autolens_workspace/scripts/imaging/simulator.py(add header + Contents entry + prose-ify the existing#over-sample note),autogalaxy_workspace/scripts/imaging/simulator.py(upgrade inline one-liner → full section),autolens_workspace/scripts/group/simulator.py(mirror imaging).convolve_over_sample_size=1,as the first arg of eachfrom_gaussian(...)call. Handles single-call, list-comprehension (multi/), and indented variants. CRLF-safe for the 10 autogalaxy CRLF files.generate.py).Key Files
autolens_workspace/scripts/imaging/simulator.py— canonical reference (already carries the prose +convolve_over_sample_sizecode; needs header/Contents/prose-ify).autogalaxy_workspace/scripts/imaging/simulator.py— upgrade to full section.autolens_workspace/scripts/group/simulator.py— mirror imaging.simulator.pyfiles withfrom_gaussian— input-only edit.Original Prompt
Click to expand starting prompt
The new workspaces document the PSF convolution. The reference documentation style is:
Requirements: each reference
simulator.pygets a__PSF Convolution__docstring section (in Contents), with the over-sample note as docstring prose (not#comments). Other simulators that fold PSF under__Simulate__don't need the header but should list the input as=1on thefrom_gaussiancall.group/simulator.pygets the same doc asimaging/simulator.py. Applies to both autogalaxy_workspace and autolens_workspace.