Skip to content

feat: support Kaplinghat halos in substructure arrays#567

Open
Jammy2211 wants to merge 1 commit into
mainfrom
feature/kaplinghat-sidm-cored-nfw
Open

feat: support Kaplinghat halos in substructure arrays#567
Jammy2211 wants to merge 1 commit into
mainfrom
feature/kaplinghat-sidm-cored-nfw

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Adds PyAutoLens follow-up support for the Kaplinghat SIDM cored-NFW halo added in PyAutoGalaxy.

The substructure batching helper now explicitly packs supported halo profile parameter vectors instead of treating every non-cored-NFW profile as truncated NFW. It also supports the new Kaplinghat profile vector used by batched multi-plane substructure simulations.

API Changes

Adds support for al.mp.KaplinghatCoredNFWSph and al.mp.KaplinghatCoredNFWMCRLudlowSph in autolens.lens.substructure_util.galaxies_to_halo_arrays.
Unsupported profile classes now raise ValueError instead of being implicitly interpreted as truncated NFW profiles.
See full details below.

Test Plan

  • NUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib PYTHONPATH=/home/jammy/Code/PyAutoLabs/PyAutoConf:/home/jammy/Code/PyAutoLabs/PyAutoFit:/home/jammy/Code/PyAutoLabs/PyAutoArray:/home/jammy/Code/PyAutoLabs/PyAutoGalaxy:/home/jammy/Code/PyAutoLabs/PyAutoLens pytest -q test_autolens/lens/test_substructure_util.py test_autolens/test_config.py test_autolens/lens
Full API Changes (for automation & release notes)

Removed

  • None.

Added

  • autolens.lens.substructure_util.galaxies_to_halo_arrays(..., profile_cls=al.mp.KaplinghatCoredNFWSph) packs Kaplinghat halos as [centre_0, centre_1, kappa_s, scale_radius, interaction_radius, central_density, isothermal_radius].
  • autolens.lens.substructure_util.galaxies_to_halo_arrays(..., profile_cls=al.mp.KaplinghatCoredNFWMCRLudlowSph) uses the same derived Kaplinghat parameter vector after the MCR constructor has computed the lensing-scale quantities.

Changed Behaviour

  • autolens.lens.substructure_util.galaxies_to_halo_arrays now raises ValueError for unsupported halo profile classes instead of falling through to the truncated-NFW parameter extractor.

Migration

  • Existing cNFWSph and NFWTruncatedSph callers keep the same parameter packing.
  • Callers using a new batched halo profile must add an explicit extractor before passing it to galaxies_to_halo_arrays.

Generated with Codex

@Jammy2211

Copy link
Copy Markdown
Collaborator Author
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Jun 9, 2026
@Jammy2211

Copy link
Copy Markdown
Collaborator Author

Parking this PR outside the current release train per release triage; removed pending-release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant