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
feat: honor PYAUTO_SMALL_DATASETS in Imaging.from_fits
Mask2D.circular and Grid2D.uniform already cap to (15, 15) at 0.6"/px
under PYAUTO_SMALL_DATASETS=1, but Imaging.from_fits did not — it just
loaded whatever was on disk. Any caller that paired from_fits(150x150
fixture) with Mask2D.circular(shape_native=dataset.shape_native) under
the env var crashed with a (150,150) vs (15,15) broadcast error on
apply_mask.
Add a center-crop hook in Imaging.from_fits that mirrors the existing
caps: data and noise_map exceeding (15, 15) are center-cropped and
pixel_scales is overridden to 0.6. The PSF is left alone (PSFs are
usually already small and capping them changes shape semantics).
A new utility cap_array_2d_for_small_datasets in autoarray/util/
dataset_util.py implements the cap and is reusable by other from_fits
loaders in follow-up PRs.
No-op when env unset OR when on-disk shape is already at-or-below the
cap, so the simulator -> from_fits round-trip is unchanged.
Closes Cluster E from the 2026-05-07 release-prep triage. The
workspace-side env_vars.yaml override shipped earlier (PR #80 in
autolens_workspace_test) becomes redundant after this lands but is
left in place as belt-and-suspenders.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments