Repository navigation
Description
Overview
Point-source critical curves render as 4 disconnected arcs on the fit_image_with_points.png figures (PyAutoEyes, both point domains). The point visualizer computes them on a grid covering only the multiple images' bounding box (+0.1"), but critical curves often extend beyond the images, so the contour is clipped. Separately, PointDataset.extent_from() returns [y_min, y_max, x_min, x_max] while Grid2D.from_extent expects (x0, x1, y0, y1), which transposes the box.
On the autolens_visualization dataset, the box grid spans about [-1.14, 1.71]". The true tangential curve is a closed loop of radius 1.6": 4 arcs on the box grid versus one closed 257-point line on a full grid.
Plan
- PyAutoLens: compute point-source critical curves on a square grid centred on the images, 2× their half-span, with the correct x/y order. Used by both the visualizer and the
PlotterPointfallback. Regression test: the curve is closed. - autolens_visualization: re-render both point domains and rebuild the manifest after the library PR merges (CI uses library main).
- PyAutoEyes:
dashboard_refreshafter the viz PR merges.
Tier: judge — merge mode: human /prm
Detailed implementation plan
Affected Repositories
- PyAutoLens (primary)
- autolens_visualization
Suggested branch: feature/point-critical-curve-grid
Implementation Steps
autolens/point/model/visualizer.py: helper_critical_curve_grid_from(dataset, shape_native=(100, 100), scale=2.0). It takes the positions' bounding-box centre (yc, xc) and h = max(y-span, x-span)/2 + 0.1, sets w = scale·h, and returnsGrid2D.from_extent(extent=(xc-w, xc+w, yc-w, yc+w), shape_native=...). Used invisualize.autolens/point/model/plotter.py(~119): use the same helper.PointDataset.extent_from()stays unchanged (public API). The weak visualizer has the same pattern on a different dataset class: flagged, not changed.- Test: for a tracer whose Einstein radius exceeds the image bounding box, the helper grid yields one closed tangential line. Then the full
test_autolens/suite. - autolens_visualization: re-run both point producers, then
gallery_build+--checkandruff format --check.
Original Prompt
Click to expand starting prompt
fix the critical curve
Human, on the plan: "This makes sense, indeed visualization of point source stuff will often use a bigger grid as things like critical curves can extend beyond the multiple images"
Activity
Jammy2211 commentedon Oct 21, 2026
Library PR Created: #784 (845 passed, 1 xfailed). Visualization re-render: PyAutoLabs/autolens_visualization#10. Heart YELLOW acknowledged by the human. Judge tier: human /prm, library first; then the Eyes refresh.
fix: weak lensing critical-curve grid in (y,x) order via the shared h…
Jammy2211 commentedon Oct 21, 2026
Shipped — 2026-10-21
Merged by human
/prm, library first:critical_curve_grid_from(dataset, scale=...)inautolens/lens/plot/critical_curves.pybuilds a square grid in (y,x) order. Point visualizer and plotter use scale 2: critical curves are no longer clipped into arcs (or lost when the images sit inside the curve). The weak-lensing visualizer, added at the human's request, uses scale 1: its field grid is no longer transposed. 846 passed. Pending release.fit_image_with_points.pngre-rendered with a closed critical curve.dashboard_refreshrun 39598563590 (1010f5c).