From 65763a1129b442022b52fe3fbdc96231d49d8c8f Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 20 May 2026 19:34:04 +0100 Subject: [PATCH] fix(cluster): keep cluster viz grid full-extent under PYAUTO_SMALL_DATASETS=1 The cluster host's tangential critical curve sits at ~30-50"; the smoke-mode shrink (15x15 @ 0.6") would place it outside the visualization grid, silently breaking the assertion. Opt out via the new respect_small_datasets kwarg on Grid2D.uniform. --- scripts/cluster/visualization.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/cluster/visualization.py b/scripts/cluster/visualization.py index b8dd0660..fdf9d7bb 100644 --- a/scripts/cluster/visualization.py +++ b/scripts/cluster/visualization.py @@ -401,7 +401,11 @@ def draw_kpc_scale_bar( _t0 = time.perf_counter() lens_calc = al.LensCalc.from_tracer(tracer, use_multi_plane=True, plane_j=-1) -viz_grid = al.Grid2D.uniform(shape_native=(200, 200), pixel_scales=0.5) +# The cluster host's tangential critical curve sits at ~30-50"; the assertion below requires the +# grid to extend past it. Opt out of PYAUTO_SMALL_DATASETS' 15x15 @ 0.6" shrink for this one grid. +viz_grid = al.Grid2D.uniform( + shape_native=(200, 200), pixel_scales=0.5, respect_small_datasets=False +) tangential_curves = lens_calc.tangential_critical_curve_list_from(grid=viz_grid) CURVE_COLOR = "#00FFFF"