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
Feature Request: Implement Yang et al. 2024 SIDM Profile as Default for Subhalos and LOS Halos #631
Implementation of a single closed-form parametric profile from Yang, Nadler, Yu & Zhong (2024) that spans the entire gravothermal sequence. This should become the default SIDM cored/core-collapsed path for lens-plane subhalos and line-of-sight (LOS) halos, moving the existing Kaplinghat profile to a legacy status.
Proposed Implementation Details
Profile Hierarchy & Default Status:
Default: Make the Yang+ 2024 profile the primary, default SIDM path for modeling.
Legacy: Retain the Kaplinghat framework strictly as a legacy option for backward compatibility.
Physical Collapse-Time Solve (τ formulation):
Implement the per-halo dimensionless evolution time τ = t / t_c.
Calculate the collapse time t_c from the physical parameters at the halo's CDM baseline (ρ_s, r_s): t_c = (150 / C) / [ (σ_eff / m) * ρ_s * r_s * √(4πG * ρ_s) ] (where C = 0.75).
Use a per-plane t_age to compute t (so τ updates properly dynamically depending on the redshift plane of the halo/subhalo).
Velocity Dependence (Outmezguine+ 2023):
Velocity dependence is explicitly in scope.
σ_eff must be computed dynamically using a velocity-dependent cross-section: σ ∝ v^{-a}, parameterized by a (following Outmezguine+ 2023).
References
To assist with the implementation and physical constants, refer to the following literature:
Yang+ 2024 (arXiv:2305.16176): The primary profile parameterization, including τ and t_c formulations.
Outmezguine+ 2023 (arXiv:2204.06568): Universal gravothermal sequence and the formulation for σ_eff / velocity dependence.
Phoroutan-Mehr & Yu 2025 (arXiv:2411.18751): Advanced implementation of σ ∝ v^{-a} (includes an optional spike feature, which should be off by default).
Yang+ 2025 (arXiv:2406.10753): Validation of the gravothermal profile.
Raut+ 2026 (arXiv:2604.22013): Extended τ-model (should be integrated as an optional plug-in).
Ando+ 2024 (arXiv:2403.16633): Population τ mapping used for the diagnostic f_cc cross-check.
Minor+ 2021 / SHARP IX 2025 (arXiv:2011.10627 / arXiv:2505.07944): The J0946 collapse target data for integration tests and empirical validation.
Hi @mwiet — thanks for the detailed request. I'm Jammy's CLI assistant; I'll take a look and post back shortly with a plan, or follow-up questions if I need more detail.
Here's what I'm planning to do — let me know if anything looks off.
Thanks for the thorough write-up — the references make this very actionable. It builds naturally on the Kaplinghat cored-NFW work from #564 (merged in July): we'll add the Yang+ 2024 closed-form gravothermal-sequence profile as a new spherical dark profile in PyAutoGalaxy, with the per-halo τ = t/t_c evolution-time solve and Outmezguine+ 2023 velocity dependence, then wire it into PyAutoLens's subhalo and line-of-sight substructure machinery.
Plan
New YangSIDMSph profile in PyAutoGalaxy implementing the Yang+ 2024 parameterization across the full gravothermal sequence (cored through core-collapsed), with the collapse time t_c computed from (ρ_s, r_s, σ_eff/m) using C = 0.75.
Velocity dependence per Outmezguine+ 2023: σ_eff computed from σ ∝ v^(−a), with a a model parameter.
An MCR/Ludlow constructor variant mirroring KaplinghatCoredNFWMCRLudlowSph, plus default priors, exports, and unit tests.
PyAutoLens integration so subhalos and LOS halos can use the new profile, with a per-plane t_age so τ updates with the halo's redshift plane.
On default status: rather than silently flipping the library default away from Kaplinghat (which would change existing users' fits), the first pass ships Yang+ 2024 as the recommended SIDM path with Kaplinghat fully supported; the default flip is a separate decision once the profile is validated.
Deferred to follow-ups: the Phoroutan-Mehr & Yu spike feature (off by default anyway), the Raut+ 2026 extended-τ plug-in, the Ando+ 2024 f_cc diagnostic, and J0946-based validation as a science check.
Suggested branch:feature/yang24-sidm-gravothermal-profile Worktree root:~/Code/PyAutoLabs-wt/yang24-sidm-gravothermal-profile/ (created later by /start_library)
Implementation steps
autogalaxy/profiles/mass/dark/yang24.py — YangSIDMSph(MassProfile, DarkProfile): closed-form gravothermal-sequence density; convergence/deflection following the kaplinghat.py numerical pattern, simplified where the closed form allows (a closed-form profile may also be JAX-friendly, unlike the Lane-Emden/quad machinery).
The first pass is merged — the Yang+ 2024 parametric profile is now on main in both libraries:
Add Yang+2024 parametric SIDM gravothermal-sequence profile PyAutoGalaxy#556 — YangSIDMSph, the beta = 4 cored-NFW profile evolving along the full gravothermal sequence with tau = t/t_c, plus YangSIDMMCRLudlowSph, the physical constructor: Ludlow+16 mass-concentration baseline, the Yang+24 collapse time t_c with C = 0.75, and the Outmezguine+23 effective cross section with sigma ~ v^(-a) averaged at nu_eff = 0.64 V_max (a is a model parameter).
PyAutoLens#691 — subhalo and line-of-sight halo batching support, so substructure populations can use the profile on the vmapped multi-plane path. Each halo resolves its own tau at construction, which is where per-plane halo ages enter.
A few notes on scope, as planned:
tau follows the Yang+24 validated range [0, 1]; deeper collapse is truncated, and the un-truncated value is kept as tau_physical for diagnostics such as core-collapse fractions.
Kaplinghat remains fully supported; promoting Yang+24 to the library default is a separate decision once the profile has seen real use, since flipping defaults changes existing fits.
Still tracked as follow-ups: the Phoroutan-Mehr & Yu spike feature (off by default anyway), the Raut+ 2026 extended-tau plug-in, the Ando+ 2024 f_cc cross-check, and J0946-based validation.
The new classes reach PyPI with the next release (the PRs carry the pending-release marker until then); on main they're available now as al.mp.YangSIDMSph / al.mp.YangSIDMMCRLudlowSph. If you get a chance to try them on your use case, I'd be glad to hear whether the parameterization does what you need — happy to iterate.
Closing this as shipped — the first pass is merged via PyAutoLabs/PyAutoGalaxy#556 and #691, and will be in the next PyPI release. The deferred items (default status for subhalos/LOS halos, the spike feature, the Raut+ 2026 extended-tau plug-in, the f_cc cross-check and J0946 validation) are tracked on our side as follow-ups. @mwiet — if the parameterization doesn't do what you need once you've tried it, or you'd like any of the deferred pieces prioritised, just comment here or open a fresh issue and we'll pick it up.
Thank you @Jammy2211! That covers a lot of what I need.
There are two features which I would still love to have in the YangSIDMMCRLudlowSph profile, in particular, with regards to SIDM subhalos:
Currently, the profile renders the full β=4 cored-NFW mass to the integration limit (z_max = max(500 r_s, 50 r_c)). However, the lens-plane subhalos need a tidal truncation like in Baltz et al. 2009. A truncation_radius/r_t (or τ_t in r_s units) would be nice to add which could be set as r_t = 2.5 r_s.
The profile only allows for a single collapse time for the main halos and field subhalos. According to Nishikawa et al. 2020 and Gilman et al. 2021 subhalos collapse up to 10 times faster. An optional collapse_boost (or t_infall) parameter would let subhalo populations use the class directly instead of precomputing collapse time externally.
Regarding performance, the lensing quantities currently go through scipy.integrate.quad per evaluation. The density is fully closed-form, so the enclosed mass M(<r) could be calculated analytically or as a series. That would make the profile JAX-jittable end-to-end.
Lastly, the epsrel=1e-4 deflection tolerance may not be accurate enough for high-magnification arcs near the core boundary r ~ r_c.
Activity
Jammy2211 commentedon Aug 6, 2026
Hi @mwiet — thanks for the detailed request. I'm Jammy's CLI assistant; I'll take a look and post back shortly with a plan, or follow-up questions if I need more detail.
Jammy2211 commentedon Aug 6, 2026
Here's what I'm planning to do — let me know if anything looks off.
Thanks for the thorough write-up — the references make this very actionable. It builds naturally on the Kaplinghat cored-NFW work from #564 (merged in July): we'll add the Yang+ 2024 closed-form gravothermal-sequence profile as a new spherical dark profile in PyAutoGalaxy, with the per-halo τ = t/t_c evolution-time solve and Outmezguine+ 2023 velocity dependence, then wire it into PyAutoLens's subhalo and line-of-sight substructure machinery.
Plan
YangSIDMSphprofile in PyAutoGalaxy implementing the Yang+ 2024 parameterization across the full gravothermal sequence (cored through core-collapsed), with the collapse time t_c computed from (ρ_s, r_s, σ_eff/m) using C = 0.75.aa model parameter.KaplinghatCoredNFWMCRLudlowSph, plus default priors, exports, and unit tests.t_ageso τ updates with the halo's redshift plane.Detailed implementation plan
Affected repositories
Work classification
Library
Branch survey
Suggested branch:
feature/yang24-sidm-gravothermal-profileWorktree root:
~/Code/PyAutoLabs-wt/yang24-sidm-gravothermal-profile/(created later by/start_library)Implementation steps
autogalaxy/profiles/mass/dark/yang24.py—YangSIDMSph(MassProfile, DarkProfile): closed-form gravothermal-sequence density; convergence/deflection following thekaplinghat.pynumerical pattern, simplified where the closed form allows (a closed-form profile may also be JAX-friendly, unlike the Lane-Emden/quad machinery).autogalaxy/profiles/mass/dark/yang24_mcr.py— Ludlow MCR constructor variant.mass/dark/__init__.py+mass/__init__.py; prior config entries.test_autogalaxy/profiles/mass/dark/test_yang24.pymirroringtest_kaplinghat.py.autolens/lens/substructure_util.py— extend_halo_parameter_extractor_fromfor the new classes; per-planet_age→ τ.autolens_workspace_test/scripts/mass/dark.pycoverage, mirroring Positions #139.I'll post back when the work is in progress and again when there's a PR.
Jammy2211 commentedon Aug 6, 2026
The first pass is merged — the Yang+ 2024 parametric profile is now on
mainin both libraries:YangSIDMSph, the beta = 4 cored-NFW profile evolving along the full gravothermal sequence with tau = t/t_c, plusYangSIDMMCRLudlowSph, the physical constructor: Ludlow+16 mass-concentration baseline, the Yang+24 collapse time t_c with C = 0.75, and the Outmezguine+23 effective cross section with sigma ~ v^(-a) averaged at nu_eff = 0.64 V_max (ais a model parameter).A few notes on scope, as planned:
tau_physicalfor diagnostics such as core-collapse fractions.The new classes reach PyPI with the next release (the PRs carry the
pending-releasemarker until then); onmainthey're available now asal.mp.YangSIDMSph/al.mp.YangSIDMMCRLudlowSph. If you get a chance to try them on your use case, I'd be glad to hear whether the parameterization does what you need — happy to iterate.Jammy2211 commentedon Aug 6, 2026
Closing this as shipped — the first pass is merged via PyAutoLabs/PyAutoGalaxy#556 and #691, and will be in the next PyPI release. The deferred items (default status for subhalos/LOS halos, the spike feature, the Raut+ 2026 extended-tau plug-in, the f_cc cross-check and J0946 validation) are tracked on our side as follow-ups. @mwiet — if the parameterization doesn't do what you need once you've tried it, or you'd like any of the deferred pieces prioritised, just comment here or open a fresh issue and we'll pick it up.
mwiet commentedon Aug 7, 2026
Thank you @Jammy2211! That covers a lot of what I need.
There are two features which I would still love to have in the YangSIDMMCRLudlowSph profile, in particular, with regards to SIDM subhalos:
Regarding performance, the lensing quantities currently go through
scipy.integrate.quadper evaluation. The density is fully closed-form, so the enclosed mass M(<r) could be calculated analytically or as a series. That would make the profile JAX-jittable end-to-end.Lastly, the e
psrel=1e-4deflection tolerance may not be accurate enough for high-magnification arcs near the core boundary r ~ r_c.