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
fix: point-source critical curves clipped into arcs by a too-small grid #783
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 PlotterPoint fallback. 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_refresh after the viz PR merges.
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 returns Grid2D.from_extent(extent=(xc-w, xc+w, yc-w, yc+w), shape_native=...). Used in visualize.
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 + --check and ruff 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"
PyAutoLens#784: new shared critical_curve_grid_from(dataset, scale=...) in autolens/lens/plot/critical_curves.py builds 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.
autolens_visualization#10: both point fit_image_with_points.png re-rendered with a closed critical curve.
PyAutoEyes: dashboard_refresh run 39598563590 (1010f5c).
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).