PyAutoGalaxy v2026.5.29.4
What's New
Breaking Changes
- fix(mass): convergence_func on PowerLawBroken, PowerLawMultipole, cNFW family (#467)
- Added
convergence_funcoverrides onPowerLawBroken,PowerLawBrokenSph(inherited),PowerLawMultipole, and thecNFWfamily (cNFWSph+ MCR variants inherit).PowerLawBroken._convergenceis a new private radial helper.PowerLawBroken.potential_2d_fromnow raisesNotImplementedErrorexplicitly (it was already non-functional). No signatures of existing public methods changed. See full details below.
- Added
- fix: soft-fail jax_zero_contour callers in lens_calc to NaN/[] (#465)
- Behaviour change (no signature change): when
jax_zero_contouris not installed,einstein_radius_jit_fromnow returnsfloat('nan')(was:ModuleNotFoundError), and the publictangential_critical_curve_list_via_zero_contour_from/radial_critical_curve_list_via_zero_contour_from(via the private_critical_curve_list_via_zero_contour) now return[](was:ModuleNotFoundError). Onelogger.warningper process per feature. New private helper_maybe_optional_dep_warnand module-level set_OPTIONAL_DEP_WARNED. No imports removed.
- Behaviour change (no signature change): when
- fix: raw-flux latent + soft-fail magzero-required µJy (#463)
- feat: MGE/CSE fallback for zero-returning mass profile potentials (#449)
- Added
MGEDecomposer.potential_2d_via_mge_from()— new public method computing lensing potential from MGE-decomposed convergence using the E1 exponential integral. Added helper methodsE1()(Abramowitz & Stegun approximation, JAX-compatible) andpotential_func_gaussian(). All existing zero-returning methods now return physically meaningful values instead of zeros. See full details below.
- Added
- refactor: port CSE module to support JAX via xp parameter (#447)
- Added
xp=npkeyword argument to fourMassProfileCSEmethods:convergence_cse_1d_from,deflections_via_cse_from,_convergence_2d_via_cse_from,_deflections_2d_via_cse_from. Existing callers passing noxpargument are unaffected (default isnp). The decomposition solver (_decompose_convergence_via_cse_from) stays NumPy-only — it runs before JIT tracing. See full details below.
- Added
- feat: first-class latent variable API in PyAutoGalaxy (#441)
- New public module
autogalaxy.imaging.model.latentwith helpers (ab_mag_via_flux_from,flux_mujy_via_ab_mag_from), theLATENT_FUNCTIONSregistry, thelatent_keys_enabled()reader, and one registered latent (total_galaxy_0_flux_mujy, disabled by default).AnalysisImaginggains aLATENT_KEYS@propertyand acompute_latent_variables(parameters, model)method — both new public surface. New config fileautogalaxy/config/latent.yaml. Note: autoconf lowercases yaml keys, so the latent name uses lowercasemujy(notmuJy) — this leaks through to thelatent.csvcolumn header.
- New public module
- feat: JIT-friendly Einstein radius helper + AnalysisDataset jit latent mode (#435)
- Two additions to PyAutoGalaxy: a new public method
LensCalc.einstein_radius_jit_from, and a class attribute overrideAnalysisDataset.LATENT_BATCH_MODE = "jit". No existing API surface is modified or removed.
- Two additions to PyAutoGalaxy: a new public method
- perf(lens_calc): cache (f, ZeroSolver) for zero_contour critical curves (#434)
LensCalcinstances now carry a private_zero_contour_cachedict. No public API surface changes — same method names, same signatures, same return values. Behavioural change:_critical_curve_list_via_zero_contourreuses its closure andZeroSolveracross repeat calls with the same parameters.
New Features
- perf: cache expensive @Property on Fit classes (#462)
- feat: vmapped_deflections_from for batched subhalo deflections (#455)
- docs: LaTeX docstrings for all mass profile classes (#453)
- feat: SimulatorInterferometer.via_galaxies_from auto-default xp from parent use_jax (#443)
- feat: SimulatorImaging.via_galaxies_from auto-default xp from parent use_jax (#442)
Bug Fixes
- fix(jax): defensive pytree dedup in imaging/interferometer analyses (#468)
- fix(mass): wire convergence_func on dPIE family for MGE decomposition (#466)
- fix: elliptical MGE potential via deflection line integral (#460)
- fix: use xp.sqrt in NFWSph.potential_func_sph (#458)
- fix: add xp=np to convergence_func across all mass profiles (#457)
Internal
- perf: vectorize MGE potential over components (#461)
- fix: cNFWSph deflection boundary bug and MCR validation (#451) (#454)
- refactor(model_util): replace simulator_start_here_model_from with direct random_galaxy_for_simulation_from (#438)
- refactor: archive quantity package to autolens_workspace_developer/legacy (#437)
Upstream Changes
PyAutoFit
- chore(deps): allow anesthetic>=2.9.0 to unblock jax>=0.7 / numpy>=2 resolution (#1306)
- fix(nss): chunked algo.init follow-up to #1303 (#1305)
- feat(nss): chunk_size kwarg for inversion-heavy A100 likelihoods (#1303)
- fix(jax): structural defense against cached_property pytree/dict leaks (#1302)
- fix(jax): keep parameterization cache off ModelInstance + auto-register pytrees (#1300)
- Cache model.parameterization; try interactive matplotlib backends (#1299)
- Prefer fit_quick.png in quick-update display candidates (#1298)
- Remove use_jax_for_visualization; add visualization warmup (#1297)
- fix: skip _compute_latent_samples in PYAUTO_TEST_MODE (#1294) (#1295)
- Add live_visual_update flag for opt-in on-the-fly visualization (#1293)
- fix: PYAUTO_TEST_MODE should write to a separate output dir (#1292)
- feat(quick_update): IPython.display.update_display for live Jupyter cells (#1290)
- feat(analysis): LATENT_BATCH_MODE attribute (vmap default, jit option) (#1288)
- Fix Sample.kwargs mixed string/tuple key bug (#1287)
- nss extras: strip git+https URLs to unblock PyPI uploads (#1286)
PyAutoArray
- fix(jax): exclude cached_property descriptors from pytree flatten paths (#343)
- fix: VectorYX2DIrregular from_dict round-trip (missing values property) (#342)
- perf: cache expensive @Property on Fit classes (#341)
- fix: make Array2D.native jit-traceable for JAX simulator path (#339)
- fix: raise ValueError on xp=np + jnp-backed-grid mismatch (#337)
- feat: SimulatorInterferometer(use_jax=True) + xp-aware preprocess Gaussian noise (#336)
- feat: SimulatorImaging(use_jax=True) + xp-aware preprocess noise (#335)
- TransformerNUFFT: add chunk_size knob to cap nufftax gather buffer (#330)
- interferometer: enable sparse_operator for nufftax TransformerNUFFT (#329)
Full changelog: 2026.5.21.1...2026.5.29.4